Skip to content

Commit

Permalink
[Encode] memset EncodedBitstreamWrittenBytesCount metadata for av1
Browse files Browse the repository at this point in the history
To prevent the app from not updating the metadata buffer, add a handle to the media driver.
  • Loading branch information
WangLy-ada authored and intel-mediadev committed Aug 6, 2024
1 parent 019772d commit a599dc7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1887,8 +1887,13 @@ namespace encode{
m_basicFeature->m_numSlices = tileNum;
auto &miCpyMemMemParams = m_miItf->MHW_GETPAR_F(MI_COPY_MEM_MEM)();
auto &storeDataParams = m_miItf->MHW_GETPAR_F(MI_STORE_DATA_IMM)();

//memeset EncodedBitstreamWrittenBytesCount
storeDataParams = {};
storeDataParams.pOsResource = m_basicFeature->m_resMetadataBuffer;
storeDataParams.dwResourceOffset = resourceOffset.dwEncodedBitstreamWrittenBytesCount;
storeDataParams.dwValue = 0;
ENCODE_CHK_STATUS_RETURN(m_miItf->MHW_ADDCMD_F(MI_STORE_DATA_IMM)(cmdBuffer));

for (uint32_t tileIdx = 0; tileIdx < tileNum; tileIdx++)
{
Expand Down

0 comments on commit a599dc7

Please sign in to comment.