Commit graph

38 commits

Author SHA1 Message Date
Hamsalekha S
f96761b52d Decoder: Fixed allocation of pv_map_ref_idx_to_poc_buf. am: a925a6b539 am: bf8b7083e9 am: ebae2ef7bd am: d5ad4f8c04 am: 6f82dff7b9 am: 0716eeeb7f am: 0b64261f4c am: d2e5daaede am: 61ddc9e202 am: 6d73354309
am: 79b56d80d5

Change-Id: Ic7cfdc087bf9c3de52c5d6cf9a25dfe25db4a936
2017-07-15 01:16:34 +00:00
Hamsalekha S
61ddc9e202 Decoder: Fixed allocation of pv_map_ref_idx_to_poc_buf. am: a925a6b539 am: bf8b7083e9 am: ebae2ef7bd am: d5ad4f8c04 am: 6f82dff7b9 am: 0716eeeb7f am: 0b64261f4c
am: d2e5daaede

Change-Id: Ic1a04ff426ec654e28d142ced625011b7ff9fbe1
2017-07-15 01:04:04 +00:00
Hamsalekha S
a925a6b539 Decoder: Fixed allocation of pv_map_ref_idx_to_poc_buf.
Increased allocation to include reference list1 also by
default. In the case of error, we could get B_SLICES
even in BASE_PROFILE. The initialization in the
dec_slice_struct_t slice structure has also been
modified accordingly.

Test: run poc with and without this patch
Bug: 38496660
Change-Id: I3451d79bbcd9f0d7a80981a9897f877b7f0812bd
2017-07-13 17:49:14 +00:00
Hamsalekha S
f15bb32866 Decoder : Fix memory leak when sps changes.
ih264d_allocate_dynamic_bufs is now called only once
after every ih264d_init_decoder call. This is possible
since we support only identical( all the critical
parameters will be same) sps in our sps array.

Signal resolution change when u1_frame_mbs_only_flag
in SPS changes.

Bug: 62897300
Test: compilation, boot
Change-Id: I0cf71fe9de72b5dadca2d1daf881d821786f94e3
2017-07-07 10:48:53 -07:00
Hamsalekha S
109b5b4226 Merge "Decoder: Fixed allocation size of pred info buffer" into mnc-dr-dev am: 94660850f0 am: a09bbc27eb am: f838a72c3e am: c33c094303 am: 41b9730003 am: daeae82702 am: 7475b6d9ae
am: 56d23c97dc

Change-Id: Ib0f02533bb604ace34f4d2516fab9a00e0eb32fd
2017-06-02 19:10:29 +00:00
Hamsalekha S
04882a6ea6 Merge "Decoder: Fixed allocation size of pred info buffer" into mnc-dr-dev am: 94660850f0 am: a09bbc27eb am: f838a72c3e am: c33c094303 am: 41b9730003 am: daeae82702 am: 7475b6d9ae
am: 56d23c97dc

Change-Id: I81e77d7c248bf5c2951c81d85e0bfd7ed0f9d124
2017-06-02 19:10:29 +00:00
TreeHugger Robot
94660850f0 Merge "Decoder: Fixed allocation size of pred info buffer" into mnc-dr-dev 2017-06-02 18:40:21 +00:00
Hamsalekha S
9041bb17f7 Decoder: Initialize MB info buffer to zero.
Initialize the buffer used to store inter mb info
(reference index, weights etc) to zero.

Bug: 36035683

Change-Id: I23561a6a7fe852c0563a631d7ec6ab022cd78ccc
(cherry picked from commit 2575ae6c98)
2017-05-15 19:43:33 +00:00
Marco Nelissen
b6433595df Merge "Decoder: Initialize MB info buffer to zero." into nyc-dev am: 31bd7f7fe6 am: 049aabf9c5 am: 3ff76c0667 am: e8c0283013
am: 27f44e43a4

Change-Id: I4ae4e3c8c5e6045cdbe10a2e850c41f8240fbe5a
2017-05-13 02:04:21 +00:00
Marco Nelissen
1010c9a53c Merge "Decoder: Initialize MB info buffer to zero." into nyc-dev am: 31bd7f7fe6 am: 049aabf9c5 am: 3ff76c0667 am: e8c0283013
am: 27f44e43a4

Change-Id: I4b407d9c77c859893079bf8d63df4b689b07caa5
2017-05-13 02:04:20 +00:00
Marco Nelissen
31bd7f7fe6 Merge "Decoder: Initialize MB info buffer to zero." into nyc-dev 2017-05-13 01:44:26 +00:00
Hamsalekha S
9008aed514 Decoder: Fixed allocation size of pred info buffer
Buffer allocation size for pred info was increased
in the case number reference frames equal to 1.

Bug: 36998372
Change-Id: I1f84a16703422109d40bed8436f35d0c2069c088
2017-05-12 17:58:03 +00:00
Hamsalekha S
2575ae6c98 Decoder: Initialize MB info buffer to zero.
Initialize the buffer used to store inter mb info
(reference index, weights etc) to zero.

Bug: 36035683

Change-Id: I23561a6a7fe852c0563a631d7ec6ab022cd78ccc
2017-04-11 09:22:16 -07:00
Ray Essick
b21679eaf8 Merge "Decoder: Fixed error handling for dangling fields" into mnc-dev am: 78334b2a24 am: cd5ebec24a am: f48987d2fc am: 1cbcdd7f16 am: 3a669baf18 am: 691577d923 am: 979ad81ebd am: db0571cb3d
am: 2c1d937449

Change-Id: I092a8ae67d4746e134f006ebcbe4af4ec442026f
2017-03-14 22:56:22 +00:00
Ray Essick
cd5ebec24a Merge "Decoder: Fixed error handling for dangling fields" into mnc-dev
am: 78334b2a24

