summaryrefslogtreecommitdiff
path: root/vp8/decoder
AgeCommit message (Collapse)Author
2022-04-15vp8,get_sub_mv_ref_prob: change arguments to uint32_tJames Zern
this matches the call with int_mv::as_int and fixes a warning with clang-13 -fsanitize=integer: vp8/decoder/decodemv.c:240:32: runtime error: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4282515456 (32-bit, unsigned) to type 'int' changed the value to -12451840 (32-bit, signed) Bug: webm:1759 Change-Id: I7c0aa72baa45421929afac26566e149adc6669d7
2022-04-15vp8: fix some implicit unsigned -> int conversionsJames Zern
fixes some warnings with clang-13 -fsanitize=integer: vp8/decoder/threading.c:77:27: runtime error: implicit conversion from type 'unsigned int' of value 4294967295 (32-bit, unsigned) to type 'int' changed the value to -1 (32-bit, signed) these bitmask constants were missed in: 1676cddaa vp8: fix some implicit signed -> unsigned conv warnings Bug: webm:1759 Change-Id: I5d894d08fd41e32b91b56a4d91276837b3415ee4
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
2021-03-04Check for _WIN32 instead of WIN32.James Touton
_WIN32 is predefined for the Windows platform in MSVC, whereas WIN32 is not, and WIN32 is also not defined in the makefiles. Change-Id: I8b58e42d891608dbe1e1313dc9629c2be588d9ec
2020-02-14vp8,GetSigned: silence unsigned int overflow warningJames Zern
in non-conformant fuzzed bitstreams the calculation of br->value may overflow. this is defined behavior and harmless in that the stream is already corrupt. BUG=b/148271109 Change-Id: I3668ada57e0bd68cea86b82917fb03c19ac1283d
2019-12-17vp8: move error check earlierJohann
This avoids assigning variables which will not be used. A similar change was made to vpx_dsp/bitreader.c a long time ago. Change-Id: Ia5012091b8d85ca9bfefc7735a2aa69c5c2bf516
2019-12-04vp8 boolreader: ignore invalid inputJohann
Do basic initialization even when the result will not be used. BUG=chromium:1026961 Change-Id: Iaa480534b49efe1ecc66484b316f8d654e8a1245
2019-11-04remove unused vp8dx_receive_compressed_data parametersJohann
BUG=webm:1612 Change-Id: If2dc8a77c8f8bca86ee4b8349091dd1117b42dce
2019-11-04remove unused mbmi parameterJohann
BUG=webm:1612 Change-Id: I0f982d8269ec50a767efc222d958d37a55d5c77f
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-09-30namespace ARCH_* definesJames Zern
this prevents redefinition warnings if a toolchain sets one BUG=b/117240165 Change-Id: Ib5d8c303cd05b4dbcc8d42c71ecfcba8f6d7b90c
2019-03-14Enclose macro arguments in parenthesesJerome Jiang
BUG=webm:1606 Change-Id: I661485b860243c95b6450035dbac77b0dd4d9ff4
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
2019-01-07vp8 overlaps: resolve missing declarationJohann
BUG=webm:1584 Change-Id: I67fa7460cb90b9bbe8583b60340d7bbf615a11f2
2019-01-07Fix OOB memory access on fuzzed datakyslov
vp8_norm table has 256 elements while index to it can be higher on fuzzed data. Typecasting it to unsigned char will ensure valid range and will trigger proper error later. Also declaring "shift" as unsigned char to avoid UB sanitizer warning BUG=b/122373286,b/122373822,b/122371119 Change-Id: I3cef1d07f107f061b1504976a405fa0865afe9f5
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-12-17Remove -Wextra suppression.Jerome Jiang
BUG=webm:1246 Change-Id: Iae78e266faa9c4989500fc919b24f2f584ac0550
2018-11-09vp8: Init buffers and pred arrays for mt after allocation.Jerome Jiang
Buffers and arrays used for prediction are not initialized after allocation. BUG=902691 Change-Id: Ic727e5dab7456e91ec9d6c80694f60a1a3600640
2018-11-05vp8 dec: only compute ref frame buffer pointer for non intraJerome Jiang
When ref frame is INTRA_FRAME, pre buffer shouldn't be used. This CL copies behavior in single thread. That should apply to multithreading case too. BUG=webm:1496 Change-Id: Ibe9ab8ea9dc664151fa7ebac529d5fd1a481b4a3
2018-10-31Merge "vp8: fix to address overflow in decoder."Jerome Jiang
2018-10-31vp8dx_get_quantizer: normalize VP8D_COMPJohann
Use "pbi" like the rest of the functions Change-Id: I5f3036b8f8361c30353be378d83455b83b82ac9f
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-10-30clang-tidy: fix vp8/decoder parametersJohann
BUG=webm:1444 Change-Id: I3dfc56f7f6430d36a1c447d8999733015a001101
2018-10-26remove "register" keywordJohann
This has been deprecated for a long time. c++17 is trying to recover the name. Change-Id: Iade6bebce03a50b76061695f9e634a107cd989cd
2018-09-21vp8: exit with bad fragment size in decoder.Jerome Jiang
BUG=webm:1555 Change-Id: Ie024c9f5a21f4ed05ab6b93f1677662eeef9e6d8
2018-09-15cosmetics: normalize include guardsJames Zern
use the recommended format [1] of: <PROJECT>_<PATH>_<FILE>_H_ [1] https://google.github.io/styleguide/cppguide.html#The__define_Guard "All header files should have #define guards to prevent multiple inclusion. The format of the symbol name should be <PROJECT>_<PATH>_<FILE>_H_." Change-Id: I2e8ab0b32fb23c30fa43cff5fec12d043c0d2037
2018-08-22Revert "vp8: Fix memory address overflow in decoder."Jerome Jiang
This reverts commit 45cf384738ad261de7d00769c19b9b2842af06a7. BUG=875626,875680,webm:1496 Change-Id: I78037b5e57dbf6cfe326b29beaad1128868f09f2
2018-07-30Merge "vp8: Fix memory address overflow in decoder."Jerome Jiang
2018-07-19vp8: Fix memory address overflow in decoder.Jerome Jiang
Ref frame buffer is corrupted but it's not checked before it's used to compute the reconstructed previous frame buffer. BUG=webm:1496 Change-Id: Ief0e85b91b19576632685d17c8176c8d29158028
2018-05-10Fix vpxdec fuzz failure.Jerome Jiang
BUG=webm:1495 Change-Id: Ibaee35aa5e8e00847c61e707f2c9b4c0cff23673
2018-02-20remove deprecated 'register' keywordJohann
Will be removed in C++17: http://en.cppreference.com/w/cpp/language/storage_duration Change-Id: Iadce5e2b974c707799fa939f3ff1c420fb79a871
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
2018-01-18clang-format v5.0.0 vp8/Johann
Allow*OnASingleLine appears to no longer apply to typedef structs. Adjust closing parenthesis/opening brace on functions. Remove trailing commas to keep multiple elements on one line. Change-Id: I6e535a8ddb15c9b3de8216ce8ddb2a18241af46c
2017-10-27vp8: correct if/else '{' placementJames Zern
swap '{' and c-style comments removing a few redundant ones along the way; covers most leftovers from the clang-tidy run against an x86_64-linux config. Change-Id: I67a45596f80a12389faca49c5be440875092a7df
2017-09-01apply clang-formatclang-format
Change-Id: If4c3e8a396d0fcb304f407b44e28cac3219f038c
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-22onyxd_int.h: add missing prototypesJames Zern
vp8cx_init_de_quantizer, vp8_mb_init_dequantizer quiets -Wmissing-prototypes Change-Id: Ib63d14caf0144eff31a75b7cdb667b7e1f9d83ae
2017-06-21vp[89],vpx_dsp: add missing includesJames Zern
quiets -Wmissing-prototypes Change-Id: I841cfc019d592f2bc6b3fec5818051a31f4c53b5
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
2017-03-03vp8_create_decoder_instances: correct pbi[] memsetJames Zern
clear the entire array on error. the size used previously was equal to the number of elements. BUG=webm:1364 Change-Id: I2f2e16ed6e867f41d4774a5a8ac9cedaee11ce46
2017-01-12Add decoder getters for the last quantizer.Peter Boström
To be used for frame stats output of vpxdec. Change-Id: I0739a01bd3635c4b3fedd58f3e27363ce8fb1b1e
2016-12-14Change order of operation to avoid ubsan warningsYaowu Xu
This commit change an order of operation to avoid left shifts of negative numbers. Change-Id: I607c7eb91658c7a5ef397fc1504721d1b10e3dd6
2016-12-13Reapply 'Amend and improve VP8 multithreading implementation'Jim Bankoski
Reapply this patch: ff0107f Amend and improve VP8 multithreading implementation Amended the patch to add a unit test, and fix an asan error. BUG=webm:851 Change-Id: I6572c03256169c64e80248bf5a5e99f59a2fc93c
2016-09-29vp8,frame_buffers: remove unused use_frame_threadsJames Zern
this was never fully implemented Change-Id: I4640cf84c40ea2cc9c6c12acf116d39df4b04578
2016-09-29Remove vp8_clear_system_stateJohann
Use vpx_clear_system_state instead. Change-Id: Ia3e9122f69a2c690ddd7c7bc54f92ccb9ec18b3e
2016-09-15apply clang-formatclang-format
Change-Id: I501597b7c1e0f0c7ae2aea3ee8073f0a641b3487
2016-09-13vp8 decoder: cast decoding_thread_count to intJohann
For some reason allocated_decoding_thread_count is signed, but decoding_thread_count is not. Cleans -Wextra/-Wsign-compare: comparison between signed and unsigned integer expressions Change-Id: Id0ada78100acff27c1c4ed7493c563d13c55cdcd
2016-08-31Remove CONFIG_DEBUG guards from assert()Johann
When 'NDEBUG' is set, assert() generates no code. Change-Id: Icf61cfc1a8f6e5f0770b3626d8c73ae968df1108