Browse Source

Merge branch 'CR_7343_OMX_Som.Qin' into 'jh7110-devel'

CR 7343 OMX: Fix decoder dma buffer unconsistency

See merge request sdk/soft_3rdpart!68
andy.hu 7 months ago
parent
commit
6a5b704b46
1 changed files with 4 additions and 0 deletions
  1. 4 0
      wave511/code/vpuapi/vpuapi.c

+ 4 - 0
wave511/code/vpuapi/vpuapi.c

@@ -1698,6 +1698,7 @@ RetCode VPU_DecClrDispFlag(DecHandle handle, int index)
     RetCode     ret         = RETCODE_SUCCESS;
     Int32       endIndex, SvacSvcFlag;
     VpuAttr*    pAttr       = NULL;
+    FrameBuffer* pBuffer    = NULL;
     BOOL        supportCommandQueue;
 
     ret = CheckDecInstanceValidity(handle);
@@ -1716,6 +1717,9 @@ RetCode VPU_DecClrDispFlag(DecHandle handle, int index)
         return RETCODE_INVALID_PARAM;
     }
 
+    pBuffer = &pDecInfo->frameBufPool[pDecInfo->numFbsForDecoding + index];
+    vdi_flush_ddr(pCodecInst->coreIdx, pBuffer->bufY, pBuffer->size, 1);
+
     supportCommandQueue = (pAttr->supportCommandQueue == TRUE);
     if (supportCommandQueue == TRUE) {
         EnterLock(pCodecInst->coreIdx);