Commit graph

321 commits

Author SHA1 Message Date
TreeHugger Robot
ef5bc92259 Merge changes from topic "am-8231d92f-aea1-4f7d-b84c-789126fb6fa2" into mnc-dr-dev
* changes:
  [automerger] Decoder: Fixed reset values in parse sps. am: 9c32ad7126
  Decoder: Fixed reset values in parse sps.
2018-01-31 21:10:18 +00:00
Android Build Merger (Role)
65db3cc9a3 [automerger] Decoder: Set prev slice type for I slice. am: aecdfd1aff
Change-Id: I5397b5635a304040fa8bcbd2999be4b07fcbdc0d
2018-01-29 23:19:09 +00:00
Ritu Baldwa
aecdfd1aff Decoder: Set prev slice type for I slice.
Fixed initialization of u1_pr_sl_type for I slice.

Bug: 70897454
Test: ran PoC before/after patch
Change-Id: I0c37317513b72236be98c2b25482a67bf2b56052
2018-01-29 15:17:19 -08:00
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
Ray Essick
1fb89d8488 Merge "Decoder: Adding Error Check for Output Buffer Size in Shared Display Mode." into mnc-dev
am: afc729db25

Change-Id: Ic57cdca65a505c45bec9c6ff8dd9b5d9dab5fec7
2018-01-08 22:27:38 +00:00
Ray Essick
afc729db25 Merge "Decoder: Adding Error Check for Output Buffer Size in Shared Display Mode." into mnc-dev 2018-01-08 22:16:23 +00:00
Ritu Baldwa
0183e8df10 Decoder: Fixed memory overflow in shared display mode.
am: c3b026a87d

Change-Id: I2b1d09b719db6dc4e5ee32be6653b4a64e89ebd5
2018-01-08 19:56:05 +00:00
Ritu Baldwa
c3b026a87d Decoder: Fixed memory overflow in shared display mode.
The factor multiplication should happen only at the source,
not at the destination.

Bug: 71375536
Test: manual
Change-Id: Ib5f00b87150a0533880346fac5464b0b1a802c36
2018-01-05 11:09:27 -08:00
Ritu Baldwa
3692aceb1b Decoder: Adding Error Check for Output Buffer Size in Shared Display Mode.
The output buffer size given by the application, needs to be checked
in every process call. This is required in the case of resolution
change in shared display mode.

Bug: 70294343
Bug: 70350193
Bug: 70526411
Bug: 70526485
Test: manual
Change-Id: I2c1e59425e84ac62a874e5ee180e1b98f0a4058f
2018-01-02 14:25:27 -08:00
Ritu Baldwa
8d081b93a8 Decoder: Modified loop condition while parsing ref_list_reordering.
am: 7ea47d575d

Change-Id: Icb916758da995402e81f4570e1325a761041cd14
2017-12-01 21:01:58 +00:00
Ritu Baldwa
7ea47d575d Decoder: Modified loop condition while parsing ref_list_reordering.
When ref_pic_list_reordering_flag_l1 is equal to 1, the number of times
that reordering_of_pic_nums_idc is not equal to 3 following
ref_pic_list_reordering_flag_l1 should not exceed
num_ref_idx_l1_active_minus1 + 1.

Bug: 69478425
Change-Id: I031bb744869ac8a57f85bb97574832efd0eefc25
2017-11-30 18:15:06 +00:00
TreeHugger Robot
ac0d9cecb5 Merge "Decoder: Handle dec_hdl memory allocation failure gracefully" into mnc-dr-dev 2017-11-03 18:57:47 +00:00
Ritu Baldwa
3bde3e435c Merge "Decoder: Fixed incorrect use of mmco parameters." into mnc-dev
am: 4d0407c0bb

Change-Id: Iad247fb8d10d2610fe5f8d6bb064fc52b20952ba
2017-11-02 23:36:53 +00:00
TreeHugger Robot
4d0407c0bb Merge "Decoder: Fixed incorrect use of mmco parameters." into mnc-dev 2017-11-02 23:27:42 +00:00
Harish Mahendrakar
7720b3fe3d Decoder: Handle dec_hdl memory allocation failure gracefully
If memory allocation for dec_hdl fails, return gracefully
with an error code. All other allocation failures are
handled correctly.

Bug: 68300072
Test: ran poc before/after
Change-Id: I118ae71f4aded658441f1932bd4ede3536f5028b
2017-11-01 09:57:48 -07:00
Ray Essick
235cb0137f Merge "DO NOT MERGE Decoder: Increased allocation and added checks in sei parsing." into mnc-dev
am: 23e7899124  -s ours

