Commit graph

418 commits

Author SHA1 Message Date
Harish Mahendrakar
e5c2c33295 Added an out of bound check on u4_num_bufs in input argument am: aa11ab9fdb am: 50ec420228 am: 0514a1ebfb am: fa8bb9d89c am: 96228ba3b9 am: 4a6a743d40 am: 4ed04c7bb1 am: b9027e8cc1 am: 859498bb08 am: 31b397c813
am: 8564f06db6

Change-Id: I8e572678c2d456b7458793449cbf7e72e6b63b9b
2017-09-11 22:43:26 +00:00
Hamsalekha S
ba77e93be7 Decoder: Conceal picture only if valid picture buffer is obtained. am: 5df744afde am: 7f78e3aa9a am: 8810e9db7f am: 1ab3e51baf am: 32c369cc3f am: fd327a47fb am: b10090d47a am: 2825c578d3 am: 1d6b06a73a
am: 7f049a7472

Change-Id: I5a44be13778eb16c0300d13e5dc1c32d7e0c506a
2017-09-11 22:43:13 +00:00
Harish Mahendrakar
31b397c813 Added an out of bound check on u4_num_bufs in input argument am: aa11ab9fdb am: 50ec420228 am: 0514a1ebfb am: fa8bb9d89c am: 96228ba3b9 am: 4a6a743d40 am: 4ed04c7bb1 am: b9027e8cc1
am: 859498bb08

Change-Id: I364cdcdd56d88f411892723935683d16ffcd0321
2017-09-11 22:39:38 +00:00
Hamsalekha S
1d6b06a73a Decoder: Conceal picture only if valid picture buffer is obtained. am: 5df744afde am: 7f78e3aa9a am: 8810e9db7f am: 1ab3e51baf am: 32c369cc3f am: fd327a47fb am: b10090d47a
am: 2825c578d3

Change-Id: I1bf0cb0c96c45b419c06bd9b1d202b1ff08193e4
2017-09-11 22:39:14 +00:00
Harish Mahendrakar
4a6a743d40 Added an out of bound check on u4_num_bufs in input argument am: aa11ab9fdb am: 50ec420228 am: 0514a1ebfb am: fa8bb9d89c
am: 96228ba3b9

Change-Id: Ic048f96697bdaedea3bbc0a8cf1acf78ed488e37
2017-09-11 22:30:10 +00:00
Hamsalekha S
32c369cc3f Decoder: Conceal picture only if valid picture buffer is obtained. am: 5df744afde am: 7f78e3aa9a am: 8810e9db7f
am: 1ab3e51baf

Change-Id: I964f1bd1fc0d9534d6c9498864cc7831d13de449
2017-09-11 22:28:11 +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
Lajos Molnar
09c8cb1b30 support 4080 max dimension
4096 is 256 macroblocks which does not fit on 8-bits, and 8-bits
are used for some variables that contain the size.

Bug: 65438670
Change-Id: Id977303054841c458cbd21c1538a9035d178fbef
2017-09-08 12:42:40 -07:00
Lajos Molnar
8a7f15c3d4 support 4K max dimension
This is required for handling 4K thumbnails that may be rotated.

Bug: 64939294
Change-Id: Ia33d8e1ce7fb07b5ec6bf604d30cd8f75c3228ae
2017-08-24 19:07:58 -07: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
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
6f82dff7b9 Decoder: Fixed allocation of pv_map_ref_idx_to_poc_buf. am: a925a6b539 am: bf8b7083e9 am: ebae2ef7bd
am: d5ad4f8c04

Change-Id: I8c096a96d86379e40d02c445e95044055b124d73
2017-07-15 00:48:02 +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
Ray Essick
707287f248 Merge "Decoder : Fix memory leak when sps changes." 2017-07-11 04:03:40 +00:00
Hamsalekha S
674fb1aa06 Decoder: Fixed overflow in refernce list creation. am: cbcd2846fa am: a54dcc6338 am: 136293c373 am: 28702336ea am: d4d96c6267 am: eaf6bed710 am: 400685c446 am: 4192026584
am: d00e2547c9

Change-Id: I2939be93a829b4ede24a1285fd337109e2f388d2
2017-07-10 19:25:26 +00:00
Hamsalekha S
eaf6bed710 Decoder: Fixed overflow in refernce list creation. am: cbcd2846fa am: a54dcc6338 am: 136293c373 am: 28702336ea
am: d4d96c6267

