vdec: Remove DPB plane size alignment calculation dependency
[GitHub/LineageOS/android_hardware_samsung_slsi_openmax.git] / component / video / dec / h264 / Exynos_OMX_H264dec.c
index 5253f74adffaeb47ba18fd396e60b802cbd17676..c73be2550081653591a4cf0d42292db76cbd6057 100644 (file)
@@ -1045,10 +1045,8 @@ OMX_ERRORTYPE H264CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
     OMX_U32 dataLen[MFC_OUTPUT_BUFFER_PLANE] = {0, 0};
     int plane;
 
-    nAllocLen[0] = calc_plane(pH264Dec->hMFCH264Handle.codecOutbufConf.nFrameWidth,
-                        pH264Dec->hMFCH264Handle.codecOutbufConf.nFrameHeight);
-    nAllocLen[1] = calc_plane(pH264Dec->hMFCH264Handle.codecOutbufConf.nFrameWidth,
-                        pH264Dec->hMFCH264Handle.codecOutbufConf.nFrameHeight >> 1);
+    nAllocLen[0] = pH264Dec->hMFCH264Handle.codecOutbufConf.nAlignPlaneSize[0];
+    nAllocLen[1] = pH264Dec->hMFCH264Handle.codecOutbufConf.nAlignPlaneSize[1];
 
     if (pExynosOutputPort->bufferProcessType & BUFFER_COPY) {
         ret = Exynos_Allocate_CodecBuffers(pOMXComponent, OUTPUT_PORT_INDEX, nOutbufs, nAllocLen);