Test Upgrades (#395)

* adds av1 to ctest

* add av1 support for batch sample

* add test to make test also

* path update for make test

* add function for codec support check

* add changes to batch sample

* addressign review comment

* modify all apps to check codec support

[ROCm/rocdecode commit: e3b3fe9e8e]
This commit is contained in:
Lakshmi Kumar
2024-07-26 14:09:58 -07:00
committed by GitHub
parent 93c3e5e9ec
commit b9c293a754
13 changed files with 173 additions and 17 deletions
@@ -285,9 +285,9 @@ int RocVideoDecoder::HandleVideoSequence(RocdecVideoFormat *p_video_format) {
decode_caps.chroma_format = p_video_format->chroma_format;
decode_caps.bit_depth_minus_8 = p_video_format->bit_depth_luma_minus8;
ROCDEC_API_CALL(rocDecGetDecoderCaps(&decode_caps));
rocDecGetDecoderCaps(&decode_caps);
if(!decode_caps.is_supported) {
ROCDEC_THROW("Rocdec:: Codec not supported on this GPU: ", ROCDEC_NOT_SUPPORTED);
ROCDEC_THROW("rocDecode:: Codec not supported on this GPU ", ROCDEC_NOT_SUPPORTED);
return 0;
}
if ((p_video_format->coded_width > decode_caps.max_width) || (p_video_format->coded_height > decode_caps.max_height)) {
@@ -1173,3 +1173,15 @@ std::chrono::_V2::system_clock::time_point RocVideoDecoder::StartTimer() {
double RocVideoDecoder::StopTimer(const std::chrono::_V2::system_clock::time_point &start_time) {
return std::chrono::duration<double, std::milli>(std::chrono::_V2::system_clock::now() - start_time).count();
}
bool RocVideoDecoder::CodecSupported(int device_id, rocDecVideoCodec codec_id, uint32_t bit_depth) {
RocdecDecodeCaps decode_caps;
decode_caps.device_id = device_id;
decode_caps.codec_type = codec_id;
decode_caps.chroma_format = rocDecVideoChromaFormat_420;
decode_caps.bit_depth_minus_8 = bit_depth - 8;
if(rocDecGetDecoderCaps(&decode_caps) != ROCDEC_SUCCESS) {
return false;
}
return true;
}