summaryrefslogtreecommitdiff
path: root/vp8/decoder
AgeCommit message (Collapse)Author
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
2016-08-23vp8_decoder_create_threads: check sem/pthread returnsJames Zern
Change-Id: I353da4a2f988ca51d48d0ca91236e8cc0bb48ff5
2016-08-23vp8_create_decoder_instances: add missing setjmpJames Zern
vp8_decoder_create_threads() has allocations that expect one is set. Change-Id: I423f2153a2969c88d48ba45cc9ead4a01443ce65
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-21Revert "Amend and improve VP8 multithreading implementation"Yunqing Wang
Reverted the patch because of possible performance issue. Change-Id: I49944f827ccd38ed194c9f8d9cb9036fa9bf79e1
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
2016-06-01Fix VP8 encoder UBSAN/IOC errorsYaowu Xu
1. vp8/decoder/dboolhuff.c 2. vp8/decoder/dboolhuff.h 3. vp8/encoder/bitstream.c 4. vp8/encoder/boolhuff.h 5. vp8/encoder/rdopt.c BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1218 Change-Id: I5d315d63fd7aeaee6f3bd79178e593f3db38a6b1
2016-05-19vp8/error_concealment: remove shift of negative valueJames Zern
fixes: shifting a negative signed value is undefined [-Wshift-negative-value] Change-Id: I3a55f2dac7c51c0e264d40081ffce98e2abacb89
2016-01-08Amend and improve VP8 multithreading implementationYunqing Wang
There are flaws in current implementation of VP8 multithreading encoder and decoder as reported in the following issue: https://code.google.com/p/chromium/issues/detail?id=158922 Although the data race warnings are harmless, and wouldn't cause real problems while encoding and decoding videos, it is better to fix the warnings so that VP8 code could pass the TSan test. To synchronize the thread-shared data access and maintain the speed (i.e. decoding speed), use multiple mutexes based on mb_rows to reduce the number of synchronizations needed, make the reads and writes of the shared data protected, and reduce the number of mb_col writes by nsync times. The decoder speed tests showed < 3% speed loss while using 2 ~ 4 threads. Change-Id: Ie296defffcd86a693188b668270d811964227882
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-08-26Clean up unused function warnings in vp8 decoderJohann
Mark functions in dboolhuff.h and treereader.h with INLINE. Change-Id: Ifc1008de0713c8d43f4fec83a8c2b836622be365
2015-07-29Add const to a variable declarationYaowu Xu
Change-Id: Idf572c22a87098665f5179dc3212a06d9a85a342
2015-05-14vp8: make some functions staticJames Zern
silences missing prototype warnings Change-Id: I9f24a3214c832c982ca0dc5a032316eba48472ff
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-07-10call vp[89]_clear_system_state after longjmpJames Zern
restore the environment post encode/decode failure Change-Id: I3c72e2260a616432eaf1f9545d4fb4d8e45cc7b0
2014-05-27remove vp8 unused uvstride parm in simple loop filterJim Bankoski
Change-Id: I35fac6c0db327ef81852f326a93878b57cb2def4
2014-04-29Remove VP8 save_reg_neon functionYunqing Wang
This patch did a cleanup following the commit "Save NEON registers in VP8 NEON functions". The pushing/poping of callee-saved NEON registers was moved into individual NEON functions. Therefore, we don't need to save those registers at the beginning of codec. The related code was removed. Change-Id: I5648166514fc9beffb780aa138495597731f49ea
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
2014-01-23vp8/decoder: add extern "C" to headersJames Zern
Change-Id: I7865db2d15ffa8cfa4de88714e48734c5ff9bb86
2013-12-16vp8/decoder: normalize include guardsJames Zern
Change-Id: Ifa7934927cc8461cd58ca0b05bf76533abd78cb6
2013-12-03Fix a spelling mistake in filenameYaowu Xu
Change-Id: Ic06124ed95a50935b1c6509907dcac87c7707bcc
2013-12-03Fix VP8 border replication for very small imageYaowu Xu
Also added a test vector for this issue. Change-Id: I8a8654f9d33b27afd53c295f1ea44d198550d067