Commit graph

229 commits

Author SHA1 Message Date
Harish Mahendrakar
b5a151fde9 Decoder: Fixes an out of bound write in bitstream buffer am: 33ef7de9dd am: 0aab4958fb am: 9f72b6eca1 am: 73a3e320d8 am: 89377f2acf am: 9801d7e8d5 am: 109509aeb0 am: cb36e15c72
am: 7b4dc14d83

Change-Id: I0201c20831a768a0e62054ef4d32c4e80044bb37
2017-02-13 19:04:17 +00:00
Harish Mahendrakar
7b4dc14d83 Decoder: Fixes an out of bound write in bitstream buffer am: 33ef7de9dd am: 0aab4958fb am: 9f72b6eca1 am: 73a3e320d8 am: 89377f2acf am: 9801d7e8d5 am: 109509aeb0
am: cb36e15c72

Change-Id: Ide9a6a1c78573941d4611f295622d8d8afa4ea9d
2017-02-13 19:01:46 +00:00
Harish Mahendrakar
89377f2acf Decoder: Fixes an out of bound write in bitstream buffer am: 33ef7de9dd am: 0aab4958fb am: 9f72b6eca1
am: 73a3e320d8

Change-Id: Id06cfbad9824a7921e4eb082417f14aa842bcfab
2017-02-13 18:52:16 +00:00
Harish Mahendrakar
73a3e320d8 Decoder: Fixes an out of bound write in bitstream buffer am: 33ef7de9dd am: 0aab4958fb
am: 9f72b6eca1

Change-Id: I3f25b86b4ad13ad3b7e9a85e51789145d4b1b0ab
2017-02-13 18:49:46 +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
33ef7de9dd Decoder: Fixes an out of bound write in bitstream buffer
[for mnc-dr-dev and later;  mnc-dev gets a different patch]

After emulation prevention, data is written as an int,
so at least 3 additional bytes should be available.
And since bitstream functions read 8 bytes ahead, 8 extra bytes
should be available in the bitstream buffer.

Bug: 33934721

Change-Id: I444ec6f85d01b0bade9f827e15c4b476779d6c69
2017-01-19 09:17:00 -08:00
Harish Mahendrakar
3fd5753edd Decoder: Initialize ps_cur_slice->u1_mbaff_frame_flag correctly for error cases am: 1d5640f2f9 am: 5a26569fa3 am: 18a58ec2b6 am: 575fdb281f am: f8b3e57266 am: afbbd8f654 am: d41032215c am: 1695a11ad9
am: ef33c8152b

Change-Id: I0706e82ceda5f4aace005932add112b4cac55b62
2017-01-18 21:27:43 +00:00
Harish Mahendrakar
afbbd8f654 Decoder: Initialize ps_cur_slice->u1_mbaff_frame_flag correctly for error cases am: 1d5640f2f9 am: 5a26569fa3 am: 18a58ec2b6 am: 575fdb281f
am: f8b3e57266

Change-Id: I7600f4b34e8e40d5118d04fdafed6f3a5b589c66
2017-01-18 21:20:13 +00:00
Harish Mahendrakar
f8b3e57266 Decoder: Initialize ps_cur_slice->u1_mbaff_frame_flag correctly for error cases am: 1d5640f2f9 am: 5a26569fa3 am: 18a58ec2b6
am: 575fdb281f

Change-Id: I735691b67ab0b41a8560b0bdd9aaaa5a3947b5d7
2017-01-18 21:17:41 +00:00
Harish Mahendrakar
5a26569fa3 Decoder: Initialize ps_cur_slice->u1_mbaff_frame_flag correctly for error cases
am: 1d5640f2f9

Change-Id: I32e960c752ccbc991f8ce04455618a534f1f52c7
2017-01-18 21:11:11 +00:00
Harish Mahendrakar
9b1b45e25e Decoder: Fix in checking first_mb_in_slice am: ef27433ca8 am: 274529d8aa am: 3c332522de am: 10f63a26aa am: de892335ff am: a917df6ae0 am: 7543cc871c am: dd87e2dfef
am: e8f6525a1f

Change-Id: I9f721d09a525a1e06d030a8604b34828e4624e24
2017-01-18 18:33:25 +00:00
Harish Mahendrakar
a917df6ae0 Decoder: Fix in checking first_mb_in_slice am: ef27433ca8 am: 274529d8aa am: 3c332522de am: 10f63a26aa
am: de892335ff

Change-Id: I1498d2411e0205532d8712de860f35d6a974d9bf
2017-01-18 18:26:25 +00:00
Harish Mahendrakar
de892335ff Decoder: Fix in checking first_mb_in_slice am: ef27433ca8 am: 274529d8aa am: 3c332522de
am: 10f63a26aa

Change-Id: If16c94f38fe3a1d064e684ed1a5b38434d1ddb5e
2017-01-18 18:23:55 +00:00
Harish Mahendrakar
274529d8aa Decoder: Fix in checking first_mb_in_slice
am: ef27433ca8

Change-Id: Ic27ccbbcad3d991862b7e680595ab0ae4fd23eb0
2017-01-18 18:18:24 +00:00
Harish Mahendrakar
0053d16a77 Decoder: Padded gau1_ih264d_top_left_mb_part_indx_mod to avoid an out of bound read am: b88f59d835 am: bb4b279eb1 am: 5508b75095 am: 3863ea3522
am: d54ff99a52

Change-Id: I4dfec6b75887b9f5c9e0ba50514763fedfd633ac
2017-01-18 18:01:51 +00:00
Harish Mahendrakar
d54ff99a52 Decoder: Padded gau1_ih264d_top_left_mb_part_indx_mod to avoid an out of bound read am: b88f59d835 am: bb4b279eb1 am: 5508b75095
am: 3863ea3522

Change-Id: I2acdc5b75c1ce175e997ec015647779a732ab67b
2017-01-18 17:54:20 +00:00
Harish Mahendrakar
bb4b279eb1 Decoder: Padded gau1_ih264d_top_left_mb_part_indx_mod to avoid an out of bound read
am: b88f59d835

Change-Id: If2e3c4258f8e64918e0ab066c9cc75cf8887c797
2017-01-18 17:32:47 +00:00
Harish Mahendrakar
5cede4f3cb Decoder: Increase memory allocation for weights & offsets for interlaced clips am: bee9b9a54b am: bfc735cf17 am: 87c2d690fa am: 826159785f am: 3f1af4a90c am: 1806c2e12b am: e4acdfb8c3
am: ff829f7be7

Change-Id: Id263f02a93a857e7794148ae756f8c51d6f5bf48
2017-01-18 17:26:17 +00:00
Harish Mahendrakar
3f1af4a90c Decoder: Increase memory allocation for weights & offsets for interlaced clips am: bee9b9a54b am: bfc735cf17 am: 87c2d690fa
am: 826159785f

Change-Id: Iba990d241d8eb893356b748812342bab4ffecae2
2017-01-18 16:59:45 +00:00
Harish Mahendrakar
826159785f Decoder: Increase memory allocation for weights & offsets for interlaced clips am: bee9b9a54b am: bfc735cf17
am: 87c2d690fa

Change-Id: Ida7b41157079a7f88088370bb19efce95f6d8ebd
2017-01-18 16:53:14 +00:00
Harish Mahendrakar
bfc735cf17 Decoder: Increase memory allocation for weights & offsets for interlaced clips
am: bee9b9a54b

Change-Id: I8c0bd3d77b87e6fb3f982ef70854b8ec73298636
2017-01-18 16:41:13 +00:00
Marco Nelissen
696b6f666c Merge "Decoder: Increase memory allocation for weights & offsets for interlaced clips" into mnc-dr-dev 2017-01-18 16:27:26 +00:00
Harish Mahendrakar
19ec2a3ffb Decoder: Fixed DoS in header decode when no PPS is present am: 2cd2f7a335 am: cec6503a20 am: 031a3fdbba am: 5a44d81d8c am: 60566cca95 am: e951e02347 am: a89050b3f2 am: b0dd5208aa
am: f4d148efea

Change-Id: I846c32d4977bb486683b6b7900b5c5cad5927e74
2017-01-18 00:45:45 +00:00
Harish Mahendrakar
e951e02347 Decoder: Fixed DoS in header decode when no PPS is present am: 2cd2f7a335 am: cec6503a20 am: 031a3fdbba am: 5a44d81d8c
am: 60566cca95

Change-Id: If921d86c80aa9ece6dd429d0e8a34edf02e97926
2017-01-18 00:36:15 +00:00
Harish Mahendrakar
60566cca95 Decoder: Fixed DoS in header decode when no PPS is present am: 2cd2f7a335 am: cec6503a20 am: 031a3fdbba
am: 5a44d81d8c

Change-Id: I9b33432ca0a8f6284d1af30f8ca4e868c65d5ff4
2017-01-18 00:33:44 +00:00
Harish Mahendrakar
cec6503a20 Decoder: Fixed DoS in header decode when no PPS is present
am: 2cd2f7a335

Change-Id: If8a7c11ef215a84a350cd0a734bca9c69b91f1c6
2017-01-18 00:26:14 +00:00
Harish Mahendrakar
b88f59d835 Decoder: Padded gau1_ih264d_top_left_mb_part_indx_mod to avoid an out of bound read
Change-Id: Ie8761de856ed8c7d08f3da61631c1bef446448e6
2017-01-17 16:12:12 -08:00
Harish Mahendrakar
ef27433ca8 Decoder: Fix in checking first_mb_in_slice
Also, increment slice header only if previous slice had atleast one MB
This is to ensure there is no out of bound read for streams with 1 MB, and
due to error 2 slices were being accessed.

Bug: 33982658
Change-Id: I5f1918c09e922ca39f495f6059dfea3fa1d49448
2017-01-17 16:02:35 -08:00
Harish Mahendrakar
bee9b9a54b Decoder: Increase memory allocation for weights & offsets for interlaced clips
Bug: 33816782
Change-Id: I65a5376f46902139f9fc49a2fff54b53b518d703
2017-01-17 15:25:56 -08:00
Harish Mahendrakar
2cd2f7a335 Decoder: Fixed DoS in header decode when no PPS is present
When the input does not contain PPS and decoder is in header decode
mode, decoder was entering an infinite loop.

Bug: 33621215
(cherry picked from commit 33e1b190d6db09bd72a9f0f51acef4b14eabd6ff)
2017-01-17 15:25:13 -08:00
Harish Mahendrakar
b2403fdf0b Decoder: Fixed number of MB calculation for interlaced error streams am: e1cf7ea8ae am: 4e7779e0ef am: ba9af1da5d am: aa51017b8f am: 06b61cfbe1 am: f273d0f53b am: 2396631fe9 am: 523e19f292
am: d27fae00e1

Change-Id: I6c5c9813cc048a9f120532c57303c6b517ee3e48
2017-01-17 20:52:58 +00:00
Harish Mahendrakar
f273d0f53b Decoder: Fixed number of MB calculation for interlaced error streams am: e1cf7ea8ae am: 4e7779e0ef am: ba9af1da5d am: aa51017b8f
am: 06b61cfbe1

Change-Id: I7c8748afaefdddbc170ab55c1da7fa7fe7ae0d16
2017-01-17 20:44:57 +00:00
Harish Mahendrakar
06b61cfbe1 Decoder: Fixed number of MB calculation for interlaced error streams am: e1cf7ea8ae am: 4e7779e0ef am: ba9af1da5d
am: aa51017b8f

Change-Id: I4964046bdc2a49f2a0f70896a2a2d5f606899844
2017-01-17 20:42:28 +00:00
Harish Mahendrakar
4e7779e0ef Decoder: Fixed number of MB calculation for interlaced error streams
am: e1cf7ea8ae

Change-Id: If723b1da6adf7a816c095f327023853bcaccd0c5
2017-01-17 20:34:28 +00:00
Marco Nelissen
c4f317b873 Merge "Decoder: Fixed number of MB calculation for interlaced error streams" into mnc-dev 2017-01-17 20:27:24 +00:00
Harish Mahendrakar
1d5640f2f9 Decoder: Initialize ps_cur_slice->u1_mbaff_frame_flag correctly for error cases
Bug: 34097213
Bug: 33641588
Change-Id: I40a6c5af7f1e46e1623ae1b399db3073123390fe
2017-01-17 09:39:50 -08:00
Harish Mahendrakar
57dac5a753 Decoder: Fixed an out of bound access while parsing SEI am: 99a85bb469 am: 1a77185504 am: 9f0eec950d am: 66fc94467f am: 7697718da3 am: 1ee70550c4 am: ab51c1716f am: 43ff3318ce
am: 62ab78b273

Change-Id: If222811b1406a11d5f745ad12a9019368fba4e7d
2017-01-14 00:45:11 +00:00
Harish Mahendrakar
1ee70550c4 Decoder: Fixed an out of bound access while parsing SEI am: 99a85bb469 am: 1a77185504 am: 9f0eec950d am: 66fc94467f
am: 7697718da3

Change-Id: I60972b612d472e62a7e76be398496c78a33a89fc
2017-01-14 00:36:41 +00:00
Harish Mahendrakar
7697718da3 Decoder: Fixed an out of bound access while parsing SEI am: 99a85bb469 am: 1a77185504 am: 9f0eec950d
am: 66fc94467f

Change-Id: I8f6b2007c5f223e4333b72e7fedcecd4c2a7b2bf
2017-01-14 00:34:40 +00:00
Harish Mahendrakar
1a77185504 Decoder: Fixed an out of bound access while parsing SEI
am: 99a85bb469

Change-Id: I81440daff1ec1ff71dedb40e231e0b596de9a6fd
2017-01-14 00:27:40 +00:00
Harish Mahendrakar
99a85bb469 Decoder: Fixed an out of bound access while parsing SEI
Invalid SPS Id read was resulting in an out of bound read
Bug: 33552073
Change-Id: Ie5b80222fc7ac3a64475340371be0facdf999d7b

(cherry picked from commit d3d60c6a5d7ab605d19b9ac4b95bc227b7b870dc)
2017-01-13 10:33:18 -08:00
Harish Mahendrakar
d89d151c2a Call ih264d_deblock_display only for valid process calls am: 318368435f am: 2c71fb1941 am: d2977b77e3 am: d66e74cdbf am: 40ebdfd0fb am: cdb1b16a45 am: f9627fe750 am: ee30608e37
am: f38e192634

Change-Id: Ia0f241a57ec28cf5335ff66a7e1d8758a1b0f09c
2017-01-09 17:42:49 +00:00
Harish Mahendrakar
cdb1b16a45 Call ih264d_deblock_display only for valid process calls am: 318368435f am: 2c71fb1941 am: d2977b77e3 am: d66e74cdbf
am: 40ebdfd0fb

Change-Id: I363759fc9520fd49f2b365d42e578e10d858db04
2017-01-09 17:22:48 +00:00
Harish Mahendrakar
40ebdfd0fb Call ih264d_deblock_display only for valid process calls am: 318368435f am: 2c71fb1941 am: d2977b77e3
am: d66e74cdbf

Change-Id: I962aae8ffd9d6acb93a92e12f1424bfe54f96d53
2017-01-09 17:18:38 +00:00
Harish Mahendrakar
2c71fb1941 Call ih264d_deblock_display only for valid process calls
am: 318368435f

Change-Id: I210dfb1eaf04b3ddceffa041c43e25e52023090d
2017-01-09 17:03:46 +00:00
Marco Nelissen
9c2c615c92 Merge "Call ih264d_deblock_display only for valid process calls" into mnc-dev 2017-01-09 16:58:51 +00:00
Harish Mahendrakar
d1fe8ffab7 Decoder: Fix in MB count in MBAff error handling am: 43e0aa2210 am: 5745d5d1a2 am: dafabbc424 am: 296ccc24de am: 8edce048d0 am: 2ce937ef07 am: fbd405bfc0 am: ce8b6307b2
am: f3aa3e74d0

Change-Id: I18f76f82f93c4266e3f91d91c365560a5895b591
2017-01-09 16:44:45 +00:00
Harish Mahendrakar
2ce937ef07 Decoder: Fix in MB count in MBAff error handling am: 43e0aa2210 am: 5745d5d1a2 am: dafabbc424 am: 296ccc24de
am: 8edce048d0

Change-Id: I0c65e48e0d63ce06e6f45aabc88351546a3834d3
2017-01-09 16:24:44 +00:00
Harish Mahendrakar
8edce048d0 Decoder: Fix in MB count in MBAff error handling am: 43e0aa2210 am: 5745d5d1a2 am: dafabbc424
am: 296ccc24de

Change-Id: If235abc0bf790d89d09cdd563a1002a4b3dc4284
2017-01-09 16:20:03 +00:00
Harish Mahendrakar
5745d5d1a2 Decoder: Fix in MB count in MBAff error handling
am: 43e0aa2210

Change-Id: I7e3f3ba1dacffb592fa08475652696be887be2ab
2017-01-09 16:06:12 +00:00