Commit graph

32 commits

Author SHA1 Message Date
Harish Mahendrakar
ff7ccdab0c Fix in the case of invalid SPS PPS
am: c2e8ffe451

Change-Id: Iaf266c5ff2187ba980737b699884e3ebebe87bd0
2016-09-21 20:38:58 +00:00
Harish Mahendrakar
c2e8ffe451 Fix in the case of invalid SPS PPS
Bug: 31092462
Change-Id: I0e2ab5a1088717bbf36f6b0cf859b5a6e0f59c5d
2016-09-21 09:50:06 -07:00
Harish Mahendrakar
ff54ee6115 Fixed error concealment when no MBs are decoded in the current pic
am: b926905ee2

Change-Id: I8a0a6fc068b543a4431b085c9335301e89ef2e14
2016-07-14 01:22:44 +00:00
Harish Mahendrakar
b926905ee2 Fixed error concealment when no MBs are decoded in the current pic
Bug: 29493002
Change-Id: I3fae547ddb0616b4e6579580985232bd3d65881e
2016-07-13 17:32:27 -07:00
Harish Mahendrakar
c73e000665 Merge \"Decoder: Initialize first_pb_nal_in_pic for error slices\" into mnc-dev
am: b9d7cba8bf

Change-Id: I62f9c45eea70968942198b20f47c158dede39d8d
2016-06-21 18:53:18 +00:00
Robert Shih
b9d7cba8bf Merge "Decoder: Initialize first_pb_nal_in_pic for error slices" into mnc-dev 2016-06-21 18:47:11 +00:00
Harish Mahendrakar
48b182db5d Decoder: Do not conceal slices with invalid SPS/PPS
am: 3a419eac8d

Change-Id: I09e962ab090f890a149cb967f2b04fd95a7d76d7
2016-06-21 17:35:49 +00:00
Harish Mahendrakar
7a54468cf8 Decoder: Initialize first_pb_nal_in_pic for error slices
first_pb_nal_in_pic was uninitialized for error clips

Bug: 29023649

Change-Id: Ie4e0a94059c5f675bf619e31534846e2c2ca58ae
2016-06-16 17:28:19 -07:00
Harish Mahendrakar
3a419eac8d Decoder: Do not conceal slices with invalid SPS/PPS
Bug: 28835995
2016-06-14 13:43:54 -07:00
Harish Mahendrakar
d75185f90e Merge \"Decoder: Fix slice number increment for error clips\" into mnc-dev
am: 2e88a2aa67

Change-Id: I791c029e3b39202db3f49f13fbb511904b5e8fef
2016-06-10 21:31:13 +00:00
Marco Nelissen
2e88a2aa67 Merge "Decoder: Fix slice number increment for error clips" into mnc-dev 2016-06-10 21:21:44 +00:00
Harish Mahendrakar
5e4f64c074 Decoder: Fix slice number increment for error clips
Bug: 28673410
2016-06-09 08:31:55 -07:00
Harish Mahendrakar
2c9d67ffaf Fix slice params for interlaced video
Bug: 28165661
Change-Id: I912a86bd78ebf0617fd2bc6eb2b5a61afc17bf53
2016-05-25 20:06:08 +00:00
Harish Mahendrakar
cdfd7573ec Fix slice params for interlaced video
Bug: 28165661
Change-Id: I912a86bd78ebf0617fd2bc6eb2b5a61afc17bf53
2016-05-25 02:25:00 +00:00
Harish Mahendrakar
129a6006b4 Decoder: Initialize slice parameters before concealing error MBs
am: 33db7a0f4e

* commit '33db7a0f4e':
  Decoder: Initialize slice parameters before concealing error MBs

Change-Id: I91b5e507d6871e523add85ed774c5de2b85fcf18
2016-05-23 18:34:43 +00:00
Harish Mahendrakar
33db7a0f4e Decoder: Initialize slice parameters before concealing error MBs
Also memset ps_dec_op structure to zero.
For error input, this ensures dimensions are initialized to zero

Bug: 28165661
Change-Id: I66eb2ddc5e02e74b7ff04da5f749443920f37141
2016-05-20 15:27:35 -07:00
Harish Mahendrakar
370bd8625d Decoder: Memset few structures to zero to handle error clips
Bug: 27907656
Change-Id: I671d135dd5c324c39b4ede990b7225d52ba882cd
2016-05-11 09:20:48 -07:00
Harish Mahendrakar
43a1cf620f DO NOT MERGE. AVC decoder: init structures
Memset few structures to zero to handle error clips

Bug: 27907656
Change-Id: I517841fc8b6d674f7e4e3ebaf60dd2e42f1152ae
2016-05-11 08:18:59 -07:00
Harish Mahendrakar
1284f0c297 Ensure ih264d_start_of_pic() is not repeated in ih264d_mark_err_slice_skip()
am: c7a1cf4e0b

