Commit graph

560 commits

Author SHA1 Message Date
Harish Mahendrakar
e40cbbfc51 decoder: Move initialization of dbp_mgr entries to init_decoder() am: 01da7b5a52 am: 41fcd228ae am: cce42ea920 am: 6c9873af88 am: 662efee177 am: 873bac42ec am: 474797af3c
am: 942e7f8896

Change-Id: I3fb8acb951bc8043546ab1c8956b664427b16295
2019-11-05 17:20:44 -08:00
Harish Mahendrakar
942e7f8896 decoder: Move initialization of dbp_mgr entries to init_decoder() am: 01da7b5a52 am: 41fcd228ae am: cce42ea920 am: 6c9873af88 am: 662efee177 am: 873bac42ec
am: 474797af3c

Change-Id: I315a135615fdace5bc573e9f585133a991b30c77
2019-11-05 17:11:11 -08:00
Harish Mahendrakar
474797af3c decoder: Move initialization of dbp_mgr entries to init_decoder() am: 01da7b5a52 am: 41fcd228ae am: cce42ea920 am: 6c9873af88 am: 662efee177
am: 873bac42ec

Change-Id: I6f5d7d5486926100a815ffcddd134cf998d35c79
2019-11-05 17:05:10 -08:00
Harish Mahendrakar
662efee177 decoder: Move initialization of dbp_mgr entries to init_decoder() am: 01da7b5a52 am: 41fcd228ae am: cce42ea920
am: 6c9873af88

Change-Id: Ie95d6b810f751847eed7bc2c17c120a891b88fef
2019-11-05 16:52:06 -08:00
Harish Mahendrakar
cce42ea920 decoder: Move initialization of dbp_mgr entries to init_decoder() am: 01da7b5a52
am: 41fcd228ae

Change-Id: Id8fa44c3401f7ac1d2a540fa35cf0f4346da2c42
2019-11-05 16:31:59 -08:00
Chamarthi Kishore
68dce05ea6 Merge changes I015ebe03,Idc0b0db5 am: 00fa4b6490 am: 7684b467b4
am: d49fffd5f4

Change-Id: I0da6b5b695adb949b28ca9d29f806cd11625d2eb
2019-10-31 19:11:43 -07:00
Chamarthi Kishore
7684b467b4 Merge changes I015ebe03,Idc0b0db5
am: 00fa4b6490

Change-Id: I71e761af5fd1551643418dd7979491c2a6b7a7ee
2019-10-31 18:59:50 -07:00
Harish Mahendrakar
01da7b5a52 decoder: Move initialization of dbp_mgr entries to init_decoder()
Earlier these were only initialized during static buffer allocations.
Initializing them in init_decoder() will ensure that these get
initialized to default values during reset() as well. Without this,
in some error cases, there is a possibility of heap-use-after free,
when resolution changes and these pointers point to memory that is freed

Bug: 142602711
Test: poc in bug
Change-Id: Ie39fee0eca56bf32cdc558099bf167d05eb89620
2019-10-29 19:52:49 -07:00
Chamarthi Kishore
ad2eaf8c7d libavc: Add MDCV, CLL, CCV and AVE SEI messages
This commit add support for encoding and decoding of MDCV, CLL, CCV and
AVE SEI messages

Test: avcenc -c enc.cfg, avcdec -c dec.cfg
Bug: 141931623

Change-Id: Idc0b0db5291482ae2bc19cdff65669c32374b02a
2019-10-24 17:20:00 +05:30
Harish Mahendrakar
41ea72e48f Fix integer overflows in computing poc and pic numbers am: 1d672d2bea am: f2157c2dc1 am: 684b6687dc
am: 59b642608e

Change-Id: I94747dc0574d94ebbde3b071efb267eeb53799c3
2019-09-30 16:50:38 -07:00
Harish Mahendrakar
59b642608e Fix integer overflows in computing poc and pic numbers am: 1d672d2bea am: f2157c2dc1
am: 684b6687dc

Change-Id: Iec8807289080cb3c9c6081ba1ff59001983773ba
2019-09-30 16:43:37 -07:00
Harish Mahendrakar
1d672d2bea Fix integer overflows in computing poc and pic numbers
Test: poc in bug
Bug: 135303936
Bug: 136568141

