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
Passed error and standard compliance tests with integer and address sanitizers.
Bug: 143791063
Test: POC in bug description
Change-Id: Idbba64cfb397b8af3ccd5770ce115fadd0d9112c
reset ps_dec->i4_prev_max_display_seq if out of int32 range
to avoid overflow
Bug: 143791121
Bug: 143791161
Test: POC in bug description
Change-Id: I3d8df556b003a7c739716bb33262ab3a6ca7b2d9
When cropping is enabled, application can request a stride that
is larger than display width but smaller than decode width.
Bug: 160397536
Test: stagefright -sS <clip in bug>
Change-Id: I453b2de0474f3ae4d021084729c33d52fc1090dc
Add checks to validate long term index and
max long term index parsed in MMCO commands.
Bug: 140358770
Bug: 140680655
Bug: 148772548
Bug: 152148135
Bug: 152434373
Bug: 152550528
Test: poc in bug
Change-Id: I9052ce7721491fdd5fb4807ec33e399cee8c70cf
This reverts commit f76370c671.
Reason: This breaks interlaced clips which are sent one field at a time
C2 plugin for avc decoder is now updated to appropriately handle both
types of interlaced content, i.e. sent as one field per one input buffer
and sent as two fields per one input
Bug: 135146280
Bug: 152087140
Test: poc in bugs
Test: atest android.media.cts.DecoderTest
Change-Id: Ic79d13a4bd93573767c86ed31264e8780da8d9a5
When removing common nodes from short term list if it present in long
term reference list, number of long term buffers was wrongly
incremented. Only decrement of short term buffer count is needed in
such a case.
Bug: 140561484
Bug: 140566606
Bug: 140699853
Bug: 144980954
Bug: 145859214
Test: poc in bug
Change-Id: Iebf7ee7ed65e7b2097a899577982806b03fc6e5d
When decoder is expecting to decode a field, ensure current slice
being decoded is a field and frame number matches with previous slice's
frame number.
Bug: 144687080
Test: poc in bug
Change-Id: I89d9d7b6fc26797de0420ecb0ca7e66b066aa908
While adding the decoded buffer to display queue, allow buffer with
poc set to 0x7FFFFFFF
Bug: 145364230
Test: poc in bug
Change-Id: I2a15f73b8422cfa4fd3360bc21c0cea4542a3375
Earlier these were only initialized during static buffer allocations.
Initializing them in init_decoder() will ensure that these get
initialized to default values during reset() as well. Without this,
in some error cases, there is a possibility of heap-use-after free,
when resolution changes and these pointers point to memory that is freed
Bug: 142602711
Test: poc in bug
Change-Id: Ie39fee0eca56bf32cdc558099bf167d05eb89620
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
Instead of looping through all poc/pic numbers with an increment
of 1, loop through only valid poc/pic numbers after sorting them.
This prevents integer overflows when poc/pic number is INT32_MIN or
INT32_MAX
This also fixes a timeout issue seen when integer sanitizers are
not enabled
Bug: 135303936
Bug: 136568141
Bug: 141276890
Test: poc in bug
Change-Id: I5db80dd8e811cbb1a9ecd00363fac997551ccaf5
Added support for returning reorder_depth for frames in decode order.
Bug: 138627015
Test: Verify reorder_depth returned for few clips
Change-Id: I9b68a9544d7d011cf93dfccd308c754b8e16e39e