* 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]
Этот коммит содержится в:
Lakshmi Kumar
2024-07-26 14:09:58 -07:00
коммит произвёл GitHub
родитель 93c3e5e9ec
Коммит b9c293a754
13 изменённых файлов: 173 добавлений и 17 удалений
+14 -2
Просмотреть файл
@@ -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;
}
+7
Просмотреть файл
@@ -375,6 +375,13 @@ class RocVideoDecoder {
}
}
/**
* @brief Check if the given Video Codec is supported on the given GPU
*
* @return rocDecStatus
*/
bool CodecSupported(int device_id, rocDecVideoCodec codec_id, uint32_t bit_depth);
private:
/**
* @brief Callback function to be registered for getting a callback when decoding of sequence starts