Commit graph

41 commits

Author SHA1 Message Date
Android Build Merger (Role)
731580450e [automerger] Decoder: Fixed reset values in parse sps. am: 9c32ad7126
Change-Id: Ia8766fd9f4b9a2cb5f7bb13e221d8c0f9b366d66
2018-01-18 18:44:16 +00:00
Ritu Baldwa
9c32ad7126 Decoder: Fixed reset values in parse sps.
Memset to zero whenever new sps occurs.

Bug: 70897394
Test: manual
Change-Id: I5936fd55265ff8ad2b275a72b175cdb540bb7933
2018-01-18 10:43:26 -08:00
Hamsalekha S
c30baf4986 Decoder: Detect change of mbaff flag in SPS
am: d524ba0310

Change-Id: I818230d7fb1763b54d4920f9000663ec72286b6d
2017-10-31 18:02:16 +00:00
Hamsalekha S
d524ba0310 Decoder: Detect change of mbaff flag in SPS
Change in Mbaff flag needs re-initialization of NMB group
and other variables in decoder context.

Bug: 64380237
Test: ran poc on ASAN before/after
Change-Id: I0fc65e4dfc3cc2c15528ec52da1782ecec61feab
2017-10-30 14:19:41 -07:00
Ray Essick
5ecccccbd7 Merge "Fixed hang in the case of multiple sps id." into mnc-dev
am: 16b019a620

Change-Id: Id1c0b6150c192718b69db226a373532f723843a7
2017-06-06 23:58:05 +00:00
Ray Essick
16b019a620 Merge "Fixed hang in the case of multiple sps id." into mnc-dev 2017-06-06 23:48:10 +00:00
Hamsalekha S
a0cec24429 Decoder: Cleaned up parse sps function.
am: 4eb72f7c93

Change-Id: I7dd751c7a00e07e7930338e4c87366638b260697
2017-06-06 22:16:25 +00:00
Hamsalekha S
ec3f585000 Fixed hang in the case of multiple sps id.
The sps parameters used to detect change in
resolution/sps were incorrect. Made a fix to
use current sps from decoder context.

Bug: 38239864

Change-Id: I2d110e635ced32b3dc7f364e08a97d672fcbae37
(cherry picked from commit 8c6fe35f6d)
2017-06-06 21:22:17 +00:00
Hamsalekha S
4eb72f7c93 Decoder: Cleaned up parse sps function.
Postponed the initializations to decoder context
till the end of the parse sps function, after
all the error checks are done.

Bug: 37968755
Test: ran poc on ASAN-enabled build before/after
Change-Id: Ibee3383c28cede3edb68d2459565d6ce10683bbd
2017-06-06 21:05:07 +00:00
Hamsalekha S
252ca18add Merge "Fix resolution change within a decode call." into mnc-dev
am: 7fc42b801c

Change-Id: Ib6f3680beb6e5d837f2140eed3107a23491f99f6
2017-06-06 17:39:59 +00:00
Hamsalekha S
fe18375850 Fix resolution change within a decode call.
If resolution changes within a decode call,due to multiple
sps, the decoder hangs as the the application will
give the same data again in the next decode call. This
results in a hang. Fixed this by flaging an error,
when sps/resoultion changes within a process call.

Bug: 38487564
Test: ran POC on patched O-based system w/o hanging
Change-Id: I30095b2e8bf573c1a58a316a23b1a5e6a4af589b
2017-06-05 13:28:44 -07:00
TreeHugger Robot
b0399be998 Merge "DO NOT MERGE Fixed bug during resolution change" into mnc-dev 2017-05-15 18:45:41 +00:00
Hamsalekha S
6b8184944b DO NOT MERGE Fixed bug during resolution change
Modifies how i4_header_decoded is decoder context is used, to ensure
that resolution change is detected even if PPS has not been decoded.

This retrofits parts of the below mentioned 'merged-in' commits
which solve this for mnc-dr and later versions of the library. The retrofit
required dropping portions that affected code introduced in a later baseline.

