Skip to content

Commit

Permalink
[Decode] Remove vvc private headers
Browse files Browse the repository at this point in the history
Switch to public vvc headers in libva release
  • Loading branch information
Jexu authored and gfxVPLsdm committed Jul 15, 2024
1 parent 17c607d commit 910427d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@

#ifndef __UMC_VVC_VA_PACKER_H

#include "umc_vvc_va_private.h"
#include "umc_vvc_decoder_va.h"

#include <va/va_dec_vvc.h>

#define __UMC_VVC_VA_PACKER_H


Expand Down Expand Up @@ -70,4 +71,4 @@ namespace UMC_VVC_DECODER


#endif /* __UMC_VVC_VA_PACKER_H */
#endif // MFX_ENABLE_VVC_VIDEO_DECODE
#endif // MFX_ENABLE_VVC_VIDEO_DECODE
12 changes: 6 additions & 6 deletions _studio/shared/umc/codec/vvc_dec/src/umc_vvc_va_packer_vaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<VATileVVC*>(m_va->GetCompBuffer(VATileBufferType, &compBufTile,sizeof(VATileVVC) * tile_count));
if (!pTileParam || !compBufTile || (compBufTile->GetBufferSize() < sizeof(VATileVVC)))
auto pTileParam = reinterpret_cast<uint16_t*>(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++;
}
Expand Down Expand Up @@ -969,4 +969,4 @@ namespace UMC_VVC_DECODER

#endif // UMC_RESTRICTED_CODE_VA

#endif // MFX_ENABLE_VVC_VIDEO_DECODE
#endif // MFX_ENABLE_VVC_VIDEO_DECODE
29 changes: 15 additions & 14 deletions _studio/shared/umc/io/umc_va/src/umc_va_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "mfx_trace.h"
#include "umc_frame_allocator.h"
#include "mfxstructures.h"
#include <va/va_dec_vvc.h>

#define UMC_VA_NUM_OF_COMP_BUFFERS 8
#define UMC_VA_DECODE_STREAM_OUT_ENABLE 2
Expand Down Expand Up @@ -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:
Expand All @@ -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
{
Expand Down

0 comments on commit 910427d

Please sign in to comment.