summaryrefslogtreecommitdiff
path: root/vp8/encoder
AgeCommit message (Collapse)Author
2020-05-12Merge "Don't collect stats if they won't be used"Jerome Jiang
2020-05-11Temporarily convert to 64 bits to avoid overflowsJorge E. Moreira
In the vp8_cost_branch function a couple of unsigned int are being multiplied by integer coefficients and added to later be divided by 256. While the end result most likely fits an unsigned int, the intermediary result of multiplying and adding sometimes doesn't (I was able to reproduce it by leaving the encoder running at 60 fps for a while). To avoid the multiplication overflow (which is undefined behavior and causes a wrong result anyways) the calculation is performed using unsigned long long instead and cast to unsigned int for return. Bug: b/154172422 Test: run cuttlefish with webrtc enabled for an hour Change-Id: If7ebbda38b2450a59ed3c99ffbb59dc62431a324
2020-05-08Don't collect stats if they won't be usedJorge E. Moreira
When the encoder is run continuously for a few minutes at 60 fps, the total_target_vs_actual field overflows. Since this field is a signed integer that's considered undefined behavior in C++, which causes an abort when used in an android binary (those run with ubsan enabled) Bug: b/154172422 Test: run cuttelfish with webrtc enabled for an hour Change-Id: I8f7d9d0884311a6338bdcdec76348b8cc3ce8c69
2020-04-13simplify x86_abi_support.asm symbol declarationJohann
Define LIBVPX_{ELF,MACHO} to simplify blocks. Create new globalsym macro and include logic for PRIVATE. BUG=webm:1679 Change-Id: I303ba1492a2813f685de51155ccef7e4831e1881
2020-04-01x86_abi_support: use correct hidden syntaxJohann
Chromium needs :function hidden and the space between the symbol and the colon removed, at least for nasm. This matches x86inc.asm. BUG=webm:1679 Change-Id: Ie47bb75d44d3130791639cbf4e2ebe019e2d686e
2020-03-21vp8/{ratectrl,onyx_if}: fix some signed integer overflowsJames Zern
in calculations involving bitrate in encode_frame_to_data_rate() and vp8_compute_frame_size_bounds() note this isn't exhaustive, it's just the result of a vpxenc run with: -w 800 -h 480 --cpu-used=8 --rt --target-bitrate=1400000000 Bug: b/151945689 Change-Id: I3a4f878046fcf80e87482761588c977c283ae917
2020-03-13fix minor spelling errorsJohann
Change-Id: I929fec66d541705fe94365b56a5bdd8cf5ee7c37
2019-12-02Avoid dividing by 0 in vp8 gf_group bits computeDebargha Mukherjee
BUG=webm:1653 Change-Id: Ic59fe5e573f08dbca678d3927d4a750ae75f903c
2019-11-08Merge "remove unused vp8_hex_search parameter"Johann Koenig
2019-11-08Merge "remove unused cpi parameters from firstpass.c"Johann Koenig
2019-11-07remove unused vp8_hex_search parameterJohann
BUG=webm:1612 Change-Id: I80765f4ed05fb5d588249e56a018bf8b9828a197
2019-11-07remove unused cpi parameters from firstpass.cJohann
BUG=webm:1612 Change-Id: I77db5f9f2cb8244cca831b76c00926112c3e0dfe
2019-11-07remove unused Pass1Encode parametersJohann
BUG=webm:1612 Change-Id: Ifbe5bbba706311057bfc5d5fa9b63e57ac56e398
2019-11-04remove unused postproc parametersJohann
BUG=webm:1612 Change-Id: I92937417403af2c943e903ba66799609ef6ab635
2019-09-30namespace ARCH_* definesJames Zern
this prevents redefinition warnings if a toolchain sets one BUG=b/117240165 Change-Id: Ib5d8c303cd05b4dbcc8d42c71ecfcba8f6d7b90c
2019-09-10vpx_clear_system_state after drop due to overshootJerome Jiang
BUG=999780 Change-Id: I096fdc22812eab22a38a33135c0cbe60a6e64add
2019-08-27vp8/encoder/vp8_quantize: fix int sanitizer warningsHien Ho
implicit conversion from type 'int' of value 65536 (32-bit, signed) to type 'short' changed the value to 0 (16-bit, signed) BUG=webm:1615 Change-Id: I6a04e57bd3272934de9c75fab60a1620ff6c3636
2019-08-13vp8/encoder/bitstream: fix int sanitizer warningsHien Ho
implicit conversion from type 'unsigned int' of value 256 (32-bit, unsigned) to type 'unsigned char' changed the value to 0 (8-bit, unsigned) BUG=webm:1615 Change-Id: I2b630bf22cad28b5a7a8a37f6938e6ebe12bc64e
2019-06-28vp8/encoder/boolhuff: fix integer sanitizer warningsHien Ho
from sanitizer run: runtime error: implicit conversion from type 'unsigned int' of value 256 (32-bit, unsigned) to type 'unsigned char' changed the value to 0 (8-bit, unsigned) BUG=webm:1615 Change-Id: I9321bbd58a305419bc8669ecd7594adc47e8b116
2019-06-18Fix timestamp overflow issuesYue Chen
- Save the initial user-specified timestamp and rebase all further timestamps by this value. This makes libvpx internal timestamps to always start from zero, regardless of the user's timestamps. - Calculate reduced timestamp conversion ratio and use it to convert user's timestamps to libvpx internal timestamps and back. The effect of this is that integer overflow due to multiplication doesn't happen for a much longer time. BUG=webm:701 Change-Id: Ic6f5eacd9a7c21b95707d31ee2da77dc8ac7dccf
2019-05-17vp8: Disallow copy flag behavior under forced refreshMarco Paniconi
Don't allow the setting of copy_buffer_to_arf when the application/user sets the refresh/update flags. Add new flag (ext_refresh_frame_flags_pending) to indicate user sets the flags. Change-Id: I482098c0f2552b04885132a728629ab3e207f08b
2019-05-01vp8: quiet conversion warnings when packing bitsJohann
Mask the values to show that we only want to store 1 byte. Switch to lowercase ff since it's more prevalent in the file. BUG=webm:1615 Change-Id: Ia8ede79cb3a4a39c868198ae207d606e30cfb1cb
2019-04-30Merge "vp8: quiet conversion warning when packing sizes"Johann Koenig
2019-04-29vp8: quiet conversion warning when packing sizesJohann
The values are or'd together and then stored 8 bits at a time: 9.1. Uncompressed Data Chunk * 16 bits: (2 bits Horizontal Scale << 14) | Width (14 bits) * 16 bits: (2 bits Vertical Scale << 14) | Height (14 bits) BUG=webm:1615 Change-Id: Id2eb3deaccec299a0619990d3a6f1eb4f71e50e2
2019-04-29Merge "vp8 quantize: silence conversion warning"Johann Koenig
2019-04-29vp8 quantize: silence conversion warningJohann
clang 7 integer sanitizer warns about storing any int16_t value where the high bit is 1. Treated as an int, such number would be positive. Treated as an int16_t, it is negative. BUG=webm:1615 Change-Id: Idf655cd92d26b7c1180910159be3f64164577eca
2019-04-29vp8 quantize: use native abs/sign implementationsJohann
~4% improvement with a very rudimentary speed test Change-Id: Iad8868327e3276dbead783a79849295b0e4b135c
2019-04-23Revert "Add VPX_TUNE_SSIM and VPX_TUNE_PSNR enums"Sai Deng
This reverts commit 1d8d8f562bf382e47071bb38d13b7ded366820af. Reason for revert: change the api names will break existing code. Original change's description: > Add VPX_TUNE_SSIM and VPX_TUNE_PSNR enums > > Change-Id: I3df5af2c60b774e6d395062077542c52db868236 TBR=jingning@google.com,builds@webmproject.org,sdeng@google.com Change-Id: Ic94c19739f595f4544e8b68892ab9d9c1bbccd79 No-Presubmit: true No-Tree-Checks: true No-Try: true
2019-04-23Add VPX_TUNE_SSIM and VPX_TUNE_PSNR enumssdeng
Change-Id: I3df5af2c60b774e6d395062077542c52db868236
2019-04-11Fix static analysis warningskyslov
With switching to clang-7.0.1 we got new warnings. With this change the warnings are back to 0 for all configurations (excluding warnings in third_party) BUG=webm:1616 Change-Id: I25ceb592c425394e8f14d333fb5680144f892213
2019-04-04vp8_rd_pick_inter_mode: clear static analysis warningJames Zern
uv_intra_rate is undefined by default, it is safe to use if uv_intra_done is true. BUG=webm:1616 Change-Id: I02e5f6c9e5cc6ed0b41619b4a59e55ea398bad41
2019-03-29Merge "update .clang-format for version clang-7.0.1 update."James Zern
2019-03-29update .clang-format for version clang-7.0.1 update.Hien Ho
added files that are affected by clang-format version 7. BUG=b/120815481 Change-Id: I40662ce962e4f4b1fcdf183b700f85cc5c0f9f82
2019-03-28Revert "Wrap macro definition in do-while(0)"Jerome Jiang
This reverts commit aa04b6f9a7475e9d9457dfc5bf441faf15efc466. It caused big regression on webrtc VP8 tests. Change-Id: I937e769d133abeca62ba063e59a58b5c461f5b5e
2019-03-19Wrap macro definition in do-while(0)Jerome Jiang
Change-Id: Id654a48d2fa40355552d7267e58461e6cc1c6998
2019-03-14Enclose macro arguments in parenthesesJerome Jiang
BUG=webm:1606 Change-Id: I661485b860243c95b6450035dbac77b0dd4d9ff4
2019-02-12vp8: Limit Q change for screen content CBR modeMarco Paniconi
Add last_q[] to layer context, and add limit on Q change from previous layer/frame. For now put hard limit of 12 for decrease. For 1 pass CBR sreen content mode. Change-Id: Ifb972c9b6831440c80b1cb07a054c577ece930ec
2019-02-11vp8: Fix condition for update of last_pred_err_mbMarco Paniconi
For 1 pass cbr screen-content mode: quantity should only be updated on delta frames. Change-Id: I16fc47b2805c7527ab4ff25bd8b5a5bd9c2b8976
2019-02-04vp8: Add extra conditon for overshoot-dropMarco Paniconi
For drop due to large overshoot feature (in 1 pass CBR): add additional condition that current prediction error is larger than that of last encoded frame. This make the drop due to sudden overshoot more robust, and improves rate convergence for steady hard content. Change-Id: If20027d26b4dcd290e4f788ae8e2760d95b536a5
2019-01-07vp8_copy32xn: resolve missing declarationJohann
BUG=webm:1584 Change-Id: I9898a6e2f977acd4e26b09222a1eb2ab4f37f0af
2019-01-07Merge "vp8 multi dimensional search: resolve missing declarations"Johann Koenig
2019-01-07arm neon: resolve missing declarationsJohann
BUG=webm:1584 Change-Id: I2dcf39f2327b72b58be72c27f952ea781a790dd3
2019-01-07vp8 multi dimensional search: resolve missing declarationsJohann
BUG=webm:1584 Change-Id: I5c3fb5ab00bff66a8e8f4b8d27cbcea4946eced0
2018-12-17Remove -Wextra suppression.Jerome Jiang
BUG=webm:1246 Change-Id: Iae78e266faa9c4989500fc919b24f2f584ac0550
2018-11-12quantize: use aarch64 vmaxvJohann
Simplify max value calculation on aarch64 by using vmaxv. Much faster for 4x4 but diminishing returns as the block size grows. Only the vp9 quantize has a speed test hooked up. Anticipate similar results for the other quantize versions. Before: [ RUN ] NEON/VP9QuantizeTest.DISABLED_Speed/2 [ BENCH ] Bypass calculations 4x4 31.6 ms ( ±0.0 ms ) [ BENCH ] Full calculations 4x4 31.6 ms ( ±0.0 ms ) [ BENCH ] Bypass calculations 8x8 17.7 ms ( ±0.0 ms ) [ BENCH ] Full calculations 8x8 17.7 ms ( ±0.0 ms ) [ BENCH ] Bypass calculations 16x16 14.2 ms ( ±0.0 ms ) [ BENCH ] Full calculations 16x16 14.2 ms ( ±0.0 ms ) [ OK ] NEON/VP9QuantizeTest.DISABLED_Speed/2 (1906 ms) [ RUN ] NEON/VP9QuantizeTest.DISABLED_Speed/3 [ BENCH ] Bypass calculations 32x32 18.6 ms ( ±0.0 ms ) [ BENCH ] Full calculations 32x32 18.6 ms ( ±0.0 ms ) After: [ RUN ] NEON/VP9QuantizeTest.DISABLED_Speed/2 [ BENCH ] Bypass calculations 4x4 29.1 ms ( ±0.0 ms ) [ BENCH ] Full calculations 4x4 29.1 ms ( ±0.0 ms ) [ BENCH ] Bypass calculations 8x8 16.9 ms ( ±0.0 ms ) [ BENCH ] Full calculations 8x8 16.9 ms ( ±0.0 ms ) [ BENCH ] Bypass calculations 16x16 14.1 ms ( ±0.0 ms ) [ BENCH ] Full calculations 16x16 14.1 ms ( ±0.0 ms ) [ OK ] NEON/VP9QuantizeTest.DISABLED_Speed/2 (1803 ms) [ RUN ] NEON/VP9QuantizeTest.DISABLED_Speed/3 [ BENCH ] Bypass calculations 32x32 18.6 ms ( ±0.0 ms ) [ BENCH ] Full calculations 32x32 18.6 ms ( ±0.0 ms ) Change-Id: Ic95812b3fdbd4e47b4dcb8ed46c68a9617de38d2
2018-11-07Merge "vp8: remove VP8_ENTROPY_STATS code"Johann Koenig
2018-11-05vp8: Increase rate correction threshold for drop-overshootMarco Paniconi
For 1 pass cbr encoding mode, with frame-dropping on: increase the rate correction threshold for drop-overshoot detection, to better capture cases of large overshoot. Change-Id: I1153b1b71cf106749dd985074d6bc8f37d163c7e
2018-11-01vp8: remove VP8_ENTROPY_STATS codeJohann
Does not compile. Noticed while cleaning up un-namespaced functions Change-Id: I4a9048e66d051397f652e7b5412606a5e234f61f
2018-10-31vp8 boolcoder: normalize to "bc"Johann
"bc" maps to BOOL_CODER better than "br" Change-Id: Idefd03e79ccc1851a1b26f8206a159b0e5c5fb2d
2018-10-30clang-tidy: fix vp8/encoder parametersJohann
BUG=webm:1444 Change-Id: I57a305cdab0d62b0745116272fbd5d9257c6e679