When the input does not contain PPS and decoder is in header decode
mode, decoder was entering an infinite loop.
Bug: 33621215
(cherry picked from commit 33e1b190d6db09bd72a9f0f51acef4b14eabd6ff)
Invalid SPS Id read was resulting in an out of bound read
Bug: 33552073
Change-Id: Ie5b80222fc7ac3a64475340371be0facdf999d7b
(cherry picked from commit d3d60c6a5d7ab605d19b9ac4b95bc227b7b870dc)
At the end of picture processing, if the current pic is partially
decoded, number of MBs to be processed was wrongly calculated for
interlaced cases.
Bug: 33129467
Change-Id: Ia81186c60d346f02663607f2dc14166781db6a69
ih264d_deblock_display() should be called only if current
decoder call has got a picture buffer during start of pic
Bug: 33751193
Change-Id: I3bf2fdbb910bf7240484dae48b85d72833830d56
When number of MBs decoded in the current frame is zero and an error is
detected, MB info was unnecessarily decremented in multi-core case.
Bug: 33351708
Bug: 33298089
Bug: 33250932
Change-Id: I150c48c6fb382736f1de855ba5384c12bf84710d
In case of MBAff clips, if error is detected after parsing odd MB,
then treat that odd MB also as error. All MBAff processing is done
as an MB-Pair.
Bug: 33298089
In case a slice start code is found and picture decode is not complete
and a non slice NAL is encountered, then mark the current pic as incomplete
Bug: 33250932
Bug: 33139050
Change-Id: I9db4446338b307310805dba90c60c8cbdeee0739
ps_dpb_mgr->ps_dpb_ht_head is a linked list with
ps_dpb_mgr->u1_num_lt_ref_bufs number of valid buffers.
So ps_next_dbp has to be initialized to ps_dpb_mgr->ps_dpb_ht_head
for each u1_lt_index loop iteration
Bug: 33387820
Change-Id: I2dfd962bad5640a829afc123adbd0709e563e621
Apart from Baseline, main and high profile, only extended profile
is supported provided, constraint_set0_flag or constraint_set1_flag are set to 1
Bug: 31999646
Change-Id: I3b62069efc49e222a7126fba0805fa9124aac8f2
Ignore dpb errors, where decoder fails to release a non-existing picture
from reference lists. This is needed to decode streams where few pictures
are missing.
Change-Id: I8ece68cb1fa22473029e16158cd86ce7a197027a
For MBs which are in error, set u1_long_term_reference_flag to zero.
This ensures latest frame is used for concealment
Bug: 28470138
Change-Id: I58eab5bc1da277823f3dbb4103ba50867f8935dc
Also memset ps_dec_op structure to zero.
For error input, this ensures dimensions are initialized to zero
Bug: 28165661
Change-Id: I66eb2ddc5e02e74b7ff04da5f749443920f37141
In case of error in handling MMCO commpands/reference list creation,
ih264d_start_of_pic() was called again in ih264d_mark_err_slice_skip() resulting in
leaking a picture or an MV buffer in buffer manager.
To fix this, ensure prev_slice_err is set to 1 only if u4_pic_buf_got is zero, before
calling ih264d_mark_err_slice_skip() at the end of picture decode.
This will ensure ih264d_start_of_pic() is not repeated
Bug: 25818142
Change-Id: I7d5a9179533581eec663bc6a19a2901e7cce6af3
Added support to check num_ref_frames in SPS
and num_reorder_frames in VUI before returning error for level
Bug: 22860270
Change-Id: I392bab419385ca239836d200f9f2b064915a8a46
The slice header structure has now been initialized to 0
Fixed bug in closing of threads in the case of error.
Bug: 22860270
Change-Id: I777e0b73ad2f083c72be179984f5c1cb00ededb6
This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.
Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
Don't do concatenation with strncat; the length parameter in strncat
is only for how many chars to append at most, not for the full output
buffer size. To safely use strncat, one would have to do
strncat(buf, str, sizeof(buf) - strlen(buf)).
By using snprintf, we guarantee that the buffer is null terminated, and
we don't need to use strnlen at all.
(If compatibility with older MSVC versions that lack snprintf, one
can use _snprintf instead and manually add the null termination.)
Change-Id: I1c2322c7a406ddd5e6551a96c460da60deeffda1
The ithread_exit wrapper function behaves inconsistently across
platforms; on windows, the argument is a thread handle, denoting
the thread that will be exited. On pthreads, ithread_exit only
terminates the current thread, not any other thread.
These both calls are at the end of each thread function (and the one
with a non-null parameter refers to the handle of the thread itself),
so the thread will exit immediately anyway.
Change-Id: I21e43c56874729452bd80b28ff351e3c5d3f087e