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

Commit 0f6b61d3 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

CCodec: workaround for frame drops

Retain old behavior for lower resolution (<=4K) to workaround
possible frame drops.

Bug: 175354926
Bug: 175182085
Test: atest CtsCameraTestCases:RecordingTest
Change-Id: I170102e928714c5b48817bf7915f55ce8a6280f0
parent b572b63b
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);