diff --git a/CHANGELOG.md b/CHANGELOG.md index 216e518d13..21790a0c3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Full documentation for rocDecode is available at [https://rocm.docs.amd.com/projects/rocDecode/en/latest/](https://rocm.docs.amd.com/projects/rocDecode/en/latest/) +## rocDecode 1.2.0 (unreleased) + +### Added + +* AV1 12-bit decode support on VA-API version 1.23.0 and later. + ## rocdecode 1.1.0 for ROCm 7.0.0 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 86f743ffae..47d3a4c4bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ if (NOT DEFINED CMAKE_CXX_COMPILER) endif() # rocdecode Version -set(VERSION "1.1.0") +set(VERSION "1.2.0") # Set Project Version and Language project(rocdecode VERSION ${VERSION} LANGUAGES CXX) diff --git a/src/rocdecode/vaapi/vaapi_videodecoder.cpp b/src/rocdecode/vaapi/vaapi_videodecoder.cpp index 39a2b142d9..3cc15848bf 100644 --- a/src/rocdecode/vaapi/vaapi_videodecoder.cpp +++ b/src/rocdecode/vaapi/vaapi_videodecoder.cpp @@ -395,7 +395,14 @@ rocDecStatus VaapiVideoDecoder::CreateDecoderConfig() { } break; case rocDecVideoCodec_AV1: - va_profile_ = VAProfileAV1Profile0; +#if VA_CHECK_VERSION(1, 23, 0) + if (decoder_create_info_.bit_depth_minus_8 == 4) { + va_profile_ = VAProfileAV1Profile2; + } else +#endif + { + va_profile_ = VAProfileAV1Profile0; + } break; default: ERR("The codec type is not supported."); @@ -649,7 +656,14 @@ rocDecStatus VaContext::CheckDecCapForCodecType(RocdecDecodeCaps *dec_cap) { break; } case rocDecVideoCodec_AV1: { - va_profile = VAProfileAV1Profile0; +#if VA_CHECK_VERSION(1, 23, 0) + if (dec_cap->bit_depth_minus_8 == 4) { + va_profile = VAProfileAV1Profile2; + } else +#endif + { + va_profile = VAProfileAV1Profile0; + } break; } default: { diff --git a/utils/md5.h b/utils/md5.h index 6b86110806..0be8a43d40 100644 --- a/utils/md5.h +++ b/utils/md5.h @@ -131,11 +131,11 @@ public: } int img_size = img_width * surf_info->bytes_per_pixel * (img_height + surf_info->chroma_height); - // For 10 bit, convert from P010 to LSB to match reference decoder output + // For 10/12 bit, convert from P010/P012 to LSB to match reference decoder output if (surf_info->bytes_per_pixel == 2) { uint16_t *ptr = reinterpret_cast (stacked_ptr); for (i = 0; i < img_size / 2; i++) { - ptr[i] = ptr[i] >> 6; + ptr[i] = ptr[i] >> (16 - surf_info->bit_depth); } }