Change-Id: Ie426c678b60f2d078d0b39e73a44d42d931d7fe3
2019-09-30 18:25:07 +00:00
Harish Mahendrakar
da990db40a Merge "Fix integer overflows while intializing reference lists" am: 47d5e6bb93 am: f374a3c5d1 am: 31d4186111
am: d6ed5b9a0c

Change-Id: I52d3e462e9cb180f943d003a12401d70e448dd42
2019-09-28 10:47:06 -07:00
Harish Mahendrakar
d6ed5b9a0c Merge "Fix integer overflows while intializing reference lists" am: 47d5e6bb93 am: f374a3c5d1
am: 31d4186111

Change-Id: I1b755de6009bfb55163bd8c13c65b17541198f33
2019-09-28 10:41:18 -07:00
Harish Mahendrakar
ef807fde69 Fix integer overflows while intializing reference lists
Instead of looping through all poc/pic numbers with an increment
of 1, loop through only valid poc/pic numbers after sorting them.
This prevents integer overflows when poc/pic number is INT32_MIN or
INT32_MAX

This also fixes a timeout issue seen when integer sanitizers are
not enabled

Bug: 135303936
Bug: 136568141
Bug: 141276890
Test: poc in bug

Change-Id: I5db80dd8e811cbb1a9ecd00363fac997551ccaf5
2019-09-26 15:21:02 -07:00
Rakesh Kumar
273ca63a27 Decoder: Add support for returning reorder_depth am: fe5a6ada3e
am: eecfff5a7a

Change-Id: I6bd85bb64158294a61a4d094942dadcbc240844e
2019-09-12 11:20:27 -07:00
Rakesh Kumar
eecfff5a7a Decoder: Add support for returning reorder_depth
am: fe5a6ada3e

Change-Id: Ia677a6ed414fa77ec1f67106261723bef6ea7f97
2019-09-12 11:11:24 -07:00
Rakesh Kumar
fe5a6ada3e Decoder: Add support for returning reorder_depth
Added support for returning reorder_depth for frames in decode order.

Bug: 138627015
Test: Verify reorder_depth returned for few clips

Change-Id: I9b68a9544d7d011cf93dfccd308c754b8e16e39e
2019-09-11 22:29:39 +00:00
Ray Essick
21b313a048 Merge "Added error check while parsing scaling_list" 2019-08-30 17:37:27 +00:00
Dan Willemsen
7e9cf837a5 Stop using __DATE__/__TIME__ on all builds am: d8383dc45e am: 90ca457b95 am: 7c0202abcb am: 368349eeae
am: 2dcff9fd23

Change-Id: Ic02fa909ceb3e34d0826727e0d393efd2f9b7786
2019-08-28 20:08:06 -07:00
Dan Willemsen
90ca457b95 Stop using __DATE__/__TIME__ on all builds
am: d8383dc45e

Change-Id: I58f071c0270bb7d080639f902ff772095ab2c139
2019-08-28 19:32:02 -07:00
Dan Willemsen
d8383dc45e Stop using __DATE__/__TIME__ on all builds
We're beginning to use remote caches with Android builds, so I'm turning
on -Werror=date-time so that host builds are also reproducible.

Test: treehugger
Test: mmma external/libavc
Change-Id: I581f3abf528a7bb5df6ee9963f4d72e2b4bb8a6c
2019-08-27 19:47:33 -07:00
Xin Li
9f3122c427 DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master
Bug: 139369544
Change-Id: If2c60e9bc1ed74a5204f42efd04f069f781b7ecf
2019-08-13 16:36:35 -07:00
Harish Mahendrakar
7befa935af Added error check while parsing scaling_list
Test: poc in bug
Bug: 134405507
Change-Id: Ic3289a4fb1652dd35be5e2b59dbc41f2c888786f
2019-07-22 13:55:21 -07:00
Isha Kulkarni
2f8dcdd41a Decoder: Avoid overlapping memcpy while initializing ref lists
Bug: 117608404
Test: poc with valgrind before/after

