Commit graph

45 commits

Author SHA1 Message Date
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
d751d3e940 Fixed out of bound reads in stack variables
am: 4def2dfabf

Change-Id: Icb191da3a61c5b2b4df15ebe78a0adfd9e2c6c40
2016-12-07 00:33:45 +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
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
Marco Nelissen
675c41434a Revert "Added few memsets to avoid uninitialized reads for error clips"
am: 552578a757

* commit '552578a757':
  Revert "Added few memsets to avoid uninitialized reads for error clips"
2015-11-06 20:09:53 +00:00
Marco Nelissen
552578a757 Revert "Added few memsets to avoid uninitialized reads for error clips"
This reverts commit d71abc6924.

Change-Id: I24ea5da7d00f9cd52ce8f64a0a5bce47df67216e
2015-11-06 19:22:31 +00:00
Harish Mahendrakar
9043fefe92 Added few memsets to avoid uninitialized reads for error clips am: d71abc6924
am: d488586974

* commit 'd488586974':
  Added few memsets to avoid uninitialized reads for error clips
2015-11-06 15:39:38 +00:00
Harish Mahendrakar
d488586974 Added few memsets to avoid uninitialized reads for error clips
am: d71abc6924

* commit 'd71abc6924':
  Added few memsets to avoid uninitialized reads for error clips
2015-11-06 15:36:42 +00:00
Dan Willemsen
6ae135cb78 Remove __DATE__/__TIME__ from Android builds
This removes unnecessary changes from build to build.

Bug: 24204119
Change-Id: I1a787012c7e5dc4320c0760a00608c9472c2ab39
(cherry picked from commit 9863d8f802)
2015-10-30 21:56:26 +00:00
Harish Mahendrakar
dca46f9e91 Added few memsets to avoid uninitialized reads for error clips
Also aligned few allocations to 4 byte boundary

Bug: 25070493
Bug: 24686670

Change-Id: Ia00b3a3db1066650f85bb3e7c904e8acee102696
2015-10-27 15:19:56 +00:00
Harish Mahendrakar
d71abc6924 Added few memsets to avoid uninitialized reads for error clips
Also aligned few allocations to 4 byte boundary

Bug: 25070493
Bug: 24686670

Change-Id: I430b18fce2fe2940f4fb0ff95e5eadc7fdd705d4
2015-10-27 08:18:04 -07:00
Marco Nelissen
b3a53cebdb resolve merge conflicts of 7899c8cffa to mnc-dev.
Change-Id: Ic515e6ca749bbd4b11a715f1ea7e5dd9a54b2cd0
2015-10-22 14:43:11 -07:00
Harish Mahendrakar
7899c8cffa Aligned ps_pic_pu to 4 bytes
am: e8bfec1fa4

* commit 'e8bfec1fa4':
  Aligned ps_pic_pu to 4 bytes
2015-10-21 21:39:20 +00:00
Harish Mahendrakar
e8bfec1fa4 Aligned ps_pic_pu to 4 bytes
stmia was resulting in SEGV_MAPERR when ps_pic_pu is not aligned to 4 bytes
Bugfix: 24686670, 21468583

Change-Id: I07672d4a790f73cf27964983350181e66edc4d57
2015-10-21 07:50:33 -07:00
Harish Mahendrakar
ac0318fa8a Aligned ps_pic_pu to 4 bytes
stmia was resulting in SEGV_MAPERR when ps_pic_pu is not aligned to 4 bytes
Bugfix: 24686670, 21468583

Change-Id: I07672d4a790f73cf27964983350181e66edc4d57
2015-10-20 15:16:37 -07:00
Harish Mahendrakar
e3d6224dca Reduced memory requirements
Memory allocations are now done based on contents of SPS
API changed to move allocations inside the library

Change-Id: Ia4333cc2c01d7402dfe05e55e3c8a770a86be693
2015-10-09 11:44:26 -07:00
Harish Mahendrakar
137754b362 Memset 8 extra bytes at the end of internal bitstream buffer
Decoder may read 8 extra bytes at the end of this buffer.
Though it will never be used, setting it to zero will ensure
unitialized reads are avoided

