Commit graph

78 commits

Author SHA1 Message Date
Marco Nelissen
2ee0db6b2a Merge "Handle error return from ref list in slice hdr parsing" into mnc-dev am: 8883b3e2a3 am: 667e459e3f am: 6d700817a0 am: e6e65ce177
am: 098fc089d9

Change-Id: I23b61cc167065037ce11632e6056fc453b6a0b51
2017-03-13 23:09:31 +00:00
Naveen Kumar Ponnusamy
14ca5bef56 Merge "Return error from cabac init if offset is greater than range" into lmp-dev am: 09ff5c6298 am: eef834a4d0 am: 49e9836a16 am: de6bd99214 am: ee8b0629d9 am: b6da1b1291 am: 8e0bd1fd7f
am: fb96f065c9

Change-Id: I558839aa8dc86b14411c4c4f9320a7977f22c4ed
2017-03-13 23:09:25 +00:00
Marco Nelissen
667e459e3f Merge "Handle error return from ref list in slice hdr parsing" into mnc-dev
am: 8883b3e2a3

Change-Id: I84b859bc5358e8b650871dfeb09a2563a03764eb
2017-03-13 22:56:54 +00:00
Naveen Kumar Ponnusamy
ee8b0629d9 Merge "Return error from cabac init if offset is greater than range" into lmp-dev am: 09ff5c6298 am: eef834a4d0 am: 49e9836a16
am: de6bd99214

Change-Id: I71f565ef35838dfbc31c1835b577bf4be3167add
2017-03-13 22:53:47 +00:00
Marco Nelissen
8883b3e2a3 Merge "Handle error return from ref list in slice hdr parsing" into mnc-dev 2017-03-13 22:52:41 +00:00
Naveen Kumar Ponnusamy
de6bd99214 Merge "Return error from cabac init if offset is greater than range" into lmp-dev am: 09ff5c6298 am: eef834a4d0
am: 49e9836a16

Change-Id: Ia6594900b169d3f3dfe4e767558a5f76fb77e3fd
2017-03-13 22:49:08 +00:00
Naveen Kumar Ponnusamy
eef834a4d0 Merge "Return error from cabac init if offset is greater than range" into lmp-dev
am: 09ff5c6298

Change-Id: I16f27f1643a3556273a3c5729301596b9b12e452
2017-03-13 22:40:10 +00:00
TreeHugger Robot
09ff5c6298 Merge "Return error from cabac init if offset is greater than range" into lmp-dev 2017-03-13 22:31:34 +00:00
Harish Mahendrakar
ed6770a725 Return error if SPS parsing reads more bytes than the nal length am: 232bbe1908 am: 2f206ceb72 am: c7ddfff98c am: cac2f841ae am: c30ceb1eea am: 81d057f43b am: ad7cfee8f0
am: ae08a88344

Change-Id: I74bd99870abd3700a8e652bf729fdb8f3a4cb4be
2017-03-11 00:38:33 +00:00
Harish Mahendrakar
c30ceb1eea Return error if SPS parsing reads more bytes than the nal length am: 232bbe1908 am: 2f206ceb72 am: c7ddfff98c
am: cac2f841ae

Change-Id: Ia64c6417947483e25847c147e33cc1ee7d6fa6b9
2017-03-11 00:23:32 +00:00
Harish Mahendrakar
cac2f841ae Return error if SPS parsing reads more bytes than the nal length am: 232bbe1908 am: 2f206ceb72
am: c7ddfff98c

Change-Id: I26b7a8bc565dd186f551ec1dd615c812c199fb3a
2017-03-11 00:20:02 +00:00
Harish Mahendrakar
2f206ceb72 Return error if SPS parsing reads more bytes than the nal length
am: 232bbe1908

Change-Id: I4ab8199f06050125d48e4c335fe83dbab2885dbb
2017-03-11 00:13:01 +00:00
Naveen Kumar Ponnusamy
b92314c860 Return error from cabac init if offset is greater than range
When the offset was greater than range, the bitstream was read
more than the valid range in leaf-level cabac parsing modules.
Error check was added to cabac init to fix this issue. Additionally
end of slice and slice error were signalled to suppress further
parsing of current slice.

