Commit graph

21 commits

Author SHA1 Message Date
Harish Mahendrakar
ef3da4e699 Decoder: Fix stack underflow in CAVLC 4x4 parse functions
Bug: 26399350
Change-Id: Id768751672a7b093ab6e53d4fc0b3188d470920e
2016-02-22 14:54:08 -08: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
Naveen Kumar Ponnusamy
943323f1d9 Return error when there are more mmco params than allocated size
Bug: 25818142

Change-Id: I5c1b23985eeca5192b42703c627ca3d060e4e13d
2016-01-13 21:18:46 +00:00
Harish Mahendrakar
4a524d3a8a Decoder Update mb count after mb map is set.
Bug: 25928803

Change-Id: Iccc58a7dd1c5c6ea656dfca332cfb8dddba4de37
2016-01-07 11:08:06 -08:00
Harish Mahendrakar
2ee0c1bced Return error in SPS/PPS parsing when extra bytes are read from input
Bug: 24157524

Change-Id: I4b319ef8e23e1ba5f84f52b92f40ba7fb1429101
2015-09-18 14:12:13 -07:00
Hamsalekha S
8a50328131 Support for level greater than level at init in Decoder
Added support to check num_ref_frames  in SPS
and num_reorder_frames in VUI before returning error for level

Bug: 22860270

Change-Id: I392bab419385ca239836d200f9f2b064915a8a46
2015-07-31 18:53:17 +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
Martin Storsjo
56378a82a6 Remove an unused and unnecessary function prototype and associated define
Change-Id: I61b30d0934715cddd54b66ea3b023b2316a0106f
2015-06-25 08:25:51 -07:00
Martin Storsjo
796c0d475a Remove unnecessary calls to ithread_exit
The ithread_exit wrapper function behaves inconsistently across
platforms; on windows, the argument is a thread handle, denoting
the thread that will be exited. On pthreads, ithread_exit only
terminates the current thread, not any other thread.

These both calls are at the end of each thread function (and the one
with a non-null parameter refers to the handle of the thread itself),
so the thread will exit immediately anyway.

Change-Id: I21e43c56874729452bd80b28ff351e3c5d3f087e
2015-06-25 08:25:44 -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
Hamsalekha S
c080d57996 Moved check for level after check for resolution change.
This is required for DRC tests in CTS .

Change-Id: Icd0fe10d97c6ee55f8358682a578bddb58590de4
2015-06-25 08:25:42 -07:00
Hamsalekha S
9327d0ea03 Added support for level 52
Change-Id: Ib2fa0b02b408a7bb21b3115e5b1c1317706a7354
2015-06-25 08:25:42 -07:00
Martin Storsjo
b30b70f9cc Remove an empty source file
This source file doesn't contain anything else than just included
headers.

Change-Id: I7cd238a5d220907db82b98f7aaefad9d66af8ee4
2015-06-03 08:40:46 -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
Harish Mahendrakar
7497191460 Resolved warnings and fixed alignment of few assemblies
Resolved warnings seen in x86 modules
Fixed alignment of few modules
Updated comments in few arm modules for consistency
Fixed warnings seen in clang build

Change-Id: I0623169b5e84a6a6f09c3d2212e754101272f5e9
2015-05-05 17:51:53 +00:00
Lajos Molnar
a2b49e5f05 fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:51:34 +00:00
Harish Mahendrakar
3a52efd361 Fixed few issues seen in CTS tests
Added support for encoding non-multiple of 16 dimensions
Added support for encoding dimensions smaller than 64x64
Aligned coeff data to 4 byte boundary

Bug: 20554276
Change-Id: I111093950f94698296d8499a2845cfe2db6c557b
2015-05-05 17:45:29 +00:00
Lajos Molnar
7023f4d0e9 fix build for generic builds
Change-Id: I7654a801a2b168b7e0bcbebf680efbf2343b1ece
2015-04-16 11:54:42 -07:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30