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

Commit 7faece20 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "CCodec: workaround for frame drops"

parents 932a856c 0f6b61d3
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);