Commit graph

77 commits

Author SHA1 Message Date
Harish Mahendrakar
208eb8ff46 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 am: dba11e3fa8 am: 157125847b
am: 70da218a8e

Change-Id: Ib68bd61199d77b97da228566cb98e12859777498
2017-02-14 22:01:28 +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
e82a918b66 Added check for invalid log2_max_transform_block_size in SPS am: b5cae8181e am: 4b6511b432 am: c6bda6e3d2 am: 1a50b8aefc am: ddb188785b am: 0512afdf72 am: 05e014ebf1
am: 7a6be9f361

Change-Id: I30488206ae3b35665b4baa833a2c0a3de5a25c2f
2017-01-18 18:31:42 +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
3717767b0b Fixed handling invalid chroma tu size for error clips am: a76773ab74 am: 8322418219 am: d337706792 am: 9b074778a1 am: ea5c7c3738 am: abbcb5d75e am: 2168eedfa6
am: d8c211bf5d

Change-Id: I06b245f1254c7258ebcbb7bdd62ad4cc1d54505d
2016-12-07 01:02:18 +00: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
a4887d4a71 Handle invalid slice_address in slice header am: f4f3556e04 am: 24085f5dc4 am: 5d759ab5a0 am: adbffbcd6a am: fabc967182 am: b364f6bcf9 am: f432e6f293
am: fbccd4bedb

Change-Id: Ibf72ce945853f5c1f3b834be0409ed1a9102dd7b
2016-11-23 22:53:19 +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
Grant Hsu
3426916ae1 Fixed decode conformance stream LTRPSPS_A_Qualcomm_1.bit
1. change ai1_lt_ref_pic_poc_lsb_sps from WORD8 to UWORD16 because i1_log2_max_pic_order_cnt_lsb can be up to 16 by the spec
2. fixed bug using CLZ to compute Ceil( Log2( num_long_term_ref_pics_sps ) ) and check if i1_num_long_term_ref_pics_sps is greater than 1 to avoid BITS_PARSE(0)

Change-Id: I298b74d053b17d133b9dcba0e924136ec274ea3c
2016-06-28 22:44:48 +00:00
Harish Mahendrakar
3a405b4cc3 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-28 00:07:07 +00:00
Grant Hsu
617503f219 fixed decoding conformance stream RPS_F_docomo_2.bit
short-term RPS is not used for reference by the current picture if used_by_curr_pic_flag equal to 0

Change-Id: I3f7af6e7fae4016bbe6bd8c5065666fe02f3b836
Signed-off-by: Grant Hsu <grant.hsu@cidana.com>
2016-06-27 21:33:24 +00:00
Ray Essick
0626701e1c Merge "Added support for parsing SEI parameters" 2016-06-23 22:42:38 +00:00
Harish Mahendrakar
613c712d19 Added support for parsing SEI parameters
Change-Id: I28e1f23d5a216ea9696f73ed4a105eab1b464a8e
2016-06-23 03:59:27 +00:00
Harish Mahendrakar
506045b5ad Added support for exporting SEI mastering display color params
Bug: 27442922

Change-Id: Id466d48070ed916f18ebed6d3cf592bdcd206b83
2016-06-22 21:32:05 +00:00
Ray Essick
f59bff7af5 Merge "Pad boundary pixels of picture buffers" 2016-06-21 19:23:29 +00:00
Ray Essick
c942179e52 Merge "Returning error for unsupported resolutions" 2016-06-21 16:30:10 +00:00
Harish Mahendrakar
f9f8d07fb8 Returning error for unsupported resolutions
Decoder now returns error for streams greater than 8448x4320

Change-Id: I2cfebf62255d4c6e33b79211fa55af06a097e776
2016-06-18 08:59:28 +00:00
Harish Mahendrakar
031b91dde5 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
2016-06-18 08:58:34 +00:00
Harish Mahendrakar
d1209ac475 Pad boundary pixels of picture buffers
One pixel outside the boundary on all sides of picture buffers are initialized to zero
These pixels were being read in SAO functions but were not used in actual processing

Setting these pixels to zero will supress unitialized read errors in valgrind

Change-Id: Ic39a43ee0a108751fb49718319e408ddc3536008
2016-06-18 08:57:33 +00:00
Harish Mahendrakar
2b34e4dc67 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

Change-Id: Ib07e2ed1bdcc600700d4e9e5d970f6cc2164ab1b
2016-06-17 21:45:58 +00:00
Ray Essick
10b302a78e Merge "Fixed uninitialized reads for error clips" 2016-06-17 20:04:14 +00:00
Harish Mahendrakar
3527694a9b Fix stack buffer overflow in accessing au1_ref_sub_out
Aligned the size of au1_ref_sub_out to ensure SSE42 modules do not
result in stack buffer overflow

Change-Id: I5ecd75b4979140eb4d89bf8f0380ed8c7d9bff01
2016-06-17 03:50:06 +00:00
Harish Mahendrakar
164727b5a6 Fixed uninitialized reads for error clips
Fixed valgrind errors for uninitialized reads from heap allocation
Bugfix: 25278021

Change-Id: I43008479fe8298a3a4cf6bb1708960cc78a34911
2016-06-16 03:26:18 +00:00
Harish Mahendrakar
0fb1f4f477 Handle streams with change in max_dec_buffering/num_reorder_frames
without resolution change

Change-Id: I404099ac24439b5f6eddc9265dc571929433b3ee
2016-05-04 03:46:01 +00: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
Harish Mahendrakar
b9f7c2c45c 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: I59c996161053e313c873381c5bf6f8c36488483f
2015-11-06 12:12:01 -08:00