Enable decoding AVC (H.264) codec by default and enable CTest for it (#309)

[ROCm/rocdecode commit: 2d877cd357]
Этот коммит содержится в:
Aryan Salmanpour
2024-04-04 19:47:35 -04:00
коммит произвёл GitHub
родитель 190f2d9d33
Коммит 36840419cc
3 изменённых файлов: 31 добавлений и 5 удалений
+2 -3
Просмотреть файл
@@ -34,12 +34,11 @@ rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *pa
return ROCDEC_INVALID_PARAMETER;
}
const char *is_avc_enabled = std::getenv("ROCDECODE_ENABLE_AVC");
const char *is_av1_enabled = std::getenv("ROCDECODE_ENABLE_AV1");
if (parser_params->codec_type != rocDecVideoCodec_HEVC &&
(parser_params->codec_type == rocDecVideoCodec_AVC && (is_avc_enabled == nullptr || std::string(is_avc_enabled) != "1")) &&
parser_params->codec_type != rocDecVideoCodec_AVC &&
(parser_params->codec_type == rocDecVideoCodec_AV1 && (is_av1_enabled == nullptr || std::string(is_av1_enabled) != "1"))) {
ERR("The current version of rocDecode officially supports only the H.265 (HEVC) codec.");
ERR("The current version of rocDecode officially supports only the H.265 (HEVC) and H.264 (AVC) codec.");
return ROCDEC_NOT_IMPLEMENTED;
}