Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f82125fa authored by Eric (Quic's avatar Eric (Quic Committed by Steve Kondik
Browse files

libvideoeditor: use vWidth and vHeight for buffer allocation

Change-Id: I2ab01b8ef79a3ad9b1eb737b2e9f1211a6e668c2
 - video editor detects crop information from decoder, crop
   width and height will override metadata width and height.
 - decoder is capable of sending crop information where
   crop width and height are smaller than actual resolution.
 - use actual metadata width and height for calculating
   buffer size.
CRs-Fixed: 452511
parent 1e8bf6f8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -827,11 +827,16 @@ M4OSA_ERR VideoEditorVideoDecoder_configureFromMetadata(M4OSA_Context pContext,

    pDecShellContext->mCropRect.left = cropLeft;
    pDecShellContext->mCropRect.right = cropRight;
#ifdef QCOM_HARDWARE
    pDecShellContext->mCropRect.top = cropTop;
    pDecShellContext->mCropRect.bottom = cropBottom;

#else
    width = cropRight - cropLeft + 1;
    height = cropBottom - cropTop + 1;
#endif

    width = vWidth;
    height = vHeight;

    ALOGV("VideoDecoder_configureFromMetadata : W=%d H=%d", width, height);
    VIDEOEDITOR_CHECK((0 != width) && (0 != height), M4ERR_PARAMETER);