Change-Id: Ic9b4e1910349f0d110d286d0c7d013bf3f20e239
2017-07-10 19:06:53 +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
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
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
f7de034890 Initialize DPB structures to valid values. am: b8d362561e am: 278ed70003 am: f178731344 am: ed0086bd3f am: aa22ca288d am: b2503ce9ad am: 2025670e41 am: 630d10abba
am: 8a712339cf

Change-Id: Iac74df1e352c4021aca883932c198cfc99714405
2017-06-26 22:16:03 +00:00
Hamsalekha S
b2503ce9ad Initialize DPB structures to valid values. am: b8d362561e am: 278ed70003 am: f178731344 am: ed0086bd3f
am: aa22ca288d

Change-Id: I7de594095bbe168e230814fa4ba82b2422988e0d
2017-06-26 22:03:06 +00: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
2e10678938 Added error check for output buffer size. am: 3f6c941de5 am: f0d2caa214 am: 9a6312ec9f am: 83c397d1ab am: 462316f8d2 am: 564bdc7609 am: 3aa85a9cc5 am: 873d325720
am: 08d268a942

Change-Id: I04d24975487e9188d30ff1ebac6f76e563143ef4
2017-06-19 20:49:53 +00:00
Hamsalekha S
564bdc7609 Added error check for output buffer size. am: 3f6c941de5 am: f0d2caa214 am: 9a6312ec9f am: 83c397d1ab
am: 462316f8d2

Change-Id: Id9021bcb9534cd9b30063eb9be6de464014c67d7
2017-06-19 20:26:20 +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
Ray Essick
a8c9c1172c Merge "Fixed hang in the case of multiple sps id." into mnc-dev am: 16b019a620 am: 5ecccccbd7 am: 5cf7f81ca3 am: 33fef92f58
am: e0f81b63d0

Change-Id: I4d43f9e9518b900c592b9714e492791337d65ba0
2017-06-07 00:06:11 +00: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
c779300bb7 Merge "Decoder: Fix in the case of MMCO 6" into mnc-dev am: 6b3d20c032 am: 4bbbcfe76d am: ccbbaa640c am: e3e6c70c19 am: 8757210aba am: c11fe0ec2a am: 72d456ce75 am: 9200ba74ea
am: bdb0d58917

Change-Id: I9e568ebafb71b43e801821bdfc35263a45147e1f
2017-06-06 23:13:31 +00:00
Hamsalekha S
c11fe0ec2a Merge "Decoder: Fix in the case of MMCO 6" into mnc-dev am: 6b3d20c032 am: 4bbbcfe76d am: ccbbaa640c am: e3e6c70c19
am: 8757210aba

Change-Id: I14784632eb052b3d5652b5b9008b362c5ed6c3ab
2017-06-06 23:06:29 +00:00
Hamsalekha S
4bbbcfe76d Merge "Decoder: Fix in the case of MMCO 6" into mnc-dev
am: 6b3d20c032

Change-Id: I7cc789a4b548e19077559799096e927d44ffdbb0
2017-06-06 22:58:00 +00:00
TreeHugger Robot
6b3d20c032 Merge "Decoder: Fix in the case of MMCO 6" into mnc-dev 2017-06-06 22:54:33 +00:00
Hamsalekha S
5aea82620f Decoder: Cleaned up parse sps function. am: 4eb72f7c93 am: a0cec24429 am: fc2be1555c am: e8db799093
am: b0248db184

Change-Id: If9403a5cb98abfbdd5fddee5ceb1cd62f8a9fc86
2017-06-06 22:24:26 +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
41489f9ece Decoder: Fix in the case of MMCO 6
Added an error check in the case of MMCO 6
(SET_LT_INDEX)

Bug: 38014992
Test: POC fails before / works after patch
Change-Id: I76e38a8e2ff0bab043b47f44f1f7b1d4fe60d416
(cherry picked from commit 9e4f0ce704)
2017-06-06 21:37:21 +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
Marco Nelissen
36ffbf2beb 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: Ib1a5ed2bf00305861149aa220ac54b65673da4b2
2017-06-06 21:09:49 +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
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
a7b1d1c722 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: I72143bf248487f085dbf816f9b2795c837dbb575
2017-06-06 18:30:46 +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