summaryrefslogtreecommitdiff
path: root/vp8/decoder/decodeframe.c
AgeCommit message (Collapse)Author
2021-11-08vp8: fix some implicit signed -> unsigned conv warningsJames Zern
and vice-versa mostly when dealing with bitmasks w/clang-11 -fsanitize=undefined Change-Id: I6d8f676bf87679ba1dad9cb7f55eea172103d9d3
2019-11-04remove unused simple loopfilter parametersJohann
The simple filter only processes the Y plane. BUG=webm:1612 Change-Id: I9886ff43ea7f621d8915846cb65f609a9298566d
2019-10-03vp8/decoder/decodeframe: fix int sanitizer warningsHien Ho
Unit test: VP8/InvalidFileTest implicit conversion from type 'int' of value -45844 (32-bit, signed) to type 'short' changed the value to 19692 (16-bit, signed) BUG=webm:1615 BUG=webm:1644 Change-Id: Id5d470f706d68e24f7a1e689526c9ecd3a8e8db8
2019-01-10vp8 dec: Add flag to bring up threads.Jerome Jiang
Instead of creating a new decoder instance when restarting all threads after they were shut down, re-create threads on the new flag. BUG=webm:1577 Change-Id: I6272ecaa1b586afdaa5ed8d6eab80aff8f5eb673
2018-12-21vp8: kill all threads on corrupted frame.Jerome Jiang
If decoder keeps going, threads will be brought up. BUG=902650,webm:1577 Change-Id: I7765ba134aeed76ec0f58bd05e3a35383e6861c3
2018-10-31vp8: fix to address overflow in decoder.Jerome Jiang
Can't call internal error from the decoder thread. Add vpx_internal_error_info to MACROBLOCKD. When corrupted frame detected, the decoder thread returns to its own context and signal completion of decoding for current frame. The main decoding thread will detect error too and return error code to decoding API call. Each thread will signal end of decoding of the frame. Main thread waits for the signal of all other threads to start decoding next frame. BUG=875626,webm:1496 Change-Id: Icd05fbc558893a4e7d8532c1e7177e7550283a64
2018-09-21vp8: exit with bad fragment size in decoder.Jerome Jiang
BUG=webm:1555 Change-Id: Ie024c9f5a21f4ed05ab6b93f1677662eeef9e6d8
2018-05-10Fix vpxdec fuzz failure.Jerome Jiang
BUG=webm:1495 Change-Id: Ibaee35aa5e8e00847c61e707f2c9b4c0cff23673
2018-01-30vp8 bool: verify buffer sizeJohann
In the process of fixing a ubsan warning: commit 738b829b8cdf079a5fa48c74a28a177c9567d212 Fix incorrect size reading the inferred check of start < end was removed. This causes fuzzed files to get a little further and segfault in vp8dx_start_decode. Change-Id: I316e23058753ba42dbcc46d27eb575f51c8a9e9a
2018-01-26Fix incorrect size readingJohann
Cherry pick from vp9: commit 85770264ac891505730dcd5092d1993a62c74060 Guard against incorrect size values moving *data past data_end. Check read length against the difference of the buffers. Change-Id: I5e8679ddd447c4d73deb80be5ec94841a92c5fcd
2017-08-31Add atomics to vp8 synchronization primitives.Peter Boström
Fixes issue on iPad Pro 10.5 (and probably other places) where threads are not properly synchronized. On x86 this data race was benign as load and store instructions are atomic, they were being atomic in practice as the program hasn't been observed to be miscompiled. Such guarantees are not made outside x86, and real problems manifested where libvpx reliably reproduced a broken bitstream for even just the initial keyframe. This was detected in WebRTC where this device started using multithreading (as its CPU count is higher than earlier devices, where the problem did not manifest as single-threading was used in practice). This issue was not detected under thread-sanitizer bots as mutexes were conditionally used under this platform to simulate the protected read and write semantics that were in practice provided on x86 platforms. This change also removes several mutexes, so encoder/decoder state is lighter-weight after this change and we do not need to initialize so many mutexes (this was done even on non-thread-sanitizer platforms where they were unused). Change-Id: If41fcb0d99944f7bbc8ec40877cdc34d672ae72a
2017-06-08vp8_decode_frame: fix oob read on truncated key frameJames Zern
the check for error correction being disabled was overriding the data length checks. this avoids returning incorrect information (width / height) for the decoded frame which could result in inconsistent sizes returned in to an application causing it to read beyond the bounds of the frame allocation. BUG=webm:1443 BUG=b/62458770 Change-Id: I063459674e01b57c0990cb29372e0eb9a1fbf342
2016-07-23vp8/decodeframe: fix signed/unsigned comparisonJames Zern
quiets a visual studio warning Change-Id: Ic7725616bc2cb837e6f79294d4fcff36b67af834
2016-07-23vp8:fix threading issuesJim Bankoski
1 - stops de allocating before threads are closed. 2 - limits threads to mb_rows when mb_rows < partitions BUG=webm:851 Change-Id: I7ead53e80cc0f8c2e4c1c53506eff8431de2a37e
2016-07-19vp8: apply clang-tidy google-readability-braces-around-statementsclang-tidy
applied against an x86_64 configure clang-tidy-3.7.1 \ -checks='-*,google-readability-braces-around-statements' \ -header-filter='.*' -fix + clang-format afterward Change-Id: I6694edeaee89b58b8b3082187e6756561136b459
2016-07-18prepend ++ instead of post in for loops.Jim Bankoski
Applied the following regex : search for: (for.*\(.*;.*;) ([a-zA-Z_]*)\+\+\) replace with: \1 ++\2) This misses some for loops: ie : for (mb_col = 0; mb_col < oci->mb_cols; mb_col++, mi++) Change-Id: Icf5f6fb93cced0992e0bb71d2241780f7fb1f0a8
2016-07-15vp8: apply clang-formatclang-format
Change-Id: I7605b6678014a5426ceb45c27b54885e0c4e06ed
2016-06-22vp8 error concealment: remove unused variablesJohann
vp8_conceal_corrupt_mb is an empty function. Remove it entirely. Cleans up -Wextra warnings: unused parameter 'mi_stride' [-Wunused-parameter] unused parameter 'xd' [-Wunused-parameter] Change-Id: Idca7ef4508fae2b4b76a40d44507522a72ccc2c8
2016-06-14Use data size directly instead of recomputing.Johann
Cleans warning in Android build: comparison of integers of different signs: 'unsigned int' and 'int' int n = (int)VPXMIN(sizeof(clear_buffer), data_end - data); ^ ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ Change-Id: I964355ceae6b39e22c0196294b25e28387f84945
2015-12-03vp8: fix quantizer clampingJames Zern
the quantizer is transmitted as 7-bits + sign so needs to be clamped in the delta + absolute case. BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1224361 Change-Id: I9115f5d1d5cf7e0a1d149d79486d9d17de9b9639
2015-09-30vp8: change build_intra_predictors_mby_s to use vpx_dsp.Ronald S. Bultje
Change-Id: I2000820e0c04de2c975d370a0cf7145330289bb2
2015-08-27vp8: use VPX(MIN|MAX) from vpx_dsp_common.hJames Zern
remove MIN/MAX defines in vp8/common/common.h Change-Id: I41520f34af175e05b263ebd12198f4de29a967db
2015-07-29Add const to a variable declarationYaowu Xu
Change-Id: Idf572c22a87098665f5179dc3212a06d9a85a342
2015-04-28vpx_mem: remove vpx_memsetJames Zern
vestigial. replace instances with memset() which they already were being defined to. Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28vpx_mem: remove vpx_memcpyJames Zern
vestigial. replace instances with memcpy() which they already were being defined to. Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
2015-04-03vp8_decode_frame: remove dead incrementJames Zern
Change-Id: Ie9a6fac02796d24e6f4a15416d0b4c19010547df
2014-12-21Revert "remove vp8 unused uvstride parm in simple loop filter"Jim Bankoski
This reverts commit 392a2c43c77242f05715bdac086f235e6cbbdf2e Failing nexus build tests: http://build.chromium.org/p/client.libvpx/builders/Nexus%207%20Builder/builds/224 Change-Id: I95ae2c894b70cef9c757334fcab7fdeca9003e9c
2014-12-21Merge "remove vp8 unused uvstride parm in simple loop filter"Jim Bankoski
2014-12-16Silence -Werror=unused-parameterJohann
Cast away remaining issues so that new ones don't get lost in the noise. Change-Id: Iacd6999b0686ce80f9835730d68db6382690fa92
2014-05-27remove vp8 unused uvstride parm in simple loop filterJim Bankoski
Change-Id: I35fac6c0db327ef81852f326a93878b57cb2def4
2014-04-23Add VPXD_SET_DECRYPTOR support to the VP9 decoder.Joey Parrish
Change-Id: I88f86c8ff9af34e0b6531028b691921b54c2fc48
2014-04-16Prevent reading of uninitialized valueYaowu Xu
This commit added a check of reference frame to make sure that pre buffer pointers are initialized only when necessary and make them to 0 if ref frame is intra, hence those buffer should never be used. Change-Id: Ieb474fcd9feb759f02e2f9c282b7348a8fa31117
2013-12-03Fix a spelling mistake in filenameYaowu Xu
Change-Id: Ic06124ed95a50935b1c6509907dcac87c7707bcc