* commit 'c7a1cf4e0b':
  Ensure ih264d_start_of_pic() is not repeated in ih264d_mark_err_slice_skip()
2016-02-23 02:25:36 +00:00
Harish Mahendrakar
c7a1cf4e0b Ensure ih264d_start_of_pic() is not repeated in ih264d_mark_err_slice_skip()
In case of error in handling MMCO commpands/reference list creation,
ih264d_start_of_pic() was called again in ih264d_mark_err_slice_skip() resulting in
leaking a picture or an MV buffer in buffer manager.

To fix this, ensure prev_slice_err is set to 1 only if u4_pic_buf_got is zero, before
calling ih264d_mark_err_slice_skip() at the end of picture decode.
This will ensure ih264d_start_of_pic() is not repeated

Bug: 25818142

Change-Id: I7d5a9179533581eec663bc6a19a2901e7cce6af3
2016-02-22 14:27:52 -08:00
Dan Willemsen
1c01bc10a9 Remove __DATE__/__TIME__ from Android builds
This removes unnecessary changes from build to build.

Bug: 24204119
Change-Id: I25258314fe56ea186d38d756fb5fb04aa689a812
(cherry picked from commit f197ccb756)
2015-10-30 21:54:53 +00:00
Harish Mahendrakar
7ba9f34a49 Decoder: Memset 8 extra bytes at the end of internal bitstream buffer
Decoder may read 8 extra bytes at the end of this buffer, though it will never be used
Setting it to zero will ensure unitialized reads are avoided

Change-Id: I724239861cb9fa64f3a70cb5450e094cb3afa20c
2015-10-16 20:12:42 +00:00
Harish Mahendrakar
e027a11e31 Decoder: Exit gracefully in case of allocation failure
Skip error concealment when allocation fails for decoder buffers

Change-Id: I785f31cad5dca52c8c67cba78cdd330b7b4539e1
2015-10-16 19:29:43 +00:00
Harish Mahendrakar
59348127de Decoder: Fixed an issue in handling flush
Fixed a NULL pointer reference, when flush is called before
decoding any pictures.

This was seen in following CTS test,
android.media.cts.DecoderTest#testCodecResetsH264WithSurface

Fixed code formatting issues in ih264d_set_flush_mode
Updated the testbench to call flush before decoding starts

Bug: 24405410

Change-Id: Ib04e0b15573b2482c9d5b43c8bc7dd30d8f8efdd
2015-09-25 22:24:55 +00:00
Harish Mahendrakar
251b007ecc Decoder: Reduced memory requirements
Memory allocations are now done based on contents of SPS
API changed to move allocations inside the library

Also changed strlen to strnlen

Bug: 24221026

Change-Id: I9130457f564cddb4da7ec6399cc9fe88ee871217
2015-09-23 18:35:27 +00:00
Hamsalekha S
e789d1d2e2 Decoder: Fixed issues shown by Valgrind
The slice header structure has now been initialized to 0
Fixed bug in closing of threads in the case of error.

Bug: 22860270

Change-Id: I777e0b73ad2f083c72be179984f5c1cb00ededb6
2015-07-31 18:52:32 +00:00
Martin Storsjo
086dd8ea90 Don't declare variables after statements
This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.

Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
2015-06-25 08:25:58 -07:00
Martin Storsjo
85a43d2fcf Fix string handling for generating version strings
Don't do concatenation with strncat; the length parameter in strncat
is only for how many chars to append at most, not for the full output
buffer size. To safely use strncat, one would have to do
strncat(buf, str, sizeof(buf) - strlen(buf)).

By using snprintf, we guarantee that the buffer is null terminated, and
we don't need to use strnlen at all.

(If compatibility with older MSVC versions that lack snprintf, one
can use _snprintf instead and manually add the null termination.)

Change-Id: I1c2322c7a406ddd5e6551a96c460da60deeffda1
2015-06-25 08:25:52 -07:00
Hamsalekha S
9f0dcba9b4 Improved error resilience in decoder
Fixed buffer management for error cases
Fixed end of picture detection logic for multiple slice error cases
Fixed handling of incomplete frame, missing slices.

Change-Id: Iae447667e4d88869a8bf992180cacd77870b9877
2015-06-25 08:25:44 -07:00
Marco Nelissen
8ef4c3f614 Multithreading changes and better error resilience
Fixed the following bugs
Issue 21145276
Issue 21144884
Issue 21181133
Issue 21181134

Decoder now returns error if the level in stream is higher than level at init

Change-Id: I8892c62bd98f7854d046510330c05a1e9ca826b2
2015-06-03 07:27:36 -07:00
Lajos Molnar
a2b49e5f05 fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:51:34 +00:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30