summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_if.c
AgeCommit message (Collapse)Author
2022-03-29remove sad x3,x8 specializationsJohann
These would compute the sum of absolute differences (sad) for a group of 3 or 8 references. This was used as part of an exhaustive search. vp8 only uses these functions in speed 0 and best quality. For vp9 this is only used with the --enable-non-greedy-mv experiment. This removes the 3- and 8-at-a-time optimized functions and uses the fall back code which will process 1 or 4 (vpx_sadMxNx4d) at a time. For configure --target=x86_64-linux-gcc --enable-realtime-only: libvpx.a before: 3002424 after: 2937622 delta: 64802 after 'strip libvpx.a' before: 2116998 after: 2073090 delta: 43908 Change-Id: I566d06e027c327b3bede68649dd551bba81a848e
2021-12-09vp[89]_initalize_enc(): protect against multiple invocationsJames Zern
this removes the burden from callers; the rtcd functions are left with a mostly redundant (outside of tests) once() as top-level functions should ensure their constraints are met Change-Id: I5bdbcfa4671c6a1492cfe9c7d886c361c26caaa9
2021-12-02clear -Wextra-semi/-Wextra-semi-stmt warningsJames Zern
Bug: chromium:1257449 Change-Id: Ia9aafccc09b611521d4a7aedfe3723393a840c62
2021-10-04Merge changes If2ef4400,I345970b7 into mainJerome Jiang
* changes: vpx_roi_map: add delta range info {vp8,vp9}_set_roi_map: fix validation with INT_MIN
2021-10-01{vp8,vp9}_set_roi_map: fix validation with INT_MINJames Zern
previously ranges were checked with abs() whose behavior is undefined with INT_MIN. this fixes a crash when the original value is returned and it later used as and offset into a table. Bug: webm:1742 Change-Id: I345970b75c46699587a4fbc4a059e59277f4c2c8
2021-10-01Merge "vp8: Condition decimation drop logic on drop_frames_allowed" into mainMarco Paniconi
2021-10-01vp8: Condition decimation drop logic on drop_frames_allowedMarco Paniconi
This allows user to make sure frame will be encoded when drop_frames is set off (on the fly), no matter the state of the buffer. Change-Id: Ia7b39b93fe3721dd586bdbede72c525db87b6890
2021-10-01vp8: For screen mode: clip buffer from belowMarco Paniconi
Condition already existed for screen content mode, but only when frame-dropper was off. Remove the frame drop condition. Change-Id: Ie7357041f5ca05b01e78b4bd3b40da060382591b
2021-09-23Merge "vp8 rc: support temporal layers" into mainJerome Jiang
2021-09-23vp8 rc: support temporal layersJerome Jiang
Change-Id: I2c7d5de0e17b072cb763f1659b1badce4fe0b82b
2021-09-21Cap duration to avoid overflowJerome Jiang
Bug: webm:1728 Change-Id: Id13475660fa921e8ddcc89847e978da4c8d85886
2021-09-10Add vp8 support to rc libJerome Jiang
For 1 layer CBR only. Support for temporal layers comes later. Rename the library to libvpxrc Bug: b/188853141 Change-Id: Ib7f977b64c05b1a0596870cb7f8e6768cb483850
2021-09-08vp8 rc: always update correction factorJerome Jiang
Change-Id: Id40b9cb5a85a15fb313a2a93f14f6768259f7c15
2021-07-20Use round to be more accurate casting float to intJerome Jiang
Change-Id: Ifd5961917831752b176dd75d39d6b2cba6ce72fa
2020-07-09Cap target bitrate to raw rate internallyJerome Jiang
BUG=webm:1685 Change-Id: Ida72fe854fadb19c3745724e74b67d88087eb83c
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-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
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-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-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-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
2018-12-17Remove -Wextra suppression.Jerome Jiang
BUG=webm:1246 Change-Id: Iae78e266faa9c4989500fc919b24f2f584ac0550
2018-11-01vp8: remove VP8_ENTROPY_STATS codeJohann
Does not compile. Noticed while cleaning up un-namespaced functions Change-Id: I4a9048e66d051397f652e7b5412606a5e234f61f
2018-10-30clang-tidy: fix vp8/encoder parametersJohann
BUG=webm:1444 Change-Id: I57a305cdab0d62b0745116272fbd5d9257c6e679
2018-01-22Merge changes from topic "clang-format"Johann Koenig
* changes: clang-format v5.0.0 vp9/ remove spurious comments clang-format v5.0.0 vp8/ clang-format v5.0.0 vpx_dsp/ clang-format v5.0.0 mem_ops.h clang-format v5.0.0 vpx_util/vpx_atomic.h clang-format v5.0.0 y4minput.c clang-format v5.0.0 vpxenc.c clang-format v5.0.0 examples/ clang-format v5.0.0 test/
2018-01-18remove spurious commentsJohann
These don't appear to make any sense given their context. The commit log also does not reveal anything. Discovered due to spurious clang-format indenting: https://bugs.llvm.org/show_bug.cgi?id=35930 Change-Id: I732a66056ba4c05e3e132a2f236fe10f7a282900
2018-01-18vp8: Fix to multi-res-encoder for skipping streams.Marco
For the vp8 simulcast/multi-res-encoder: Add flags to keep track of the disabling/skipping of streams for the multi-res-encoder. And if the lower spatial stream is skipped for a given stream, disable the motion vector reuse for that stream. Also remove the condition of forcing same frame type across all streams. This fix allows for the skipping/disabling of the base or middle layer streams. Change-Id: Idfa94b32b6d2256932f6602cde19579b8e50a8bd
2018-01-11adopt some clang 5.0.0 formattingJohann
At least the changes that don't conflict with 4.0.1 Change-Id: I9b6a7c14dadc0738cd0f628a10ece90fc7ee89fd
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-10-17vp8: Enable use of ROI map.Jerome Jiang
Disable cyclic refresh if ROI is used and add flag to properly handle the static_thresh deltas. Remove the ROI test for cyclic refresh (it's allowed but disabled if ROI is used). Add an example in vpx_temporal_svc_encoder.c. Turned off by default. BUG=webm:1470 Change-Id: Ief9ba1d7f967bc00511b412b491c3f70943bfbda
2017-08-31Prevent data race from low-pass filter.Peter Boström
Makes main thread wait for the filter level to be picked to avoid a race between the LPF thread and update_reference_frames(). This also re-enables the failing tests under thread_sanitizer where this data race was detected. BUG=webm:1460 Change-Id: I7f5797142ea0200394309842ce3e91a480be4fbc
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-08-15Clean up writing YUV files for debug purpose.Jerome Jiang
Change legacy vp8/9_write_yuv_frame to vpx_write_yuv_files. Delete some flags that can be enabled during build. To enable writing denoised YUV, use the following command line: CFLAGS='-DOUTPUT_YUV_DENOISED' ./configure --enable-vp9-temporal-denoising For skinmap, use CFLAGS='-DOUTPUT_YUV_SKINMAP' Change-Id: I236974ac8b3cf279d20c4dc7f6162d8b480b6528
2017-08-02vp8: Drop due to overshoot for non-screen content.Marco
For 1 pass CBR mode: Apply the logic for dropping (and re-adjusting rate control) due to large overshoot to the case of non-screen content when drop_frames_allowed is enabled. For the non-screen content case: add additional condition that rate correction factor is close to minimum state, and flag to constrain the frequency of the dropping. Also handle the case of temporal layers and multi-res encoding. Add some flags/counters to the layer context for temporal layers. For multi-res: drop due to overshoot is checked on lowest stream, and if overshoot is detected we force drops on all upper streams for that frame. This feature is to avoid large frame sizes on big content changes following low content period. No change in behavior for screen_content_mode = 2. Change-Id: I797ab236cbbf3b15cad439e9a227fbebced632e6
2017-07-26vp8: Remove isolated skin & non skin blocks.Jerome Jiang
Neutral on RTC metrics and speed on Pixel. Change-Id: I26b907483fe133e6e4c1009d147631f0d0e0f2fb
2017-06-23vp8: Clean up skinmap debugging codes.Jerome Jiang
Use the computed skinmap. Change-Id: I8aabb5922ef5190ec85b9e01807cb79b4803b925
2017-06-23Merge "vp8: Compute skinmap only once before encoding."Jerome Jiang
2017-06-22vp8: Compute skinmap only once before encoding.Jerome Jiang
Get ready for other uses (i.e. cyclic refresh). Then use it when needed. Change-Id: Id0519a9921045e5fb7f3badb54e9f04e903f28f9
2017-06-21vp8: add temporal_filter.hJames Zern
quiets -Wmissing-prototypes Change-Id: Iffa77467720affe030de5335e9335232b9e70af1
2017-06-21add picklpf.hJames Zern
quiets -Wmissing-prototypes Change-Id: Ic24164aa1f86fe99a493a633d64606e6f44ecdc1
2017-06-21add ethreading.hJames Zern
quiets -Wmissing-prototypes in encodeframe.c Change-Id: Ic216d0bdd6130eac44f2183639a715b2f1088ebe
2017-06-21vp8,bitstream.h: add missing prototypesJames Zern
quiets -Wmissing:prototypes Change-Id: I835a80eddca2b16280780e18558c321df3272c43
2017-06-12vp8_skin_detection: add 'vp8_' prefix to public fnsJames Zern
BUG=webm:1438 Change-Id: I5feb31c254d02e116e624cfe702e73ba5a1f7aca
2017-06-12rename vp8/common/skin_detection.[hc] -> vp8_*James Zern
some build systems have trouble with duplicate basenames. vpx_dsp/skin_detection.[hc] were added in: 658e85425 Merge skin detection code in vp8/9. BUG=webm:1438 Change-Id: Ieaa70b40bda409ec23e6d179b47a930ac6243b05