In avc MaxFrameNum can be 65536 which is of 17 bits due to which
interger overflow was happening for i2_max_frm_num and
ui_max_frame_num. This has been fixed.
Bug: 369676522
Test: poc in bug description
Change-Id: I858eea6bf8eea1e2cee6d4a7c28a84705eb51792
- Add SII flag and SII parameters for the encoder and decoder.
- Encoder: Added support for SII SEI
- Decoder: Added support for SII SEI parsing and exporting
- Set CMAKE_C_STANDARD to 90
Because of this, moved some declarations to start of the block
- Move PROFILE_ENABLE and MD5_DISABLE to specific targets as these
macros are not used when building libraries
Bug: 242076773
Test: Builds
Change-Id: Icd0b8a48f015a695185ce2220800348f7a7512f1
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