Increment u2_cur_slice_num only if current slice had atleast
one MB of memory left.
Test: clusterfuzz generated poc in bug
Bug: b/182152757
Bug: b/179938345
Bug: b/185112718
Change-Id: Ic5eb07e961bccb7fde954bcfd791fd879804e335
reset ps_dec->i4_prev_max_display_seq if out of int32 range
to avoid overflow
Bug: 143791121
Bug: 143791161
Bug: 170737173
Test: POC in bug description
Merged-In: I3d8df556b003a7c739716bb33262ab3a6ca7b2d9
Change-Id: I3d8df556b003a7c739716bb33262ab3a6ca7b2d9
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
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
Currently frame_decoded was set to 1 after first field was decoded
This field in output wasn't used so far, hence no issue was seen till
now.
Bug: 135146280
Test: poc in bug
Change-Id: I90e20134258d828107adf43b5b3e37d4bd375cbd
If lt_list and st_list point to same node then delete it from st.
If there is error while adding a node in bottom field of lt_list (top is
already added) then this node will be pointed by st_list also. So we need
to remove it from st_list
bug: 73552574
Test: poc before/after on Android N security branch
Change-Id: I95304c242c5854b18c5c7220d114ce6215760124
SKIP_P and SKIP_PB support was experimental and is not used
in libstagefright
Bug: 130541597
Test: poc in bug
Change-Id: If13b435e80d13d57de2fee0aa07ea7e6abca481b
Also void->word32 return type so failure can be signaled to caller.
Bug: 115743419
Test: vendor + poc
Change-Id: I0a07ac11255c2c672803aab7085824c417bde282
In intra_pred_ref_filtering function, initialize the values
of array au1_ngbr_pels to zero and in ih264d_parse_decode_slice
function, initialize the values of struct s_tmp_poc to zero.
Bug: 111762686
Test: vendor
Change-Id: Iac67f5e7d24f821627de64c8570f4be648c296c8
Prev_max_display_seq accumulates max_poc, which results in integer overflow.
Resetting it to zero whenever overflow occurs.
Bug: 73337834
Test: boot
Change-Id: Ia3f6d30f1a6e7fac05d073e30e38ce2ca4e4f52a
The u1_top_bottom_decoded flag in the decoder context has been fixed
to be updated correctly in the case of dangling field
Bug: 63315932
Test: ran POC after patching
Change-Id: I8db4ebeb94fba735ba45f365c37e52a202ea84cd
Increased allocation to include reference list1 also by
default. In the case of error, we could get B_SLICES
even in BASE_PROFILE. The initialization in the
dec_slice_struct_t slice structure has also been
modified accordingly.
Test: run poc with and without this patch
Bug: 38496660
Change-Id: I3451d79bbcd9f0d7a80981a9897f877b7f0812bd
When the first frame is a B frame, the colocated picture
will now point to the current frame.
Test: run poc with and without this patch
Bug: 38115076
Change-Id: I48a8f128740551d6a9252931dafcf8c629ecad0d
The output buffer size given by the application, needs to be checked
in every process call. This is required in the case of resolution
change.
Bug: 36006815
Test: avcdec -i poc.bin
Change-Id: I16a92cdad23eb7b1e12c1a67c1b2599204f29249
Reference list needs to be initialized for every P/B
slice, to ensure colocated picture always points to a
valid picture buffer, even in the case of error.
Bug: 36279112
Change-Id: I051d7e725b0af209cc7bb333db8da3518adf78a0
Fixed initialization of flag u1_top_bottom_decoded
in decoder context. This flag indicates if top
field and botton field is decoded.
Bug: 36993291
Test: avcdec --input poc.h264 --output /dev/null
Change-Id: I9f8a2620683abd8b15e4780d76d4849394710716
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
ih264d_end_of_pic() was called after parsing slice of a new picture.
This is now being done at the end of decode of the current picture.
decode_gaps_in_frame_num which needs frame_num of new slice is now
done after decoding frame_num in new slice.
This helps in handling errors in picaff streams with gaps in frames
Bug: 33588051
Bug: 33641588
Bug: 34097231
Change-Id: I1a26e611aaa2c19e2043e05a210849bd21b22220
This is needed to decode streams with consecutive IDRs.
Bug: 34097231
Test: successful run of POC in security bug
Change-Id: Ib737a4ef4b8c5bb7a57c90292102dd28af0615fe