Change-Id: Id7bf81ea73718a677c326e352ad3f4dc1756601a
2015-10-09 11:44:26 -07:00
Harish Mahendrakar
b2451d1375 Fix in reading short_term_ref_pic_set_idx in slice header
This is to be set to 0, when num_short_term_ref_pic_sets in sps is 1.

Change-Id: Ied061106952eddadd1c92281c6183fd510e2b0b0
2015-10-09 11:44:26 -07:00
Harish Mahendrakar
233819f9a3 Fixed returning U and V output pointers in shared mode for 420p
Change-Id: I5bdea6af37217020d50267dac9e59077d8ce1786
2015-10-09 11:44:26 -07:00
Harish Mahendrakar
d0a33c2c80 Removed calls to strcat and strlen
Change-Id: Ie211561cdbce46b795dc3848387f6c0c11c7264c
2015-10-09 11:44:26 -07:00
Harish Mahendrakar
6267c11c73 Simplified error checks for setting stride
Change-Id: Ie8df0eebca7967fc87b4662e0cc582033dac6aae
2015-10-09 11:44:26 -07:00
Harish Mahendrakar
3d2ea5037c Fixed an out of bound read in accessing inverse scan table
Change-Id: Ib25db1da92eee390a3847df06c0c0675ebcfb1a4
2015-10-09 11:44:25 -07:00
Harish Mahendrakar
b4475ae318 am 2b67e532: Align pic_width_in_luma_samples and pic_width_in_luma_samples to 8
* commit '2b67e53265':
  Align pic_width_in_luma_samples and pic_width_in_luma_samples to 8
2015-08-17 23:58:45 +00:00
Harish Mahendrakar
2b67e53265 Align pic_width_in_luma_samples and pic_width_in_luma_samples to 8
Spec mandates these to be multiples of min_cb_size.
Bug fix: 22278703

Change-Id: I17f0c2242519a9277598b8fb5b05717e1ce7469b
(cherry picked from commit dde3d8a3c7)
2015-08-14 23:48:15 +00:00
Harish Mahendrakar
dde3d8a3c7 Align pic_width_in_luma_samples and pic_width_in_luma_samples to 8
Spec mandates these to be multiples of min_cb_size.
Bug fix: 22278703

Change-Id: I17f0c2242519a9277598b8fb5b05717e1ce7469b
2015-07-31 12:25:43 -07:00
Naveen Kumar Ponnusamy
221aaccb7a Few bug fixes in loop filter
Removed few unused functions
Fixed an issue in 420P output in shared mdoe
Few bug fixes in handling loop filter corner cases in multi-tile multi-slice clips
Renamed few elements in mv_buf_t for consistency

Bug: 22860270

Change-Id: I8d179b9ad3c7ee3ad27972ee02ea2658fd2c3c25
2015-07-31 01:59:55 +00:00
Bernhard Rosenkränzer
d91eedb8cd Update assembly files to unified syntax
This allows them to be built with clang's internal assembler.
Also, pass -I flags to the assembler explicitly and stop disabling
clang.

Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Change-Id: I67dfd0d1b44217af6cf159f4d8810b3c2173702b
2014-12-01 20:46:10 +01:00
Naveen Kumar Ponnusamy
6c166a9e18 Source files clean up
Cleaned up source files for redundant and inactive #if directives
2014-07-12 15:09:24 -07:00
Naveen Kumar Ponnusamy
9cbd70a293 Reduced stack operations in arm64 assembly
Change-Id: Ia19a99001fef37334f18521dd8f8710907fe370d
2014-07-12 15:09:24 -07:00
Harish Mahendrakar
707042fda9 Few bug fixes and warnings removed
Added support for returning coded width and height along with display dimensions
Fixed few macros for mips
Removed signed comparison warnings
Removed few files that are not needed
Fixed an issue in handling more than 256 slices in a picture

Bug: 14571712
Change-Id: Ie485aaae3a13744bc9acff8aa699efbbc31f94f1
2014-06-06 06:42:02 -07:00
Harish Mahendrakar
0d8951cef4 Initial Version of HEVC decoder
Compliant to reference software HM11.0 onwards

Bug: 14571712
Change-Id: I8af25c1221cc6ab70440141c4d9b48c1ac69696a
2014-05-21 18:14:55 -07:00