summaryrefslogtreecommitdiff
path: root/vp8/encoder/ratectrl.c
AgeCommit message (Collapse)Author
2018-10-11Revert "vp8: Increase rate threshold for overshoot-drop"Marco Paniconi
This reverts commit bc066684ca4deff24d02ee56071d731b431bf438. Reason for revert: <INSERT REASONING HERE> Regression in webrtc perf test Original change's description: > vp8: Increase rate threshold for overshoot-drop > > Increase the rate threshold for the dropping when > overshoot is detected during encoding. This helps > to prevent some unneccessary drops for hard content. > > Change-Id: I258bf33883d46347efd44e1e192cb25c444d05fe TBR=sprang@chromium.org,marpan@google.com,builds@webmproject.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ib0e84747430ba6d04e479f9efd86d628b80a1e67
2018-10-03vp8: Increase rate threshold for overshoot-dropMarco Paniconi
Increase the rate threshold for the dropping when overshoot is detected during encoding. This helps to prevent some unneccessary drops for hard content. Change-Id: I258bf33883d46347efd44e1e192cb25c444d05fe
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
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-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-12vp8: Adjust the pred_err threhsold for drop on overshoot.Marco
Change-Id: Ica2a09ac87160936b6f7bd01f167f464ea3ac41c
2017-06-09Remove some dead code. Coverity CID 1310058Sylvestre Ledru
Change-Id: I1186cf1dd8cde42f5970928f43edfc852298289d
2016-10-20vp8: Apply gf target-size boost only when refresh_golden_frame = 1.Marco
Change only affects 1 pass cbr, error resilience off. Change-Id: I68b896b09d722995a71c44331233e97bd862bcfc
2016-10-19vp8: Adjust threshold to set the gf_noboost flag.Marco
Change only affects 1 pass cbr, with error_resilient off. Change-Id: Ibf254d8772fa2a8f188c9932d37b2f42362d8003
2016-10-19vp8: Add control for gf boost for 1 pass cbr.Marco
Control already exists for vp9, adding it to vp8. Usage is only when error_resilient is off. Added a datarate unittest for non-zero boost. Change-Id: I4296055ebe2f4f048e8210f344531f6486ac9e35
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-29Remove vp8_clear_system_stateJohann
Use vpx_clear_system_state instead. Change-Id: Ia3e9122f69a2c690ddd7c7bc54f92ccb9ec18b3e
2016-09-15apply clang-formatclang-format
Change-Id: I501597b7c1e0f0c7ae2aea3ee8073f0a641b3487
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-28Remove effectless initializationYaowu Xu
Change-Id: Iec117841a7ecf6f99d2b718057d8646e221c5c64
2015-09-28VP8: Update rate correction factor for drop_overshoot feature.Marco
Update rate correction factor when we drop the frame due to overshoot. Only affects when the drop_overshoot feature is on: screen_content_mode = 2. Change-Id: I67e24de979b4c74744151d2ceb3cd75fec2a1e7a
2015-09-24VP8: Adjust rate correction factor for drop due to overshoot.Marco
Change-Id: Id70ca2e18a46247720eb631ae13a8430bd8b0954
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-05-21Fix to visual studio build error.Marco
Change-Id: Ide080141ebc064584574c861fb324fe64cc572cc
2015-05-20vp8_drop_encodedframe_overshoot: fix to return setting.Marco
Make sure force_maxqp is set to 0 for return 0. Change-Id: Ie7c57842637226e932a390e7080e5ebb99996da3
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-04-28vpx_mem: remove vpx_memcpyJames Zern
vestigial. replace instances with memcpy() which they already were being defined to. Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
2014-12-03Various updates to vp8.Marco
Change-Id: Icc7a816491897107764e4c936288e9000e6319b8
2013-12-11Merge "vp8: remove 2 unused tables"James Zern
2013-12-11Fix the printf format stringAdrian Grange
There were two problems with the format string in the conditionally compiled print statement. It referred to a variable that is no longer available and it used incorrect format specifiers. Change-Id: I315e22bea2691bb535a2e33f5ca206fc55287a37
2013-12-10vp8: remove 2 unused tablesJames Zern
Change-Id: Ib5ba4e0b438107741efa28251848306322fd7f89
2013-11-01Fixes to buffer update for temporal layers.Marco Paniconi
When a frame is dropped due to |buffer_level| < 0 for a given temporal layer, the buffer level for the upper temporal layers was not updated (in calc_pframe_target_size()). This change fixes that. Also, use the layer per-frame-bandwidth for updating the buffer level of the higher layers when a frame is dropped. Change-Id: I660c23f3229b47e9d124a950b480314b4307c5a8
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-03-14Removed shadow warnings : bitstream.c encodeframe.c onyx_if.cScott LaVarnway
ratectrl.c and quantize.c Adding -Wshadow to CFLAGS generated a bunch of warnings. This patch removes these warnings. Change-Id: I8c8faa9fde57c1c49662d332a90bc8d9a0f4a2ce
2013-01-31Fix for divide by zero in vp8_adjust_key_frame.Marco Paniconi
Change-Id: I3bf9bdd95abfd287fbcb644f4fb85fb9204be95a
2012-12-10Moved zbin_over_quant to macroblock structScott LaVarnway
Change-Id: I76fe20ade099573997404b8733cf7f79e82fb21e WIP: Fixing unsafe threading in VP8 encoder.
2012-11-26Updates to qp-regulate and rate correction factor.Marco Paniconi
Don't use the switch to gf_rate_correction factor when temporal layers is used (i.e., cpi->oxcf.number_of_layers > 1). In temporal layers, we prefer to avoid this as any frame (e.g., base layer frame at anchor of pattern) may update both last and golden (and possibly alt-ref), and so we would get different rate correction factors within the same layer. This change will make sure one rate correction factor exists for each layer. Also, made some other code in qp-regulate that depends on alt/golden update specific to the 1 layer case. Change-Id: I41a6d085bd477f9307ef3b3c311695214273892c
2012-11-05Moving ymode_count, uv_mode_count to macroblock structScott LaVarnway
Change-Id: Ib73c7b2bee4cb2eb2528fa6b381fffe9503079a0
2012-09-13Removed pre_mvcScott LaVarnway
Not used. Change-Id: Ifbd97c9ad537d5184f7e305fa8acf6f027978b6b
2012-08-20silent compiling warnings for VC9 buildYaowu Xu
Change-Id: Iaa947e640f27e6f6eaf7d845f243536bca2df513
2012-07-27Remove the resetting of qp params for temporal layers.Marco Paniconi
The ambient qp and active worse/best qp were reset for every frame when temporal layers is on. This change removes this reset. As this affects the target size for forced key frames (it will actually lower the size somewhat), we increased the inital boost factor to compensate. Change-Id: Ie38d95f5c99ab3d447469c49e2177bc3fcc4ad28
2012-07-10Merge "Remove goldfreq in VP8_COMP"Yunqing Wang
2012-06-12Remove goldfreq in VP8_COMPYunqing Wang
goldfreq can be replaced by DEFAULT_GF_INTERVAL. Change-Id: I3659a9e7b9a6be9cb1952a1838e02c20d656e369
2012-06-11Fix pedantic compiler warningsJohn Koleszar
Allows building the library with the gcc -pedantic option, for improved portabilty. In particular, this commit removes usage of C99/C++ style single-line comments and dynamic struct initializers. This is a continuation of the work done in commit 97b766a46, which removed most of these warnings for decode only builds. Change-Id: Id453d9c1d9f44cc0381b10c3869fabb0184d5966
2012-06-07Remove unused code in drop_frameYunqing Wang
Removed unused parameters and code related to drop_frame. Change-Id: I594e050d49b1805c6f72abf06005ef624256bb57
2012-05-11fix warnings for building on win32Scott Graham
Change-Id: If6e11ba3d681e831d7d98662c0abdd2ac16b3811
2012-04-23Shares one set of RD costs tables between all encoding threadsAttila Nagy
RD costs were local to MACROBLOCK data and had to be copied all the time to each thread's MACROBLOCK data. Tables moved to a common place and only pointers are setup for each encoding thread. vp8_cost_tokens() generates 'int' costs so changed all types to be int (i.e. removed unsigned). NOTE: Could do some more cleaning in vp8cx_init_mbrthread_data(). Change-Id: Ifa4de4c6286dffaca7ed3082041fe5af1345ddc0
2012-04-23Removes duplication of key frame mode probabilitiesAttila Nagy
Key frame macrobock and block mode probabilities are constant. Remove the allocation of tables for each codec instance and use instead the default const prob tables. Change-Id: I8361798ac491f9b3889e86925a494c58647c753f
2012-03-13Merge "Update for key frame target size setting."Jim Bankoski
2012-03-12Update for key frame target size setting.Marco Paniconi
Set an iniital/minimun boost level for the frame rate factor of key frame target size setting. Change-Id: If2586f4ac76a1fa89378aa652a58607356a1f426
2012-03-01vp8e - force at least some change in over and under shootsPaul Wilkins
Change-Id: Ie1796f272dc33bf5a1c8ac990da625961d272aa9