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

Commit 0ca81527 authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera2: Heic: Reduce FRAME_RATE in case no grid is used

Only set FRAME_RATE to grid counts in case grid is used. In case grid is
not used (for example, in HEIC encoder case), set it to a predefined
value.

Test: Vendor testing
Bug: 140249376
Change-Id: I6b32bd435aa38f05004710ba667807ca841e4a5e
parent 02951256
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1210,7 +1210,7 @@ status_t HeicCompositeStream::initializeCodec(uint32_t width, uint32_t height,
    outputFormat->setInt32(KEY_I_FRAME_INTERVAL, 0);
    outputFormat->setInt32(KEY_COLOR_FORMAT,
            useGrid ? COLOR_FormatYUV420Flexible : COLOR_FormatSurface);
    outputFormat->setInt32(KEY_FRAME_RATE, gridRows * gridCols);
    outputFormat->setInt32(KEY_FRAME_RATE, useGrid ? gridRows * gridCols : kNoGridOpRate);
    // This only serves as a hint to encoder when encoding is not real-time.
    outputFormat->setInt32(KEY_OPERATING_RATE, useGrid ? kGridOpRate : kNoGridOpRate);