Bug: 34897036
Change-Id: I1263f1d1219684ffa6e952c76e5a08e9a933c9d2
(cherry picked from commit 3b175da88a1807d19cdd248b74bce60e57f05c6a)
2017-03-10 14:56:09 -08:00
Naveen Kumar Ponnusamy
25206ffa6e Handle error return from ref list in slice hdr parsing
The error returned by ref_list function was not handled by the
caller parse_slice_header.

Bug: 34672748
Change-Id: I55f6cb0e651746e77f7ff3375115894ec3964203
2017-03-10 19:01:38 +00:00
Harish Mahendrakar
232bbe1908 Return error if SPS parsing reads more bytes than the nal length
Bug: 35039946

Change-Id: Ia97fa8711f313d0029d2b13e6d150d5e46b2bb99
(cherry picked from commit a6c58e18a49a1ea4929f8345b3c59f900d5813f5)
2017-03-03 11:22:24 -08:00
Marco Nelissen
a066d53106 Merge "Fix in handling wrong cu_qp_delta" into lmp-dev am: 98f9e26d24 am: 10f2b105f5 am: b4ddce56d1 am: 59b232588b am: ca85c43d8d am: fc093b18cd am: 4f28fb5344
am: 29a107d6fb

Change-Id: I25e5774e0bd95720864d4b86acae96899359a942
2017-02-14 23:11:02 +00:00
Marco Nelissen
ca85c43d8d Merge "Fix in handling wrong cu_qp_delta" into lmp-dev am: 98f9e26d24 am: 10f2b105f5 am: b4ddce56d1
am: 59b232588b

Change-Id: I327b698965d66637fbc6e5a84230caa80df01f68
2017-02-14 23:01:31 +00:00
Marco Nelissen
59b232588b Merge "Fix in handling wrong cu_qp_delta" into lmp-dev am: 98f9e26d24 am: 10f2b105f5
am: b4ddce56d1

Change-Id: I2280a7fcbd5b71ca3d6f8c0a747f4805e96caea8
2017-02-14 22:59:01 +00:00
Marco Nelissen
10f2b105f5 Merge "Fix in handling wrong cu_qp_delta" into lmp-dev
am: 98f9e26d24

Change-Id: I75f4e069f89bff32ce17e7500d308e3fc9421c0c
2017-02-14 22:54:32 +00:00
Marco Nelissen
98f9e26d24 Merge "Fix in handling wrong cu_qp_delta" into lmp-dev 2017-02-14 22:47:49 +00:00
Harish Mahendrakar
dba11e3fa8 Handle invalid num_reorder_pics & max_dec_pic_buffering in SPS am: 1ab5ce7e42 am: cb6fa6a0d4 am: f5674af080 am: b3169d93df am: 0c49980418 am: 4b4a16e22a am: 93b2398b29
am: a5596a2b1d

Change-Id: I03c132a41a95b54a73dc0d46a58a2600ab952965
2017-02-14 21:53:57 +00:00
Harish Mahendrakar
0c49980418 Handle invalid num_reorder_pics & max_dec_pic_buffering in SPS am: 1ab5ce7e42 am: cb6fa6a0d4 am: f5674af080
am: b3169d93df

Change-Id: I7c41a408e6018502208024b77f168d81e1b514d4
2017-02-14 21:43:30 +00:00
Harish Mahendrakar
b3169d93df Handle invalid num_reorder_pics & max_dec_pic_buffering in SPS am: 1ab5ce7e42 am: cb6fa6a0d4
am: f5674af080

Change-Id: Ie8e9156ead63e23579db23873a8bba10b939e144
2017-02-14 21:41:26 +00:00
Harish Mahendrakar
cb6fa6a0d4 Handle invalid num_reorder_pics & max_dec_pic_buffering in SPS
am: 1ab5ce7e42

