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
gugelfrei
Shuzhen Wang 5 years ago
parent 0295125624
commit 0ca8152738

@ -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);

Loading…
Cancel
Save