From 0cd3ed9aaed0f2ce288435b79c671545e1a5bd16 Mon Sep 17 00:00:00 2001 From: Aryan Salmanpour Date: Tue, 27 Feb 2024 17:56:15 -0500 Subject: [PATCH] Disable AVC codec support by default for 6.1 release (#264) [ROCm/rocdecode commit: eced98721cfe9066ff9b8cb1b90c736814a2ab97] --- projects/rocdecode/src/parser/rocparser_api.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/rocdecode/src/parser/rocparser_api.cpp b/projects/rocdecode/src/parser/rocparser_api.cpp index 1c4a2c2e1f..cb9cef802d 100644 --- a/projects/rocdecode/src/parser/rocparser_api.cpp +++ b/projects/rocdecode/src/parser/rocparser_api.cpp @@ -33,6 +33,14 @@ rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *pa if (parser_handle == nullptr || parser_params == nullptr) { return ROCDEC_INVALID_PARAMETER; } + + const char *is_avc_enabled = std::getenv("ROCDECODE_ENABLE_AVC"); + if (parser_params->codec_type != rocDecVideoCodec_HEVC && + (parser_params->codec_type == rocDecVideoCodec_AVC && (is_avc_enabled == nullptr || std::string(is_avc_enabled) != "1"))) { + ERR("The current version of rocDecode officially supports only the H.265 (HEVC) codec."); + return ROCDEC_NOT_IMPLEMENTED; + } + RocdecVideoParser handle = nullptr; try { handle = new RocParserHandle(parser_params);