Change-Id: I85672c5c53a450c4aa4a62577eefe0350adfefd3
2017-02-14 21:36:55 +00:00
Harish Mahendrakar
1ab5ce7e42 Handle invalid num_reorder_pics & max_dec_pic_buffering in SPS
Bug: 33864300
Change-Id: I920e45c3420a1a41a366ad45bd4186c5f6af6d6b
2017-02-13 20:21:01 +00:00
Harish Mahendrakar
01ca88bb6c Fix in handling wrong cu_qp_delta
cu_qp_delta is now checked for the range as specified in the spec
Bug: 33966031

Change-Id: I00420bf68081af92e9f2be9af7ce58d0683094ca
2017-02-13 20:18:51 +00:00
Harish Mahendrakar
0512afdf72 Added check for invalid log2_max_transform_block_size in SPS am: b5cae8181e am: 4b6511b432 am: c6bda6e3d2 am: 1a50b8aefc
am: ddb188785b

Change-Id: Ie45d90fcff42d787bf60f08cf5c31ff109f4598b
2017-01-18 18:26:43 +00:00
Harish Mahendrakar
4b6511b432 Added check for invalid log2_max_transform_block_size in SPS
am: b5cae8181e

Change-Id: I9815920b27437a30688686a74efb8a070d679751
2017-01-18 18:18:40 +00:00
Harish Mahendrakar
b5cae8181e Added check for invalid log2_max_transform_block_size in SPS
Bug: 33918236
Bug: 33964497
Bug: 33965905
Bug: 33862021
Change-Id: If121221d0f6e983c05d95d123af9bed378d1961f
2017-01-17 15:38:38 -08:00
Harish Mahendrakar
abbcb5d75e Fixed handling invalid chroma tu size for error clips am: a76773ab74 am: 8322418219 am: d337706792 am: 9b074778a1
am: ea5c7c3738

Change-Id: Ibb5a7e0bb82c54fcc7f9d332a37bf9798cd5756e
2016-12-07 00:49:47 +00:00
Harish Mahendrakar
2afdf060b2 Fixed out of bound reads in stack variables am: 4def2dfabf am: d751d3e940 am: 9f26902c1c am: ad499d9eec
am: ee2bf9b5c8

Change-Id: Ife0c86d044d25fb1a0257281c7b256f048d1a403
2016-12-07 00:49:46 +00:00
Harish Mahendrakar
8322418219 Fixed handling invalid chroma tu size for error clips
am: a76773ab74

Change-Id: I706565372e7f30ffdaaf4fc7e59d040ec59d59d5
2016-12-07 00:33:46 +00:00
Harish Mahendrakar
d751d3e940 Fixed out of bound reads in stack variables
am: 4def2dfabf

Change-Id: Icb191da3a61c5b2b4df15ebe78a0adfd9e2c6c40
2016-12-07 00:33:45 +00:00
Marco Nelissen
ac029cfa04 Merge changes I662212eb,Ib07e2ed1 into mnc-dev
* changes:
  Fixed handling invalid chroma tu size for error clips
  Fixed out of bound reads in stack variables
2016-12-07 00:28:52 +00:00
Harish Mahendrakar
a76773ab74 Fixed handling invalid chroma tu size for error clips
Limit func_idx to valid range to ensure invalid functions are not
called when wrong TU size is signalled for chroma due to error in
parsing

Bug: 32915871
Change-Id: I662212eb2e9b8994e7e85780e667f14df73b5905
2016-12-07 00:28:46 +00:00
Harish Mahendrakar
4def2dfabf Fixed out of bound reads in stack variables
Out of bound reads in the following variables are fixed

scaling_mat_offset in ihevcd_iquant_itrans_recon_ctb()
ai1_offset_y, ai1_offset_cb and ai1_offset_cr in ihevcd_sao_shift_ctb()

These values were read but not used

b/32915871

Change-Id: Ib07e2ed1bdcc600700d4e9e5d970f6cc2164ab1b
2016-12-06 23:55:42 +00:00
Harish Mahendrakar
b364f6bcf9 Handle invalid slice_address in slice header am: f4f3556e04 am: 24085f5dc4 am: 5d759ab5a0 am: adbffbcd6a
am: fabc967182

Change-Id: I8fa1dc50e9e0073e4e6ee3f7291ffff424d324c1
2016-11-14 20:42:32 +00:00
Harish Mahendrakar
24085f5dc4 Handle invalid slice_address in slice header
am: f4f3556e04