Change-Id: Id5cb9826e72c59890526300ad9e8833b61691c20
2017-03-14 22:15:20 +00:00
Ray Essick
78334b2a24 Merge "Decoder: Fixed error handling for dangling fields" into mnc-dev 2017-03-14 22:08:38 +00:00
Harish Mahendrakar
57f60a16d5 Decoder: Fixed error handling for dangling fields
In case of dangling fields with gaps in frames enabled,
field pic in cur_slice was wrongly set to 0.

This would cause dangling field to be concealed as a frame, which would
result in a number of MB mismatch and hence a hang.

Bug: 34097672
Change-Id: Ia9b7f72c4676188c45790b2dfbb4fe2c2d2c01f8
2017-02-08 22:40:36 +00:00
Harish Mahendrakar
74f03b639e DO NOT MERGE Decoder: Increase memory allocation for weights & offsets for interlaced clips
Bug: 33816782
Change-Id: I10f8b2a7691aeb55365901c166e765ab22ec6106
2017-01-17 23:25:11 +00:00
Harish Mahendrakar
1a13168ca3 Decoder: Fixed error handling for dangling fields
In case of dangling fields with gaps in frames enabled,
field pic in cur_slice was wrongly set to 0.

This would cause dangling field to be concealed as a frame, which would
result in a number of MB mismatch and hence a hang.

Bug: 34097672
Change-Id: Ia9b7f72c4676188c45790b2dfbb4fe2c2d2c01f8
2017-01-17 09:55:34 -08:00
Harish Mahendrakar
ef0f9380bd Decoder: Fixed allocation of ps_dec->ps_nbr_mb_row am: 9b095de571 am: ccd57d9029 am: 4ec0548b97 am: 6e50592ca9 am: c54813cf06 am: 22261bd5c3
am: 000ca8c68c

Change-Id: I978c2ff4af86543226f8ef4e899b51dffa59de31
2017-01-06 18:19:01 +00:00
Harish Mahendrakar
9b095de571 Decoder: Fixed allocation of ps_dec->ps_nbr_mb_row
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
2016-12-28 13:04:00 -08:00
Harish Mahendrakar
93059ecf3c Decoder: Fixes in handling errors in Mbaff clips. am: 6676aeb419 am: fab0729908 am: 05bd0e8d4c am: 69b2803e55 am: dcb099e183 am: 80f3b06d90 am: a6aa08d1dc
am: f416648c29

Change-Id: Ic52a5b4acfe095179a89e71b44569d77b0806079
2016-10-19 00:28:13 +00:00
Harish Mahendrakar
fab0729908 Decoder: Fixes in handling errors in Mbaff clips.
am: 6676aeb419

Change-Id: If83edf15d904c166661b3ab6065c5230269231dd
2016-10-18 23:36:38 +00:00
Harish Mahendrakar
5d794693d5 Decoder: Ignore few dpb errors
am: 026745ef04

Change-Id: Ibd9e7f2c7936fcd1f8bea8a84b99eb9780947feb
2016-10-18 23:36:27 +00:00
Harish Mahendrakar
6676aeb419 Decoder: Fixes in handling errors in Mbaff clips.
Fixes mb_x, mb_y and first_mb_in_slice for Mbaff error streams

Bug: 30481714

Change-Id: Ie99f3b57e48a620a4bc7aee88031955a2e1b6753
2016-10-18 12:19:18 -07:00
Harish Mahendrakar
026745ef04 Decoder: Ignore few dpb errors
Ignore dpb errors, where decoder fails to release a non-existing picture
from reference lists. This is needed to decode streams where few pictures
are missing.

Change-Id: I8ece68cb1fa22473029e16158cd86ce7a197027a
2016-10-18 12:19:06 -07:00
Ray Essick
daefcde2ed DO NOT MERGE ANYWHERE: Remove several memset() calls which overwrote buffers initialized
in buf_mgr_init().  Affects 6.0 only.
2016-06-23 22:07:15 +00:00
Harish Mahendrakar
27b7a14f48 Decoder: Ignore few dpb errors
Ignore dpb errors, where decoder fails to release a non-existing picture
from reference lists. This is needed to decode streams where few pictures
are missing.

Change-Id: I8ece68cb1fa22473029e16158cd86ce7a197027a
2016-06-21 08:13:38 +00:00
Harish Mahendrakar
bd67b74643 Decoder: Increment p_ctxt_inc_mb_map immediately after allocation
This is needed to ensure free does not get a wrong address in case of allocation
failure.

Change-Id: I1818f2a8ae3cce8dd4e2293510ff63e617b83c5f
2016-06-18 09:01:41 +00:00
Harish Mahendrakar
43a1cf620f DO NOT MERGE. AVC decoder: init structures
Memset few structures to zero to handle error clips

Bug: 27907656
Change-Id: I517841fc8b6d674f7e4e3ebaf60dd2e42f1152ae
2016-05-11 08:18:59 -07:00
Harish Mahendrakar
07ae78bd27 Decoder: Fixed an out of bound read in intra pred buffers
Bug: 23453762
Change-Id: I129e5a2ac8b9a28f3c894ebca0aef7063ca5934e
(cherry picked from commit 040ec939c6)
2015-09-25 16:47:27 +00: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
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
e789d1d2e2 Decoder: Fixed issues shown by Valgrind
The slice header structure has now been initialized to 0
Fixed bug in closing of threads in the case of error.

Bug: 22860270

Change-Id: I777e0b73ad2f083c72be179984f5c1cb00ededb6
2015-07-31 18:52:32 +00:00
Hamsalekha S
9327d0ea03 Added support for level 52
Change-Id: Ib2fa0b02b408a7bb21b3115e5b1c1317706a7354
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
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30