From 910427d80d37de593f498b17bae55d636ccacf96 Mon Sep 17 00:00:00 2001 From: "Xu, Zhengguo" Date: Mon, 15 Jul 2024 05:57:30 +0000 Subject: [PATCH] [Decode] Remove vvc private headers Switch to public vvc headers in libva release --- .../vvc_dec/include/umc_vvc_va_packer_vaapi.h | 5 ++-- .../vvc_dec/src/umc_vvc_va_packer_vaapi.cpp | 12 ++++---- .../shared/umc/io/umc_va/src/umc_va_linux.cpp | 29 ++++++++++--------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/_studio/shared/umc/codec/vvc_dec/include/umc_vvc_va_packer_vaapi.h b/_studio/shared/umc/codec/vvc_dec/include/umc_vvc_va_packer_vaapi.h index efdd63f6a1..afd47639f3 100644 --- a/_studio/shared/umc/codec/vvc_dec/include/umc_vvc_va_packer_vaapi.h +++ b/_studio/shared/umc/codec/vvc_dec/include/umc_vvc_va_packer_vaapi.h @@ -25,9 +25,10 @@ #ifndef __UMC_VVC_VA_PACKER_H -#include "umc_vvc_va_private.h" #include "umc_vvc_decoder_va.h" +#include + #define __UMC_VVC_VA_PACKER_H @@ -70,4 +71,4 @@ namespace UMC_VVC_DECODER #endif /* __UMC_VVC_VA_PACKER_H */ -#endif // MFX_ENABLE_VVC_VIDEO_DECODE \ No newline at end of file +#endif // MFX_ENABLE_VVC_VIDEO_DECODE diff --git a/_studio/shared/umc/codec/vvc_dec/src/umc_vvc_va_packer_vaapi.cpp b/_studio/shared/umc/codec/vvc_dec/src/umc_vvc_va_packer_vaapi.cpp index a05bfcd926..c622cba2db 100644 --- a/_studio/shared/umc/codec/vvc_dec/src/umc_vvc_va_packer_vaapi.cpp +++ b/_studio/shared/umc/codec/vvc_dec/src/umc_vvc_va_packer_vaapi.cpp @@ -228,20 +228,20 @@ namespace UMC_VVC_DECODER throw vvc_exception(UMC::UMC_ERR_NULL_PTR); uint32_t tile_count = pPicParamSet->pps_num_exp_tile_columns_minus1 + pPicParamSet->pps_num_exp_tile_rows_minus1 + 2; UMC::UMCVACompBuffer* compBufTile = nullptr; - auto pTileParam = reinterpret_cast(m_va->GetCompBuffer(VATileBufferType, &compBufTile,sizeof(VATileVVC) * tile_count)); - if (!pTileParam || !compBufTile || (compBufTile->GetBufferSize() < sizeof(VATileVVC))) + auto pTileParam = reinterpret_cast(m_va->GetCompBuffer(VATileBufferType, &compBufTile,sizeof(uint16_t) * tile_count)); + if (!pTileParam || !compBufTile || (compBufTile->GetBufferSize() < sizeof(uint16_t))) throw vvc_exception(MFX_ERR_MEMORY_ALLOC); - memset(pTileParam, 0, sizeof(VATileVVC) * tile_count); + memset(pTileParam, 0, sizeof(uint16_t) * tile_count); for (uint32_t i = 0; i < tile_count; i++) { if (i < pPicParamSet->pps_num_exp_tile_columns_minus1 + 1) { - pTileParam->tile_dimension = (uint16_t)pPicParamSet->pps_tile_column_width[i] - 1; //check pps_tile_column_width_minus1 + *pTileParam = (uint16_t)pPicParamSet->pps_tile_column_width[i] - 1; //check pps_tile_column_width_minus1 } else { - pTileParam->tile_dimension = (uint16_t)pPicParamSet->pps_tile_row_height[i - pPicParamSet->pps_num_exp_tile_columns_minus1 - 1] - 1; + *pTileParam = (uint16_t)pPicParamSet->pps_tile_row_height[i - pPicParamSet->pps_num_exp_tile_columns_minus1 - 1] - 1; } pTileParam++; } @@ -969,4 +969,4 @@ namespace UMC_VVC_DECODER #endif // UMC_RESTRICTED_CODE_VA -#endif // MFX_ENABLE_VVC_VIDEO_DECODE \ No newline at end of file +#endif // MFX_ENABLE_VVC_VIDEO_DECODE diff --git a/_studio/shared/umc/io/umc_va/src/umc_va_linux.cpp b/_studio/shared/umc/io/umc_va/src/umc_va_linux.cpp index 37b8565fed..f59f785c0e 100644 --- a/_studio/shared/umc/io/umc_va/src/umc_va_linux.cpp +++ b/_studio/shared/umc/io/umc_va/src/umc_va_linux.cpp @@ -27,6 +27,7 @@ #include "mfx_trace.h" #include "umc_frame_allocator.h" #include "mfxstructures.h" +#include #define UMC_VA_NUM_OF_COMP_BUFFERS 8 #define UMC_VA_DECODE_STREAM_OUT_ENABLE 2 @@ -806,8 +807,8 @@ VACompBuffer* LinuxVideoAccelerator::GetCompBufferHW(int32_t type, int32_t size, #if defined(MFX_ENABLE_VVC_VIDEO_DECODE) case UMC::VA_VVC: case UMC::VA_VVC | UMC::VA_PROFILE_10: - va_size = sizeof(UMC_VVC_DECODER::VASliceParameterBufferVVC); - va_num_elements = size/sizeof(UMC_VVC_DECODER::VASliceParameterBufferVVC); + va_size = sizeof(VASliceParameterBufferVVC); + va_num_elements = size/sizeof(VASliceParameterBufferVVC); break; #endif default: @@ -821,33 +822,33 @@ VACompBuffer* LinuxVideoAccelerator::GetCompBufferHW(int32_t type, int32_t size, { if( VATileBufferType == va_type) { - va_size = sizeof(UMC_VVC_DECODER::VATileVVC); - va_num_elements = size/sizeof(UMC_VVC_DECODER::VATileVVC); + va_size = sizeof(uint16_t); + va_num_elements = size/sizeof(uint16_t); } else if( VAAlfBufferType == va_type) { - va_size = sizeof(UMC_VVC_DECODER::VAAlfDataVVC); - va_num_elements = size/sizeof(UMC_VVC_DECODER::VAAlfDataVVC); + va_size = sizeof(VAAlfDataVVC); + va_num_elements = size/sizeof(VAAlfDataVVC); } else if( VALmcsBufferType == va_type) { - va_size = sizeof(UMC_VVC_DECODER::VALmcsDataVVC); - va_num_elements = size/sizeof(UMC_VVC_DECODER::VALmcsDataVVC); + va_size = sizeof(VALmcsDataVVC); + va_num_elements = size/sizeof(VALmcsDataVVC); } else if( VAIQMatrixBufferType == va_type) { - va_size = sizeof(UMC_VVC_DECODER::VAScalingListVVC); - va_num_elements = size/sizeof(UMC_VVC_DECODER::VAScalingListVVC); + va_size = sizeof(VAScalingListVVC); + va_num_elements = size/sizeof(VAScalingListVVC); } else if( VASliceStructBufferType == va_type) { - va_size = sizeof(UMC_VVC_DECODER::VASliceStructVVC); - va_num_elements = size/sizeof(UMC_VVC_DECODER::VASliceStructVVC); + va_size = sizeof(VASliceStructVVC); + va_num_elements = size/sizeof(VASliceStructVVC); } else if(VASubPicBufferType == va_type) { - va_size = sizeof(UMC_VVC_DECODER::VASubPicVVC); - va_num_elements = size/sizeof(UMC_VVC_DECODER::VASubPicVVC); + va_size = sizeof(VASubPicVVC); + va_num_elements = size/sizeof(VASubPicVVC); } else {