Change-Id: I9e49276592e24cb52e3b62ecfa04a5a0edc7fb74
2016-11-14 20:12:59 +00:00
Harish Mahendrakar
f4f3556e04 Handle invalid slice_address in slice header
If an invalid slice_address was parsed, it was resulting in an incomplete
slice header during decode stage. Fix this by not incrementing slice_idx
for ignore slice error

Bug: 32322258
Change-Id: I8638d7094d65f4409faa9b9e337ef7e7b64505de
2016-11-10 14:59:41 -08:00
Harish Mahendrakar
27405a217f Added memory barrier calls
On some A72 based devices, data shared between cores was found to be
inconsistent which was resulting in an infinite loop.

Adding memory barriers before marking a CTB as parsed/processed,
all the pending memory operations are guaranteed to be completed.

Change-Id: I6e3bb11123a3c12ba7e69c4bfcd38960616f9fb5
(cherry picked from commit 031b91dde5)
2016-08-24 18:11:14 -07:00
TreeHugger Robot
c07d2b24ad Merge "DO NOT MERGE Added support for exporting SEI mastering display color params" into nyc-mr1-dev 2016-07-12 00:03:15 +00:00
Harish Mahendrakar
ecdc4c1a1c DO NOT MERGE Added support for exporting SEI mastering display color params
Bug: 27442922

Change-Id: Id466d48070ed916f18ebed6d3cf592bdcd206b83
2016-07-11 15:23:46 -07:00
Harish Mahendrakar
9ac16cede8 DO NOT MERGE Initialize u1_matrix_coeffs to 2 to signal unspecified value
When VUI does not contain u1_matrix_coeffs, it should be set to 2
to signal that it is not present in the bitstream.

Bug: 29640760
Change-Id: I1f1217725f5c5dada2079e1487058381bfb00ef0
2016-06-29 13:27:44 -07:00
Ricardo Cerqueira
063ce60457 Fix the frame size alignments am: 50ad42cf93 am: 4917993a7e
am: 30491833ff

* commit '30491833ff':
  Fix the frame size alignments
2015-12-17 10:12:35 -08:00
Ricardo Cerqueira
30491833ff Fix the frame size alignments am: 50ad42cf93
am: 4917993a7e

* commit '4917993a7e':
  Fix the frame size alignments
2015-12-17 18:09:50 +00:00
Ricardo Cerqueira
4917993a7e Fix the frame size alignments
am: 50ad42cf93

* commit '50ad42cf93':
  Fix the frame size alignments
2015-12-17 18:02:24 +00:00
Ricardo Cerqueira
50ad42cf93 Fix the frame size alignments
Change I59c996161053e313c873381c5bf6f8c36488483f aligned the number
of luma samples to 64byte boundaries when calculating and creating
the buffers. Unfortunately, it doesn't change all instances of that
calculation, leading to mismatches between creation/allocation/destruction.

Fixes android.media.cts.DecoderTest#testEOSBehaviorHEVC and
android.media.cts.DecoderTest#testCodecEarlyEOSHEVC

Bug: 24686670
Bug: 25070493
Bug: 25995793
Bug: 26217939
Bug: 26239053

Change-Id: I5b9dd682e08cfb03d2bc54829c4908976251dee7
2015-12-17 16:27:54 +00:00
Marco Nelissen
547ec2a67f Merge "Added few memsets to avoid uninitialized reads for error clips" into mnc-dr-dev 2015-11-12 15:34:21 +00:00
Harish Mahendrakar
2060081d2b DO NOT MERGE Added few memsets to avoid uninitialized reads for error clips
Also aligned few allocations to 4 byte boundary

Bug: 25070493
Bug: 24686670
Change-Id: Ic6284c6136ba8a72eed6f3bb7b953fb36a19dc22
2015-11-06 12:35:49 -08:00
Marco Nelissen
516528ee1c Revert "Added few memsets to avoid uninitialized reads for error clips" am: 552578a757
am: 675c41434a

* commit '675c41434a':
  Revert "Added few memsets to avoid uninitialized reads for error clips"
2015-11-06 20:12:53 +00:00