Decoder returns output with an additional latency of 2.
reorder depth retured is now updated to account for this extra latency
Also move reorder_depth initialization to parse_sps()
Instead of initializing reorder_depth after decoding first picture,
initialize it in parse_sps().
Bug: 163127030
Test: poc in bug
Test: atest android.mediav2.cts
Change-Id: I94b35b2c5df5c910d0159548b168617946a19cc2
Error checks for syntax elements related to QP,
luma and chroma prediction weights have been modified
to fix overflow
Bug: 136568141
Bug: 143801227
Bug: 143791288
Test: POC in bug description
Change-Id: I88e886ba4bcda69079f1b0a8344005fe1aa51366
Fix bitstream buffer overflow in the function
ih264d_parse_sei_message
Bug: 152895390
Test: POC in bug
Change-Id: I41ff1f7b2834c2d09e546b8e3d37e4cd4abfa28d
This commit add support for encoding and decoding of MDCV, CLL, CCV and
AVE SEI messages
Test: avcenc -c enc.cfg, avcdec -c dec.cfg
Bug: 141931623
Change-Id: Idc0b0db5291482ae2bc19cdff65669c32374b02a
Return error to application if valid sps or pps has not been decoded.
Also add check to prevent parsing of pps, if valid sps is not present.
Test: Tested a few clips with missing sps/pps
Bug: 129746168
Bug: 130575087
Change-Id: I1a6409d1cffc66c1b910d2102ab10a94e0227107
This will ensure clips with supported bitdepth or unsupport color
formats are not attempted to be decoded till end of the sequence.
Bug: 130578045
Test: adb shell stagefright -s -S /sdcard/crowd422_h264.mp4
Test: Ensure decoder doesn't attemp decoding all frames
Change-Id: I118ef2141f77986f6ec65c91dfeaa7ef17646c43
IVD_RES_CHANGED was not signaled when crop parameters changed, i.e.
display dimensions changed without change in decode dimensions.
In such cases, if output buffer was allocated as per the current
dimension being decoded, without IVD_RES_CHANGED signalled, there can be
an OOB write if the new buffer is smaller than the frame being returned
as output
Bug: 118399205
Test: vendor
Change-Id: Ia750a99cda08a3254a6f8ea8b55d07e655b34d05
Change in Mbaff flag needs re-initialization of NMB group
and other variables in decoder context.
Bug: 64380237
Test: ran poc on ASAN before/after
Change-Id: I0fc65e4dfc3cc2c15528ec52da1782ecec61feab
ih264d_allocate_dynamic_bufs is now called only once
after every ih264d_init_decoder call. This is possible
since we support only identical( all the critical
parameters will be same) sps in our sps array.
Signal resolution change when u1_frame_mbs_only_flag
in SPS changes.
Bug: 62897300
Test: compilation, boot
Change-Id: I0cf71fe9de72b5dadca2d1daf881d821786f94e3
The sps parameters used to detect change in
resolution/sps were incorrect. Made a fix to
use current sps from decoder context.
Bug: 38239864
Change-Id: I2d110e635ced32b3dc7f364e08a97d672fcbae37
(cherry picked from commit 8c6fe35f6d)
Postponed the initializations to decoder context
till the end of the parse sps function, after
all the error checks are done.
Bug: 37968755
Test: ran poc on ASAN-enabled build before/after
Change-Id: Ibee3383c28cede3edb68d2459565d6ce10683bbd
If resolution changes within a decode call,due to multiple
sps, the decoder hangs as the the application will
give the same data again in the next decode call. This
results in a hang. Fixed this by flaging an error,
when sps/resoultion changes within a process call.
Bug: 38487564
Test: ran POC on patched O-based system w/o hanging
Change-Id: I30095b2e8bf573c1a58a316a23b1a5e6a4af589b
The sps parameters used to detect change in
resolution/sps were incorrect. Made a fix to
use current sps from decoder context.
Bug: 38239864
Change-Id: I2d110e635ced32b3dc7f364e08a97d672fcbae37
Postponed the initializations to decoder context
till the end of the parse sps function, after
all the error checks are done.
Bug: 37968755
Test: ran poc on ASAN-enabled build before/after
Change-Id: Ibee3383c28cede3edb68d2459565d6ce10683bbd
Modifies how i4_header_decoded is decoder context is used, to ensure
that resolution change is detected even if PPS has not been decoded.
This retrofits parts of the below mentioned 'merged-in' commits
which solve this for mnc-dr and later versions of the library. The retrofit
required dropping portions that affected code introduced in a later baseline.
Bug: 35583675
Test: provided input file no longer hangs
Change-Id: I8fa30543759c5762b18e2380513e2ce616c858ef
Merged-In: I0d248212aaf6635f34a70ad36657416a0c623d32
Merged-In: Ifd21ebe1827d6d0c13018983c46c4301c2bb1669
Added an error check while parsing PPS syntax element
second_chroma_qp_index_offset.
Bug: 37207120
Change-Id: Icba6b7bcf5940505717ee61134ed801c221b6e26
Modified the way i4_header_decoded in decoder context
is used, to ensure that resolution change is detected
even if PPS has not been decoded.
Cherry pick of Change-Id: Ibb3f8dfbeb66a999fd81720a7d2a02dd951a55c4
which went into master post-N.
Bug: 35583675
Test: ran POC, no longer hangs
Change-Id: Ifd21ebe1827d6d0c13018983c46c4301c2bb1669
Cherry pick of Change-Id: Ifa78c3125ab207ce5e39166f4891cba0d3a4e39c
which went into master (post-n). This needed backporting to M so that
the final fix for 35583675 could be integrated.
Bug: 35583675
Test: ran POC without failure
Change-Id: I0d248212aaf6635f34a70ad36657416a0c623d32
To handle some errors, first_slice_in_pic was being set to 2.
This is now cleaned up and first_slice_in_pic is set to 1 only once per pic.
This will ensure picture level initializations are done only once even in case
of error clips
Bug: 33717589
Bug: 33551775
Bug: 33716442
Bug: 33677995
Change-Id: If341436b3cbaa724017eedddd88c2e6fac36d8ba
In case of MBAff streams, decoder processes two rows at a time,
this limits maximum supported width to 1920 for MBAff streams.
Bug: 33818508
Bug: 34013472
Change-Id: Iec2941f116cf3c36b63013a930319960023a3b42