AV1: Added 12-bit AV1 decode support. (#631)

* * rocDecode/AV1: Added 12-bit AV1 decode support.
 - The feature is only enabled for VAAPI version 1.23.0 and up.
 - Added MD5 calculation for 12-bit video output.

* * rocDecode: Bumped version up to 1.2.0 and updated change log.

* * rocDecode: Updated change log based on review.
このコミットが含まれているのは:
Jeff Jiang
2025-08-21 10:40:17 -04:00
committed by GitHub
コミット 84257d513a
4個のファイルの変更25行の追加5行の削除
+6
ファイルの表示
@@ -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
+1 -1
ファイルの表示
@@ -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)
+16 -2
ファイルの表示
@@ -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: {
+2 -2
ファイルの表示
@@ -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<uint16_t *> (stacked_ptr);
for (i = 0; i < img_size / 2; i++) {
ptr[i] = ptr[i] >> 6;
ptr[i] = ptr[i] >> (16 - surf_info->bit_depth);
}
}