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

Commit 1caa26ba 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 am: e4f67224

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id4d8cc0f6d35220a986bd6523039d0015542e29b
parents a54c05e5 e4f67224
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
@@ -247,7 +247,11 @@ public:
            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;

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

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