Bug: 35583675
Test: provided input file no longer hangs
Change-Id: I8fa30543759c5762b18e2380513e2ce616c858ef
Merged-In: I0d248212aaf6635f34a70ad36657416a0c623d32
Merged-In: Ifd21ebe1827d6d0c13018983c46c4301c2bb1669
2017-05-15 10:22:55 -07:00
Hamsalekha S
0f6a1883e8 Decoder: Added an error check while parsing PPS.
am: 62f98981ff

Change-Id: I2976869f34cf2a20078c3fe4504db9e6c5a3035d
2017-05-12 20:56:41 +00:00
Hamsalekha S
62f98981ff Decoder: Added an error check while parsing PPS.
Added an error check while parsing PPS syntax element
second_chroma_qp_index_offset.

Bug: 37207120

Change-Id: Icba6b7bcf5940505717ee61134ed801c221b6e26
2017-05-12 20:46:28 +00:00
Hamsalekha S
8454dbfccd DO NOT MERGE Fixed bug in the case of resolution change.
Modified the way i4_header_decoded in decoder context
is used, to ensure that resolution change is detected
even if PPS has not been decoded.

Cherry pick of Change-Id: Ibb3f8dfbeb66a999fd81720a7d2a02dd951a55c4
which went into master post-N.

Bug: 35583675
Test: ran POC, no longer hangs
Change-Id: Ifd21ebe1827d6d0c13018983c46c4301c2bb1669
2017-04-12 10:26:46 -07:00
Wonsik Kim
142221a3f9 DO NOT MERGE Handle level/profile/num_ref_frames/num_reorder change at the same resolution
Cherry pick of Change-Id: Ifa78c3125ab207ce5e39166f4891cba0d3a4e39c
which went into master (post-n). This needed backporting to M so that
the final fix for 35583675 could be integrated.

Bug: 35583675
Test: ran POC without failure
Change-Id: I0d248212aaf6635f34a70ad36657416a0c623d32
2017-04-12 10:23:33 -07:00
Marco Nelissen
37345554fe resolve merge conflicts of 3654ad0 to mnc-dr-dev
Bug: 33818508
Bug: 34013472
Change-Id: I2e99cbceba1c00555d624e8975522725e362362b
2017-02-14 13:49:16 -08:00
Marco Nelissen
3654ad0da5 Merge changes Iec2941f1,I38be0e4c into mnc-dev
* changes:
  Decoder: Add supported width check for MBaff streams
  Decoder: Added a check for unsupported resolutions
2017-02-14 21:30:39 +00:00
Harish Mahendrakar
16fa990ce1 Decoder: Fixed initialization of first_slice_in_pic
am: 0b23c81c3d

Change-Id: I55e49ca9616a151456342bad7673d0986098b448
2017-02-14 17:03:06 +00:00
Harish Mahendrakar
0b23c81c3d Decoder: Fixed initialization of first_slice_in_pic
To handle some errors, first_slice_in_pic was being set to 2.
This is now cleaned up and first_slice_in_pic is set to 1 only once per pic.
This will ensure picture level initializations are done only once even in case
of error clips

Bug: 33717589
Bug: 33551775
Bug: 33716442
Bug: 33677995

Change-Id: If341436b3cbaa724017eedddd88c2e6fac36d8ba
2017-02-14 16:59:09 +00:00
Harish Mahendrakar
69b5191865 Decoder: Add supported width check for MBaff streams
In case of MBAff streams, decoder processes two rows at a time,
this limits maximum supported width to 1920 for MBAff streams.

Bug: 33818508
Bug: 34013472
Change-Id: Iec2941f116cf3c36b63013a930319960023a3b42
2017-02-13 15:30:57 -08:00
Harish Mahendrakar
9d60a0c5da Decoder: Added a check for unsupported resolutions
Decoder now returns an error for resolutions greater than 3840x2176

Bug: 24542936

Change-Id: I38be0e4c5cf2a980bfd4c781f3b49171f73b5ccb
2017-02-13 15:30:46 -08:00
Harish Mahendrakar
3e29786590 Decoder: Fix in returning incomplete frame error
am: d1896deaf1

