android: jpeg: Support multi-planar buffers
The JPEG post-processor uses MappedFrameBuffer to access pixel data, but only uses data from the first plane. Pass the vector of planes to the encode() function to correctly handle multi-planar formats (currently limited to NV12). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
2dca2b2fc6
commit
894ca69f60
4 changed files with 20 additions and 14 deletions
|
@ -72,7 +72,7 @@ void PostProcessorJpeg::generateThumbnail(const FrameBuffer &source,
|
|||
*/
|
||||
thumbnail->resize(rawThumbnail.size());
|
||||
|
||||
int jpeg_size = thumbnailEncoder_.encode(rawThumbnail,
|
||||
int jpeg_size = thumbnailEncoder_.encode({ rawThumbnail },
|
||||
*thumbnail, {}, quality);
|
||||
thumbnail->resize(jpeg_size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue