Commit graph

110 commits

Author SHA1 Message Date
Marco Nelissen
ed60896ead Merge "Initializing reference list for every P/B slice." into mnc-dev am: 3477b8e0d7 am: d98f1cf41b am: 18c5ca6984 am: 3cc8a48116 am: 93767dc556 am: 900303e2b0 am: 610062c062 am: 12d32dedae
am: 3b7dde2b72

Change-Id: I83cb5c83b4cc97283b017dd9762dc4ff5f074063
2017-06-06 21:07:50 +00:00
Marco Nelissen
900303e2b0 Merge "Initializing reference list for every P/B slice." into mnc-dev am: 3477b8e0d7 am: d98f1cf41b am: 18c5ca6984 am: 3cc8a48116
am: 93767dc556

Change-Id: I7a1787851643bd77bb509f65d378482bb4f1957c
2017-06-06 20:50:48 +00:00
Marco Nelissen
d98f1cf41b Merge "Initializing reference list for every P/B slice." into mnc-dev
am: 3477b8e0d7

Change-Id: I0ccb9c141c7e7e1b8be6e8e6ddc1c333c10a8662
2017-06-06 20:27:41 +00:00
Marco Nelissen
3477b8e0d7 Merge "Initializing reference list for every P/B slice." into mnc-dev 2017-06-06 20:14:42 +00:00
Hamsalekha S
11739774e1 Merge "Fix resolution change within a decode call." into mnc-dev am: 7fc42b801c am: 252ca18add am: 4c6288e861 am: 90fc697c82 am: 8b3d043280 am: d603f906d2 am: e1b496babb am: 85b8159cf0
am: 6edcc25a5a

Change-Id: I3f457a8d87feff17862d7eb26858068683d3c9b1
2017-06-06 18:30:08 +00:00
Hamsalekha S
d603f906d2 Merge "Fix resolution change within a decode call." into mnc-dev am: 7fc42b801c am: 252ca18add am: 4c6288e861 am: 90fc697c82
am: 8b3d043280

Change-Id: I3812d5c6cd9ea03959c020ad12ceec69144a282c
2017-06-06 18:05:00 +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
TreeHugger Robot
7fc42b801c Merge "Fix resolution change within a decode call." into mnc-dev 2017-06-06 17:32:41 +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
0a91df5eca Merge "DO NOT MERGE Decoder: Fixed allocation size of pred info buffer" into mnc-dev 2017-06-02 18:40:21 +00:00
Hamsalekha S
f9d3f9af8f Initializing reference list for every P/B slice.
Reference list needs to be initialized for every P/B
slice, to ensure colocated picture always points to a
valid picture buffer, even in the case of error.

Bug: 36279112

Change-Id: I051d7e725b0af209cc7bb333db8da3518adf78a0
2017-06-02 10:22:52 -07:00
Marco Nelissen
4c3a564cd5 Merge "Decoder: Fix allocation for Mbaff weight matrix" into mnc-dr-dev am: db8f1ae73f am: dcbf996666 am: 8b4c87943a am: 672cb37cc6 am: ad69241f3a am: 7ba9ed2338 am: fed8ee727b
am: 5ed090d7d8

Change-Id: I5350e400a52e386affd04bcff694f70c1c5b0d70
2017-05-16 15:49:53 +00:00
Marco Nelissen
ad69241f3a Merge "Decoder: Fix allocation for Mbaff weight matrix" into mnc-dr-dev am: db8f1ae73f am: dcbf996666 am: 8b4c87943a
am: 672cb37cc6

Change-Id: Ic3a2832c01bd74ab7a3c788f5e04a6161fed4c78
2017-05-16 15:36:52 +00:00
Marco Nelissen
db8f1ae73f Merge "Decoder: Fix allocation for Mbaff weight matrix" into mnc-dr-dev 2017-05-16 15:22:17 +00:00
Hamsalekha S
eff1a1d6ca Merge "Decoder: Fixed flag u1_top_bottom_decoded." into mnc-dev am: cc07eaa5d2 am: 9a5c62841e am: 514d08016a am: 4dd1490ec9 am: 122d0942a8 am: 917c7eee1c am: d189b84641 am: 9e191ce3a6
am: ae093b98bc

Change-Id: Ia9ec6cfdd6411cd9088afba3bbae21adbed3e977
2017-05-12 23:10:01 +00:00
Hamsalekha S
917c7eee1c Merge "Decoder: Fixed flag u1_top_bottom_decoded." into mnc-dev am: cc07eaa5d2 am: 9a5c62841e am: 514d08016a am: 4dd1490ec9
am: 122d0942a8

Change-Id: I53408f560fed7e2a5d88d5a3e3e5f77f01deb41d
2017-05-12 23:02:32 +00:00
Hamsalekha S
9a5c62841e Merge "Decoder: Fixed flag u1_top_bottom_decoded." into mnc-dev
am: cc07eaa5d2

Change-Id: Ie410da29e20aed95d674aaaeddd683e1f616c448
2017-05-12 22:51:00 +00:00
Hamsalekha S
07db35ad5a Decoder: Fix allocation for Mbaff weight matrix
Increased the allocation size for Mbaff weight
matrix buffer

Bug: 36996978

Change-Id: I21cf2cb1010abdc6346f743f5237ae1730c4bf41
2017-05-12 14:11:10 -07:00
Hamsalekha S
7703822731 Decoder: Fixed flag u1_top_bottom_decoded.
Fixed initialization of flag u1_top_bottom_decoded
in decoder context. This flag indicates if top
field and botton field is decoded.

Bug: 36993291
Test: avcdec --input poc.h264 --output /dev/null
Change-Id: I9f8a2620683abd8b15e4780d76d4849394710716
2017-05-12 20:14:46 +00:00
Hamsalekha S
6a5cb80068 DO NOT MERGE 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-11 15:09:57 -07:00
Harish Mahendrakar
b1bbfa5320 Decoder: Fixed initialization of first_slice_in_pic am: 0b23c81c3d am: 16fa990ce1 am: ab79eb3973 am: a37d120eb2 am: c011eeade7 am: 94e17dc822 am: 9117d918dd
am: f837a7796b

Change-Id: Ic4d24cc5d546abf49a2cef788226ff3a3ab92720
2017-02-14 17:18:39 +00:00
Harish Mahendrakar
20c2cfbc12 Decoder: Moved end of pic processing to end of decode call am: 494561291a am: ba7f9e2aed am: 26bb8b98ee am: 89fa016b5f am: df2fa01c9e am: 7944003371 am: fd5c8e352a
am: 9432beb534

Change-Id: Icd9bf9c1786a5758cf8ec4f6a5b4b6a96daef1dd
2017-02-14 17:16:16 +00:00
Harish Mahendrakar
94e17dc822 Decoder: Fixed initialization of first_slice_in_pic am: 0b23c81c3d am: 16fa990ce1 am: ab79eb3973 am: a37d120eb2
am: c011eeade7

Change-Id: I3f850497c864277c2b2524fab07d14a249e48afc
2017-02-14 17:11:38 +00:00
Harish Mahendrakar
7944003371 Decoder: Moved end of pic processing to end of decode call am: 494561291a am: ba7f9e2aed am: 26bb8b98ee am: 89fa016b5f
am: df2fa01c9e

Change-Id: Ifc329cbccad01c70ff1fea0d483cb155b15b3cc1
2017-02-14 17:08:45 +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
ba7f9e2aed Decoder: Moved end of pic processing to end of decode call
am: 494561291a

Change-Id: Id3867f5dd0788f12f6827ed311a309d1fa58c535
2017-02-14 17:00:16 +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
494561291a Decoder: Moved end of pic processing to end of decode call
ih264d_end_of_pic() was called after parsing slice of a new picture.
This is now being done at the end of decode of the current picture.
decode_gaps_in_frame_num which needs frame_num of new slice is now
done after decoding frame_num in new slice.

This helps in handling errors in picaff streams with gaps in frames

Bug: 33588051
Bug: 33641588
Bug: 34097231
Change-Id: I1a26e611aaa2c19e2043e05a210849bd21b22220
2017-02-14 16:58:07 +00:00
Harish Mahendrakar
1f0ab0b089 DO NOT MERGE: Decoder: Fixes an out of bound write in bitstream buffer
[this is for mnc-dev only, not any other mnc-*-dev flavors;
there is a different patch for mnc-dr-dev, nyc-* and going forward]

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
Test: Ittiam testing, POC in the bug no longer fails
Change-Id: I444ec6f85d01b0bade9f827e15c4b476779d6c69
2017-02-13 14:44:11 -08:00
Harish Mahendrakar
d24b4a2fca Decoder: Fixes an out of bound write in bitstream buffer am: 33ef7de9dd am: 0aab4958fb am: 9f72b6eca1 am: 73a3e320d8 am: 89377f2acf am: 9801d7e8d5
am: 109509aeb0

Change-Id: I5d0e3112f87665bc116966c963b2b60bbdc586d7
2017-02-13 18:59:47 +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
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
Marco Nelissen
d5424f66e3 Merge "DO NOT MERGE Decoder: Increase memory allocation for weights & offsets for interlaced clips" into mnc-dev 2017-01-18 18:42:47 +00:00
Harish Mahendrakar
4b2c277d9c Decoder: Increase memory allocation for weights & offsets for interlaced clips am: bee9b9a54b am: bfc735cf17 am: 87c2d690fa am: 826159785f am: 3f1af4a90c am: 1806c2e12b
am: e4acdfb8c3

Change-Id: I6fb6416d7960ba01036fc1098993b198b6fb1350
2017-01-18 17:19:47 +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
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
3101a6aa5a 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

Change-Id: I34ade8ad8531dfb9daa741371cb5359cf1a51152
2017-01-18 00:43:15 +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
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
TreeHugger Robot
e74ab7dba4 Merge "Decoder: Fixed DoS in header decode when no PPS is present" into mnc-dev 2017-01-18 00:23:33 +00: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
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
6887e085d7 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

Change-Id: If3acb58877f94f30eae6af1225532fae2e133579
2017-01-17 20:50:28 +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
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
4300da4d0e 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

Change-Id: Idf70ab86588118496148cb32213ddc5856eec6fc
2017-01-09 17:37: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