Change-Id: I73f2c5302376af11a8f922ceb2e0b1c9cf883f8b
2019-07-16 15:28:02 -07:00
Harish Mahendrakar
f76370c671 decoder: set u4_frame_decoded to true only after both fields are decoded
Currently frame_decoded was set to 1 after first field was decoded
This field in output wasn't used so far, hence no issue was seen till
now.

Bug: 135146280
Test: poc in bug
Change-Id: I90e20134258d828107adf43b5b3e37d4bd375cbd
2019-06-19 15:13:03 -07:00
Rakesh Kumar
13de16c79e Decoder: Delete node from st if lt and st point to same
If lt_list and st_list point to same node then delete it from st.
If there is error while adding a node in bottom field of lt_list (top is
already added) then this node will be pointed by st_list also. So we need
to remove it from st_list

bug: 73552574
Test: poc before/after on Android N security branch
Change-Id: I95304c242c5854b18c5c7220d114ce6215760124
(cherry picked from commit f312a1d305)
2019-06-12 09:54:49 +00:00
TreeHugger Robot
6db97fcc8d Merge "Decoder: Add error check for expected_poc in ih264d_decode_pic_order_cnt" into qt-dev 2019-05-30 17:31:28 +00:00
Rakesh Kumar
75cd59e45b [automerger] Decoder: Delete node from st if lt and st point to same am: f312a1d305 am: f82a1f8d7f am: ae2c8cfdc1 am: 8332d0bfa2 am: 1e6ef7fee5 am: b1734142ff am: 9460fbd521 am: 224bcf4592
am: d406f08816

Change-Id: I1351851c15384868d9ab579857e4fc46076f5942
2019-05-29 14:31:32 -07:00
Rakesh Kumar
224bcf4592 [automerger] Decoder: Delete node from st if lt and st point to same am: f312a1d305 am: f82a1f8d7f am: ae2c8cfdc1 am: 8332d0bfa2 am: 1e6ef7fee5 am: b1734142ff
am: 9460fbd521

Change-Id: I0c53bc30225153ff03d44670f6967a05e161c654
2019-05-29 14:16:23 -07:00
Isha Kulkarni
89daff526a Decoder: Add error check for expected_poc in ih264d_decode_pic_order_cnt
Bug: 131625739
Test: Validate with poc in bug

Change-Id: I3e1c132e28ad35541a0b9c4632b1f43611b90dea
2019-05-29 13:46:13 -07:00
Android Build Merger (Role)
b1734142ff [automerger] Decoder: Delete node from st if lt and st point to same am: f312a1d305 am: f82a1f8d7f am: ae2c8cfdc1 am: 8332d0bfa2 am: 1e6ef7fee5
Change-Id: Id6d3411d949ae069369d7bef1c50f904cf9c97dc
2019-05-08 18:45:13 +00:00
Android Build Merger (Role)
f82a1f8d7f [automerger] Decoder: Delete node from st if lt and st point to same am: f312a1d305
Change-Id: I90a0c3fca5d7542301994711448d7c79fe98e704
2019-05-08 18:45:05 +00:00
Rakesh Kumar
f312a1d305 Decoder: Delete node from st if lt and st point to same
If lt_list and st_list point to same node then delete it from st.
If there is error while adding a node in bottom field of lt_list (top is
already added) then this node will be pointed by st_list also. So we need
to remove it from st_list

bug: 73552574
Test: poc before/after on Android N security branch
Change-Id: I95304c242c5854b18c5c7220d114ce6215760124
2019-05-08 11:44:40 -07:00
TreeHugger Robot
6cb07e106a Merge "decoder: Remove skip picture support" into qt-dev 2019-05-04 21:16:35 +00:00
TreeHugger Robot
a09be99800 Merge "Decoder: Add missing error checks for parsing sps or pps" into qt-dev 2019-05-04 19:37:30 +00:00
Harish Mahendrakar
4f95fc0b9c decoder: Remove skip picture support
SKIP_P and SKIP_PB support was experimental and is not used
in libstagefright

Bug: 130541597
Test: poc in bug
Change-Id: If13b435e80d13d57de2fee0aa07ea7e6abca481b
2019-05-01 13:18:27 -07:00
Ritu Baldwa
b3427a4c49 Decoder: Add missing error checks for parsing sps or pps
Return error to application if valid sps or pps has not been decoded.
Also add check to prevent parsing of pps, if valid sps is not present.