Change-Id: I6cfb805bdb9378464ca37518b8743ce044584854
2017-10-31 18:54:52 +00:00
Ray Essick
23e7899124 Merge "DO NOT MERGE Decoder: Increased allocation and added checks in sei parsing." into mnc-dev 2017-10-31 18:45:31 +00: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
27e6efc8ec DO NOT MERGE Decoder: Increased allocation and added checks in sei parsing.
This prevents heap overflow while parsing sei_message.

Bug: 63122634
Test: ran PoC on unpatched/patched
Change-Id: I4785927b68cb17a3ca51e23aeaf96aacacf116d3
Merged-In: I61c1ff4ac053a060be8c24da4671db985cac628c
2017-10-17 15:09:06 -07:00
Hamsalekha S
f2b70d3537 Decoder: Increased allocation and added checks in sei parsing.
This prevents heap overflow while parsing sei_message.

Bug: 63122634
Test: ran PoC on unpatched/patched
Change-Id: I61c1ff4ac053a060be8c24da4671db985cac628c
2017-10-17 15:03:19 -07:00
Ritu Baldwa
3c70b9a190 Decoder: Fixed incorrect use of mmco parameters.
Added extra structure to read mmco values and copied only once per
picture.

Bug: 65735716

Change-Id: I25b08a37bc78342042c52957774b089abce1a54b
2017-10-12 13:41:43 -07:00
Ritu Baldwa
b288f51729 Merge "DO NOT MERGE Decoder: Modified setting of error code in set flush api." into mnc-dev
am: 6a09a35355  -s ours

Change-Id: I01c0bfe70914107bee7763ec1beec9bd7abbf175
2017-10-03 23:00:59 +00:00
TreeHugger Robot
6a09a35355 Merge "DO NOT MERGE Decoder: Modified setting of error code in set flush api." into mnc-dev 2017-10-03 22:51:37 +00:00
Ritu Baldwa
1541dcc79c DO NOT MERGE Decoder: Modified setting of error code in set flush api.
Fixed incorrect use of ps_dec->pv_dec_out to set error code.

Bug: 66372937
Test: at vendor
Merged-In: Ib04e0b15573b2482c9d5b43c8bc7dd30d8f8efdd
Change-Id: I7b66ee010089399c050a75d6d67feb03da0b8b3e
2017-10-03 14:57:06 -07:00
Hamsalekha S
1b1e6d3ec9 Merge "Decoder: Fixed hang in the case of dangling field" into mnc-dev
am: 2f1ca945b1

Change-Id: I203d518ad9dc60ea41dfdc88c1903b47398246ba
2017-10-03 17:34:44 +00:00
TreeHugger Robot
2f1ca945b1 Merge "Decoder: Fixed hang in the case of dangling field" into mnc-dev 2017-10-03 17:29:09 +00:00
Ritu Baldwa
848428bb84 DO NOT MERGE Decoder: Increased memory allocation.
am: ed7a63fbcc  -s ours

Change-Id: If11a724e3eeffc4183106f6e4c1ae6b45b0e8ac7
2017-10-03 02:13:56 +00:00
Ritu Baldwa
ed7a63fbcc DO NOT MERGE Decoder: Increased memory allocation.
ps_dec->u1_recon_mb_grp is twice the width in case of mbaff,
increasing relevant allocations accordingly.

Increased allocation of intra-prediction buffer to
include padding.

Bug: 64964675
Test: POC from bug report
Change-Id: Ic4a6151bb12ac1122c228220b9150b2a372aae21
2017-09-29 11:49:50 -07:00
Hamsalekha S
252628cffb Decoder: Fixed hang in the case of dangling field
The u1_top_bottom_decoded  flag in the decoder context has been fixed
to be updated correctly in the case of dangling field

Bug: 63315932
Test: ran POC after patching
Change-Id: I8db4ebeb94fba735ba45f365c37e52a202ea84cd
2017-09-29 10:25:21 -07:00
Marco Nelissen
628056c0ed Merge "Decoder: Updated error check while parsing num_ref_idx_lx_active." into mnc-dev
am: 224824ba17

Change-Id: Id5366922a8312c3fc99f5dc42c64e4bfdf11795b
2017-09-13 05:51:32 +00:00
Marco Nelissen
224824ba17 Merge "Decoder: Updated error check while parsing num_ref_idx_lx_active." into mnc-dev 2017-09-13 05:00:15 +00:00
Hamsalekha S
8659d0e563 Merge "Decoder: Corrected variable datatypes in ih264d_get_implicit_weights." into mnc-dev
am: a2d8a1444d

Change-Id: I50d88e962f2435189cbb4720d8254729eb47829f
2017-09-12 00:14:49 +00:00
TreeHugger Robot
a2d8a1444d Merge "Decoder: Corrected variable datatypes in ih264d_get_implicit_weights." into mnc-dev 2017-09-12 00:11:33 +00:00
Ray Essick
24cb0c18e5 Merge "DO NOT MERGE: Decoder: Conceal picture only if valid picture buffer is obtained." into mnc-dev
am: dc9396971d  -s ours

