This is needed to decode streams with consecutive IDRs.
Bug: 34097231
Test: successful run of POC in security bug
Change-Id: Ib737a4ef4b8c5bb7a57c90292102dd28af0615fe
[this is for mnc-dev only, not any other mnc-*-dev flavors;
there is a different patch for mnc-dr-dev, nyc-* and going forward]
After emulation prevention, data is written as an int,
so at least 3 additional bytes should be available.
And since bitstream functions read 8 bytes ahead, 8 extra bytes
should be available in the bitstream buffer.
Bug: 33934721
Test: Ittiam testing, POC in the bug no longer fails
Change-Id: I444ec6f85d01b0bade9f827e15c4b476779d6c69
Reference buffer is now initialized to default value for
each pic before decoding the first slice in the pic
Bug: 34097866
Change-Id: Id64b123af2188217ce833f11db0e6c0681d41dfd
In case of MBAFF streams, slices should terminate on
even MB boundary. If bytes are exhausted with odd number
of MBs decoded for MBAff, then treat that as error.
Bug: 33933140
Change-Id: Ifc26b66ff8ebdb3aec5c0d6c512e4cac3f54c5b7
[for mnc-dr-dev and later; mnc-dev gets a different patch]
After emulation prevention, data is written as an int,
so at least 3 additional bytes should be available.
And since bitstream functions read 8 bytes ahead, 8 extra bytes
should be available in the bitstream buffer.
Bug: 33934721
Change-Id: I444ec6f85d01b0bade9f827e15c4b476779d6c69
Also, increment slice header only if previous slice had atleast one MB
This is to ensure there is no out of bound read for streams with 1 MB, and
due to error 2 slices were being accessed.
Bug: 33982658
Change-Id: I5f1918c09e922ca39f495f6059dfea3fa1d49448
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
This needs an additional row of data to hold top row
Issue is seen only for MBAff error cases which start with a field
at lower resolutions
Bug: 33139050
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