Change-Id: I81b68c6f7b30c3ba048967cd64426b204b8ee895
2017-01-06 17:40:58 +00:00
Harish Mahendrakar
d1896deaf1 Decoder: Fix in returning incomplete frame error
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
2016-12-28 12:35:25 -08:00
Harish Mahendrakar
637cb7f434 Decoder: Fix in checking for valid profile flags
am: d7eee555dc

Change-Id: I73b07d5ce0b248387d5f4b492caf63f02d372881
2016-12-08 00:16:31 +00:00
Harish Mahendrakar
d7eee555dc Decoder: Fix in checking for valid profile flags
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
2016-12-06 14:19:39 -08:00
Harish Mahendrakar
d75185f90e Merge \"Decoder: Fix slice number increment for error clips\" into mnc-dev
am: 2e88a2aa67

Change-Id: I791c029e3b39202db3f49f13fbb511904b5e8fef
2016-06-10 21:31:13 +00:00
Harish Mahendrakar
5e4f64c074 Decoder: Fix slice number increment for error clips
Bug: 28673410
2016-06-09 08:31:55 -07:00
Marco Nelissen
66be90d7a0 Reconcile branch with master after mass cherrypicks
Change-Id: Ib017480389cb9f5204e5437716653016da348dba
2015-10-16 20:23:10 +00:00
Harish Mahendrakar
5351d3a403 Decoder: Added a check for unsupported resolutions
Decoder now returns an error for resolutions greater than 3840x2176

Bug: 24542936

Change-Id: I38be0e4c5cf2a980bfd4c781f3b49171f73b5ccb
2015-10-13 23:28:19 +00:00
Hamsalekha S
9d04b13b62 Moved check for level after check for resolution change.
This is required for DRC tests in CTS .

Change-Id: Icd0fe10d97c6ee55f8358682a578bddb58590de4
2015-10-09 11:35:26 -07:00
Harish Mahendrakar
251b007ecc Decoder: Reduced memory requirements
Memory allocations are now done based on contents of SPS
API changed to move allocations inside the library

Also changed strlen to strnlen

Bug: 24221026

Change-Id: I9130457f564cddb4da7ec6399cc9fe88ee871217
2015-09-23 18:35:27 +00:00
Harish Mahendrakar
2ee0c1bced Return error in SPS/PPS parsing when extra bytes are read from input
Bug: 24157524

Change-Id: I4b319ef8e23e1ba5f84f52b92f40ba7fb1429101
2015-09-18 14:12:13 -07:00
Hamsalekha S
8a50328131 Support for level greater than level at init in Decoder
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
2015-07-31 18:53:17 +00:00
Hamsalekha S
9f0dcba9b4 Improved error resilience in decoder
Fixed buffer management for error cases
Fixed end of picture detection logic for multiple slice error cases
Fixed handling of incomplete frame, missing slices.

Change-Id: Iae447667e4d88869a8bf992180cacd77870b9877
2015-06-25 08:25:44 -07:00
Hamsalekha S
c080d57996 Moved check for level after check for resolution change.
This is required for DRC tests in CTS .

Change-Id: Icd0fe10d97c6ee55f8358682a578bddb58590de4
2015-06-25 08:25:42 -07:00
Marco Nelissen
8ef4c3f614 Multithreading changes and better error resilience
Fixed the following bugs
Issue 21145276
Issue 21144884
Issue 21181133
Issue 21181134

Decoder now returns error if the level in stream is higher than level at init

Change-Id: I8892c62bd98f7854d046510330c05a1e9ca826b2
2015-06-03 07:27:36 -07:00
Lajos Molnar
a2b49e5f05 fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:51:34 +00:00
Harish Mahendrakar
3a52efd361 Fixed few issues seen in CTS tests
Added support for encoding non-multiple of 16 dimensions
Added support for encoding dimensions smaller than 64x64
Aligned coeff data to 4 byte boundary

Bug: 20554276
Change-Id: I111093950f94698296d8499a2845cfe2db6c557b
2015-05-05 17:45:29 +00:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30