Change-Id: I100c5d289d7d145ead4ba6b741299691d97ee14a
2017-09-11 22:23:08 +00:00
Harish Mahendrakar
50ec420228 Added an out of bound check on u4_num_bufs in input argument
am: aa11ab9fdb

Change-Id: I7dd6739821da87a96072dae422416e8037332a4f
2017-09-11 22:22:40 +00:00
Ray Essick
dc9396971d Merge "DO NOT MERGE: Decoder: Conceal picture only if valid picture buffer is obtained." into mnc-dev 2017-09-11 22:17:06 +00:00
Hamsalekha S
208c74d62a Decoder: Updated error check while parsing num_ref_idx_lx_active.
Added an error check on the lower limit of u1_num_ref_idx_lx_active,
while parsing slice header. The minimum possible value is 1.

Bug: 64836894

Change-Id: I57056851fc135ed00f7a10af5c81eb560e9e12de
2017-09-11 20:16:47 +00:00
Hamsalekha S
3eb692de91 Decoder: Corrected variable datatypes in ih264d_get_implicit_weights.
The difference between two 32 signed numbers was getting assigned
to 16 bits, leading to a divide by zero arithmetic execption.
Modified variable names to match their datatypes.

Bug: 65122447

Change-Id: I45ade1945f10b4d7660bd09fb564e60fd29d40dc
2017-09-08 13:21:14 -07:00
Ray Essick
45aa4ac86d DO NOT MERGE: Decoder: Conceal picture only if valid picture buffer is obtained.
If all the slices in the current pic were invalid, then
the decoder would not have received a valid picture buffer
in the current call. In such cases there is no need to conceal or
deblock the picture.

Bug: 62896384
Test: run ASAN-enabled PoC before/after the patch
Change-Id: Ia7d979a78ae3f4fb443a1759c8e6cf8780565ad8
Merged-In: I3cf6e871592826f93b0dcd2b06fff80677bc8338
2017-09-06 23:46:21 +00:00
Hamsalekha S
5df744afde Decoder: Conceal picture only if valid picture buffer is obtained.
If all the slices in the current pic were invalid, then
the decoder would not have received a valid picture buffer
in the current call. In such cases there is no need to conceal or
deblock the picture.

Bug: 62896384
Test: run ASAN-enabled PoC before/after the patch
Change-Id: I3cf6e871592826f93b0dcd2b06fff80677bc8338
2017-08-18 20:45:17 +00:00
Harish Mahendrakar
aa11ab9fdb Added an out of bound check on u4_num_bufs in input argument
ps_dec_ip->s_out_buffer.u4_num_bufs was missing out of bound checks

Bug: 62688399
Change-Id: Ic5e5c002d29fcb18064550d5a5f9289bb68b448e
2017-08-10 10:15:16 -07: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
a54dcc6338 Decoder: Fixed overflow in refernce list creation.
am: cbcd2846fa

Change-Id: Ic4d5c775bfeb8950f07145c9441130ea295bdfa5
2017-07-10 18:49:51 +00:00
Hamsalekha S
cbcd2846fa Decoder: Fixed overflow in refernce list creation.
Since the maximum value of long term index is 255,
the loop control variable needs to be 32 bit.

Bug: 38448381
Test: ran POC before/after applying fix
Change-Id: Iae3ecff38d4a922bde10fde33f1cfcafd2ea2680
2017-07-07 10:34:44 -07:00
Hamsalekha S
278ed70003 Initialize DPB structures to valid values.
am: b8d362561e

Change-Id: I6025560875e3234a3cc99d316e1ccd46109ef269
2017-06-26 21:40:11 +00:00
Hamsalekha S
b8d362561e Initialize DPB structures to valid values.
When the first frame is a B frame, the colocated picture
will now point to the current frame.

Test: run poc with and without this patch
Bug: 38115076
Change-Id: I48a8f128740551d6a9252931dafcf8c629ecad0d
2017-06-20 20:34:06 +00:00
Hamsalekha S
f0d2caa214 Added error check for output buffer size.
am: 3f6c941de5

Change-Id: I5b06314d7b3d0fb699160ba1326ecb31aedf3082
2017-06-19 20:02:48 +00:00
Hamsalekha S
3f6c941de5 Added error check for output buffer size.
The output buffer size given by the application, needs to be checked
in every process call. This is required in the case of resolution
change.

Bug: 36006815
Test: avcdec -i poc.bin
Change-Id: I16a92cdad23eb7b1e12c1a67c1b2599204f29249
2017-06-16 17:41:23 -07:00