summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_int.h
AgeCommit message (Collapse)Author
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
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-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-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-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
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-10-14Drop empty frames.Jim Bankoski
Change-Id: I2d45a6eb3aaca97eb61e8e7ef9e5114221091244
2016-10-07vp8: Change default gf behavior for 1 pass cbr.Marco
In 1 pass CBR, with error_resilience off, allow for special logic to change the default gf behaviour. In this CL: boost is turned off and the gf period is set to a multiple of cyclic refresh period. Change only affect 1 pass CBR mode, i.e, when the flag gf_update_onepass_cbr is set. Including the previous change (3ec8e11: to allow cyclic refresh for error_resilience off), comparing metrics on RTC set for error_resilience off vs on: avgPSNR/SSIM up by ~6%. Change-Id: Id5b3fb62a4f04de5a805bd1b418f2b349574e0bc
2016-09-19vp8: convert some uses of unsigned long to size_tJames Zern
similar to changes that were done in vp9 for encoded frame size reporting. has the side-effect of quieting a -Wshorten-64-to-32 warning. Change-Id: I89f74cb617fc29334ee351dc8dfaa3b8cfd4e5af
2016-09-08vp8: Remove TSAN warning around end of encode.Alexander Potapenko
Tsan warns when run in one pass and there is a recode loop. Change-Id: Ice2ecb2270f09ebd49efbd49c0e4f77d32e23c0f
2016-09-02Merge changes from topic 'Wundef'Johann Koenig
* changes: Enable -Wundef by default Define VP8_TEMPORAL_ALT_REF to !CONFIG_REALTIME_ONLY Remove CONFIG_DEBUG guards from assert() Remove unused function vpx_de_mblock Fix -Wundef warning for OUTPUT_FPF Fix -Wundef warning for __SANITIZE_ADDRESS__
2016-08-31Define VP8_TEMPORAL_ALT_REF to !CONFIG_REALTIME_ONLYJohann
Previously VP8_TEMPORAL_ALT_REF was only defined for non-realtime-only builds. However, its value was checked with #if, not #ifdef. Fixes -Wundef warnings. BUG=webm:1069 Change-Id: If78d8731298f3f0d3662ffa25f973e7adaf67152
2016-08-25vp8: Move loopfilter synchronization to end of encode_frame call.Marco
Allow loopfilter to continue until encode_frame is completed. Change-Id: I7bbccc3d409e263aab6a6ff24588d8b2a964a96e
2016-07-21Revert "Amend and improve VP8 multithreading implementation"Yunqing Wang
Reverted the patch because of possible performance issue. Change-Id: I49944f827ccd38ed194c9f8d9cb9036fa9bf79e1
2016-07-15vp8: apply clang-formatclang-format
Change-Id: I7605b6678014a5426ceb45c27b54885e0c4e06ed
2016-06-24Port metric computation changes from nextgenv2Yaowu Xu
Change-Id: I4aceffcdf7af59ffeb51984f0345c3a4c7e76a9f
2016-06-16VP8_COMP: make frames_since_golden signedJohann
This value is signed in vp9/10 Cleans warning in Android build: comparison of integers of different signs: 'unsigned int' and 'int' if (cpi->frames_since_golden == (cpi->current_gf_interval >> 1)) ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ie137724982f3a46c8c1820548c1960d62a4e96f2
2016-03-22Simplify the loopfilter synchronization logic in VP8 encoderYunqing Wang
This patch was to fix a reported Hangouts deadlock/freezing issue in VP8 encoder(issue 27232610). The original encoder loopfilter synchronization happened in the following frame, which was prone to causing problems in some complex use cases. This patch simplified the synchronization logic. More testing needs to be done. Change-Id: I38fd3f35d11f98fae1e44546aa5e4c6d6e19c4be
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-09-30vp8: change build_intra_predictors_mby_s to use vpx_dsp.Ronald S. Bultje
Change-Id: I2000820e0c04de2c975d370a0cf7145330289bb2
2015-08-18Rename vp8 quantize.cJohann
Move it to vp8_quantize.c and make sure to use the full path for all vp8 includes of quantize.h Change-Id: I284651ff681707385f4924ea7db1541905c1624a
2015-07-07Move sub pixel variance to vpx_dspJohann
Change-Id: I66bf6720c396c89aa2d1fd26d5d52bf5d5e3dff1
2015-05-19VP8: For high overshoot, force drop frame and max-out QP.Marco
This allows rate control to react to content of current frame being encoded. Enabling this feature via the setting: screen_content_mode = 2. Change-Id: Ib2c6670551d96f4907495d5b7b76bb8c49e673db
2015-05-14vp8/rdopt.h+onyx_int.h: add some missing prototypesJames Zern
silences missing prototype warnings Change-Id: Icd477e37b502205d0a60e7389e51b1ba17d8888e
2015-01-27vp8enc: Prevent out of bounds memory access.Alex Converse
Prevent out of bounds access when attempting to increase frame size Change-Id: I710c40c692802a72963c9680c2125da17f9060a9
2014-12-03Various updates to vp8.Marco
Change-Id: Icc7a816491897107764e4c936288e9000e6319b8
2014-08-14vp8: Modify to use closest reference in zero_mv bias.Marco
Modify zero_mv bias condition to include check that "closest" reference is last_frame. This is needed for temporal layers, where the last_frame is not always the closest reference. Also, constain zeromv_count to be for last_frame reference. Change-Id: I7af54a809ebf01ef43b9933c9d4095b6cb189390
2014-07-29vp8: Add an aggressive denoising mode.Marco Paniconi
Change-Id: Ie4686e1b15af6bcc8d59d585bbeb996f38224522
2014-04-23Add VPXD_SET_DECRYPTOR support to the VP9 decoder.Joey Parrish
Change-Id: I88f86c8ff9af34e0b6531028b691921b54c2fc48
2014-01-23vp8/encoder: add extern "C" to headersJames Zern
Change-Id: I252f5f8a5d5ada65da08699774a7bb1eb2bd5b2e
2013-12-16vp8/encoder: normalize include guardsJames Zern
Change-Id: I82834550503a43ff7ec8422342dc65136453b287
2013-07-18VP[89]_COMMON: remove golden/altref frame countsJames Zern
these are only used in the encoder. frames_since_golden / frames_till_alt_ref_frame -> VP[89]_COMP Change-Id: Ie14a6f46987bced685ddb449b85dc261caba6dfe
2013-07-16use consistent framerate namingJames Zern
s/frame_rate/framerate/g Change-Id: I6fc3e088e419c5f46e3a9390dd8a2cad2677a2fc
2013-05-21Fixes for run-time change in temporal layers.Marco Paniconi
Use a separate counter for resetting the pattern upon a change in temporal layers, and set/initialize the layer context parameters for the new temporal layer state. Also moved the setting of layer configuation in init_config() to a separate function. Change-Id: Ic7fc023a1e5490020509e107004645098f4c00f0
2013-03-20Removed mode_chosen_countsScott LaVarnway
This eliminates a tsan warning. Change-Id: I204d109b12adb4e347762e63d12859244f28d1a9
2013-03-01Merge "Use intrinsics for sse2 regular quantize"Johann
2013-02-28Use intrinsics for sse2 regular quantizeJohann
Remove dependency of this function on asm_offsets. ssse3/sse4 next. Change quant_shift calculation so it be done using SIMD. Pre-calculate as much as possible to simplify EOB selection. Take advantage of qcoeff being zero'd by tying the if statements together. Speed parity with previous implementation with gcc x86_64 linux Change-Id: Ife97556a1eca3a74b09def1a3d04084974dff1fb
2013-02-22vp8: make gf_group_bits 64-bitJames Zern
avoids signed integer overflow; matches kf_group_bits Change-Id: I193145cdc4fa53e70fba0a1731a03eb1a574931d
2012-12-10Moved error_bins to macroblock structScott LaVarnway
Change-Id: Ic9956ddf1c2ddffcf7be7fdfc23ad9a2426fc47a WIP: Fixing unsafe threading in VP8 encoder.
2012-12-10Moved zbin_mode_boost to macroblock structScott LaVarnway
Fixing unsafe threading in VP8 encoder. Change-Id: Ibf4c89a2043654834747811bc11eb283de0bb830
2012-12-10Moved zbin_over_quant to macroblock structScott LaVarnway
Change-Id: I76fe20ade099573997404b8733cf7f79e82fb21e WIP: Fixing unsafe threading in VP8 encoder.
2012-12-05Removed check_gf_quality()Scott LaVarnway
and various unused members in VP8_COMP along with other code cleanups. Change-Id: I56c6c0a77a51f5ac5cbd6071017bcbfd2623b7df
2012-12-04Moving mbs_tested_so_far, mode_test_hit_counts to macroblock structScott LaVarnway
Change-Id: Ifa78c0a953fab3e5dd7af0446924846c7022cd09
2012-12-03Merge "Moving rd_thresh_mult, rd_threshes to macroblock struct"Scott LaVarnway
2012-11-06Moving count_mb_ref_frame_usage to macroblock structScott LaVarnway
Change-Id: I44e4e3869f231ae270cca98c9565f23c512e3ddf
2012-11-06Merge "Removed mb_norm_activity_map"Scott LaVarnway
2012-11-06Moving rd_thresh_mult, rd_threshes to macroblock structScott LaVarnway
Change-Id: I650a593162280ab40e71e527ec6518303e2d5723
2012-11-06Removed mb_norm_activity_mapScott LaVarnway
Not used. Change-Id: I07ba929e3ff82b4b0c86f731769cdf5434c7a816
2012-11-06Moving _error counts to macroblock structScott LaVarnway
Change-Id: I28ac1519d1594801fef9a623cb64598d3d751eb0
2012-11-06Moving MVcount to macroblock structScott LaVarnway
Change-Id: Ie22841d096f3c86694b95bd06fc3a8ce1f032a10