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

Commit e4f67224 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "CCodec: workaround for frame drops" am: 7faece20 am: 92419353

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1540553

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I15def6ceaa5c9779480304c30a49d2b3333c118a
parents 309519f1 92419353
Loading
Loading
Loading
Loading
+14 −9
Original line number Original line Diff line number Diff line
@@ -247,7 +247,11 @@ public:
            return NO_INIT;
            return NO_INIT;
        }
        }


        size_t numSlots = 4;
        size_t numSlots = 16;
        // WORKAROUND: having more slots improve performance while consuming
        // more memory. This is a temporary workaround to reduce memory for
        // larger-than-4K scenario.
        if (mWidth * mHeight > 4096 * 2340) {
            constexpr OMX_U32 kPortIndexInput = 0;
            constexpr OMX_U32 kPortIndexInput = 0;


            OMX_PARAM_PORTDEFINITIONTYPE param;
            OMX_PARAM_PORTDEFINITIONTYPE param;
@@ -257,6 +261,7 @@ public:
            if (err == OK) {
            if (err == OK) {
                numSlots = param.nBufferCountActual;
                numSlots = param.nBufferCountActual;
            }
            }
        }


        for (size_t i = 0; i < numSlots; ++i) {
        for (size_t i = 0; i < numSlots; ++i) {
            source->onInputBufferAdded(i);
            source->onInputBufferAdded(i);