Test: Tested a few clips with missing sps/pps
Bug: 129746168
Bug: 130575087

Change-Id: I1a6409d1cffc66c1b910d2102ab10a94e0227107
2019-05-01 13:01:23 -07:00
Harish Mahendrakar
54160a6d3e decoder: Treat unsupported feature errors as fatal errors
This will ensure clips with supported bitdepth or unsupport color
formats are not attempted to be decoded till end of the sequence.

Bug: 130578045
Test: adb shell stagefright -s -S /sdcard/crowd422_h264.mp4
Test: Ensure decoder doesn't attemp decoding all frames

Change-Id: I118ef2141f77986f6ec65c91dfeaa7ef17646c43
2019-04-30 17:14:01 -07:00
Isha Kulkarni
34769a5b08 Decoder: Fix Integer Sanitizer Issues
Bug: 118445723
Test: vendor
Change-Id: I719898beb93ca5d20d9822f685ac6d4920252cdf
2019-03-28 14:40:40 -07:00
Isha Kulkarni
43dc60e81e Decoder: Fix Integer Sanitizer Issues in ih264d_parse_cavlc
Bug:118445723
Test: vendor
Change-Id: I71b3c0f548b57c51c80de0bd4c640f56b2f31a55
2019-03-28 14:40:34 -07:00
Isha Shrikant Kulkarni
96f7193ba0 Decoder: Fix integer sanitizer issues in ih264d_parse_cabac
Bug: 118445723
Test: vendor
Change-Id: Icf98785fa474bd9c774ba4282b9c3d73360a69ea
2019-03-28 14:40:27 -07:00
Isha Shrikant Kulkarni
fc7139a53e Decoder: Fix Integer Sanitizer issues in ih264d_process_bslice
Bug: 118445723
Test: vendor
Change-Id: Ib5d8f72be016330beafa6e7996976eeff1b23c39
2019-03-28 14:40:17 -07:00
Xin Li
1c16be3720 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: Ie3a560c6683a7b355ad06d0f015cb536f327c8a4
2019-02-21 09:24:55 -08:00
Ray Essick
fbc772b17b Merge "Decoder: Add null check for scaling matrix." 2019-02-12 21:54:59 +00:00
Sasha Smundak
5302433b0a Explicitly include log/log.h instead of cutils/log.h
Eliminates the warning.
Test: treehugger

Bug: 123758136
Change-Id: Id8940e053c90c45ba39cdd27a44cc83f130487b7
Merged-In: Id8940e053c90c45ba39cdd27a44cc83f130487b7
2019-02-06 09:56:24 -08:00
Sasha Smundak
51f1a220ec Explicitly include log/log.h instead of cutils/log.h
Eliminates the warning.
Test: treehugger

Bug: 123758136
Change-Id: Id8940e053c90c45ba39cdd27a44cc83f130487b7
2019-02-01 10:45:14 -08:00
S Hamsalekha
f28de0366c Decoder: Add null check for scaling matrix.
Also void->word32 return type so failure can be signaled to caller.

Bug: 115743419
Test: vendor + poc
Change-Id: I0a07ac11255c2c672803aab7085824c417bde282
2019-01-08 11:37:37 -08:00
Harish Mahendrakar
b13124444c [automerger] decoder: Signal IVD_RES_CHANGED error for change in crop params am: 442a01bf37 am: 1d7d7f9bf6 am: acacf063c2 am: f33c02ed73 am: c09d3f99ab am: 145ae0d049 am: 4402b34a4f am: 7a6b55da22 am: 48900d4e51
am: 2e5273847c

Change-Id: I7cf3e92affd9c8e9f90df336441ef1b4d5d33734
2018-11-27 12:23:55 -08:00
Harish Mahendrakar
7a6b55da22 [automerger] decoder: Signal IVD_RES_CHANGED error for change in crop params am: 442a01bf37 am: 1d7d7f9bf6 am: acacf063c2 am: f33c02ed73 am: c09d3f99ab am: 145ae0d049
am: 4402b34a4f

Change-Id: I16ce7cfc21dcb0ccf10b4ce8109a61e272765120
2018-11-27 12:10:36 -08:00