FROMGIT: [Encode] Fix for flags in PAK_OBJECT_INSERT command

During HW JPEG encode on devices using iHD media driver, whenever,
application data is split into several payloads for AddMfxInsertObject
and appDataSizeResidue is 0, first payload is marked as end of slice
irrespective of pending application data so, when the next payload
requests AddMfxInsertObject, gpu hang is observed. This patch ensures
that only last payload is marked as last header/end of slice so, gpu
hang issue will be resolved.

cherry picked from commit -

BUG=b:171340559, b:171369066
TEST=After reverting and, capture pictures continuously using camera application for few minutes

Signed-off-by: Sushma Venkatesh Reddy <>
Change-Id: Ibd19e3135ea569524f1743b0e63bc6b4c6ac6a0c
Commit-Queue: Andres Calderon Jaramillo <>
Reviewed-by: Andres Calderon Jaramillo <>
3 files changed