summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
AgeCommit message (Collapse)Author
2013-10-07Merge "Rate control parameter adjustment"Deb Mukherjee
2013-10-07Rate control parameter adjustmentDeb Mukherjee
Adjusts the bits per mb parameter about 10% smaller. Results at speed 0: fullderfraw: +0.255% fullstdhdraw: +0.262% stdhdraw250: +0.291% Change-Id: I2b7317ac3f61737bc77eb5470aad870cade83fa5
2013-10-07cpplint issues resolved vp9_ratectrl.cJim Bankoski
Change-Id: Iae7674b0c946a5ac01617840b3f62965c654d920
2013-09-27Reusing FRAME_CONTEXT struct to simplify the code.Dmitry Kovalev
Change-Id: Ia455c1900d84a3221e3681e31e15ca86bd03f89d
2013-08-15Moving segmentation struct from MACROBLOCKD to VP9_COMMON.Dmitry Kovalev
VP9_COMMON is the right place to segmentatation struct because it has global segmentation parameters, not something specific to macroblock processing. Change-Id: Ib9ada0c06c253996eb3b5f6cccf6a323fbbba708
2013-08-09Moving loopfilter struct to VP9_COMMON.Dmitry Kovalev
Loop filter configuration doesn't belong to macroblock, so moving it from MACROBLOCKD to VP9_COMMON. Also moving the declaration of loopfilter struct from vp9_blockd.h to vp9_loopfilter.h. Change-Id: I4b3e34be9623b47cda35f9b1f9951f8c5b1d5d28
2013-07-20Merge "Moving all loop filter related variables into new struct."Dmitry Kovalev
2013-07-19Moving all loop filter related variables into new struct.Dmitry Kovalev
Adding loopfilter struct with fields from MACROBLOCKD and VP9Common. Eventually it will be moved to vp9_loopfilter.h for better code structure. Change-Id: Iaf5fb71c33719cdfa1b991f671caf071be9ea035
2013-07-19Removing unused static arrays from vp9_reatectrl.c.Dmitry Kovalev
Removed arrays: kf_boost_seperation_adjustment, gf_adjust_table, gf_intra_usage_adjustment, gf_interval_table. Change-Id: I62e400cb6e4d039787615169a3779e31ebf95893
2013-07-16use consistent framerate namingJames Zern
s/frame_rate/framerate/g Change-Id: I6fc3e088e419c5f46e3a9390dd8a2cad2677a2fc
2013-07-12Adding struct tx_probs and struct tx_counts to cleanup the code.Dmitry Kovalev
Also removing unused declarations from vp9_entropymode.h file. Change-Id: Ib9c5826db3584a32f6bb3297a76c522b99d83402
2013-07-11Moving segmentation related vars into separate struct.Dmitry Kovalev
Adding segmentation struct to vp9_seg_common.h. Struct members are from macroblockd and VP9Common structs. Moving segmentation related constants and enums to vp9_seg_common.h. Change-Id: I23fabc33f11a359249f5f80d161daf569d02ec03
2013-07-01Removing vp9_modecont.{h, c}.Dmitry Kovalev
Moving vp9_default_inter_mode_probs array to vp9_entropymode.c. Change-Id: I88ebda86ccc07f2a43c6c01d4b37898214cfb6de
2013-06-10Implement intra-coded framesAdrian Grange
Implements ability to signal and decode frames that are encoded using only intra coding modes. Only the decode side has been implemented here. Change-Id: I53ac6a8d90422cd08ba389e5236e15b45f9e93de
2013-06-07Coding tx-size selection by use of spatial contextDeb Mukherjee
Adds coding of transform size within a frame by use of context of transform sizes selected in left and above blocks. Also incorporates code for generating stats. TODO: generate and incorporate new default stats Change-Id: I6a7af099f6ad61d448521d9a51167aedaf638ed6
2013-06-07Cleans up mbskip encodingDeb Mukherjee
Refactors mbskip coding to be compatible with coding of the rest of the symbols. Adds forward/backward adaptation and removes a lot of the legacy code. Results: fast50: +1.6% derfraw300: +0.317% Change-Id: I395a2976d15af044d3b8ded5acfa45f6f065f980
2013-06-07Coding updates for tx-size selectionDeb Mukherjee
Changes to the coding of transform sizes, along with forward and backward probability updates. Results: derf300: +0.241% Context based coding of transform sizes will be in a separate patch. Change-Id: I97241d60a926f014fee2de21fa4446ca56495756
2013-06-06Change ref frame coding.Ronald S. Bultje
Code intra/inter, then comp/single, then the ref frame selection. Use contextualization for all steps. Don't code two past frames in comp pred mode. Change-Id: I4639a78cd5cccb283023265dbcc07898c3e7cf95
2013-06-05Clean-ups on switchable interpolation and mv_refDeb Mukherjee
Adds backward adaptation and differential forward updates of switchable interpolation filter probabilities. Also adds some cosmetic cleanups and minor fixes on mv_ref probabilities. derfraw300: +0.353% (with most coming from switchable interp changes) Change-Id: Ie2718be73528c945fd0d80cfd63ca2d9cb3032de
2013-05-31Merge all various transform size data trackers into single variables.Ronald S. Bultje
Change-Id: I2dfc569106b29fbe4da20585a0e85e5e9ea6a4db
2013-05-30Merge all intra mode coding trees into a single one.Ronald S. Bultje
Also merge all counters. This removes a few unused probability updates from the bitstream. Change-Id: I20f58853e9dac84d8c0d9703ae012c55917516eb
2013-05-26Remove splitmv.Ronald S. Bultje
Also do per-partition motion vector referencing in <sb8x8 partitions, and adjust mvref finding for sub8x8 partitions. Change-Id: Id3ed1ed4d2a8910d11d327db6cc63b8eb79f941f
2013-05-17Remove MODE_STATS flag and codePaul Wilkins
Change-Id: I6c70a8a8a4633399842ac74792003ae5f7859ffa
2013-05-07Deprecate code_zerogroup experiment.Paul Wilkins
Delete code under the CONFIG_CODE_ZEROGROUP flag. Change-Id: I5fe6c7b42a5da9b73118e33594301da4129f320a
2013-05-07Deprecate comp_interintra_pred experiment.Paul Wilkins
Delete code under the CONFIG_COMP_INTERINTRA_PRED flag. Change-Id: I3d1079cf46305c08f7e11d738596ea112e7b547f
2013-05-07Merge SB8X8 into the codebaseJingning Han
Pull sb8x8 out of experimental list. verified via borg run tests. Fixed unit test failures. Change-Id: I12a4bbd17395930580c048ab68becad1ffe46e76
2013-04-30sb8x8 integration in rd loop.Ronald S. Bultje
Work-in-progress, not yet ready for review. TODO items: - bitstream writing (encoder) and reading (decoder) - decoder reconstruction Change-Id: I5afb7284e7e0480847b47cd0097cb469433c9081
2013-04-30Merge "Renaming refresh_entropy_probs to refresh_frame_context." into ↵Dmitry Kovalev
experimental
2013-04-30Merge "Consistent names for quant-related functions and variables." into ↵Dmitry Kovalev
experimental
2013-04-26Renaming refresh_entropy_probs to refresh_frame_context.Dmitry Kovalev
Change-Id: I5429c02246d198eb1b6aadbc3313b26bf3436062
2013-04-26Consistent names for quant-related functions and variables.Dmitry Kovalev
Change-Id: I3a6d601e90e8740b9c26dd0afbfe9d467b75d367
2013-04-26Grow MODE_INFO array to use an 8x8 basis.Ronald S. Bultje
Change-Id: I087e08e7909a406b71715b8525c104208daa6889
2013-04-22Removes the code_nonzerocount experimentDeb Mukherjee
This patch does not seem to give any benefits. Change-Id: I9d2b4091d6af3dfc0875f24db86c01e2de57f8db
2013-04-22End of orientation zero group experimentDeb Mukherjee
Adds an experiment that codes an end-of-orientation symbol for every eligible zero encountered in scan order. This cleans out various other sub-experiments that were part of the origiinal patch, which will be later included if found useful. Results are slightly positive on all sets (0.1 - 0.2% range). Change-Id: I57765c605fefc7fb9d1b57f1b356843602abefaf
2013-04-16Recursive partition syntax codingJingning Han
Enable recursive partition information coding from SB64X64 down to MB16X16. The bit-stream syntax is now supporting rectangular block sizes. It starts from SB64X64 and recursively describes the partition type of the current block. If the partition type is PARTITION_NONE, the block is coded as a single unit; if it is PARTITION_HORZ or PARTITION_VERT, the block is segmented into two independently coded rectangular units, with no further partition needed; otherwise, the block is segmented into 4 square blocks. i.e., PARTITION_SPLIT case, each can be potentially further partitioned. Forward adaptive probability modeling is used for the partition information coding, conditioned on the current block size. Change-Id: I499365fb547839d555498e3bcc0387d8a3587d87
2013-04-15Initial addition of multiple ARF framesAdrian Grange
This is work-in-progress, it implements multiple ARF encoding behind an experimental flag. It adds the ability to insert multiple ARF frames into a single ARF group. This patch implements the reordering of the coded frames, and implements a fixed-length coding pattern. It applies a fixed quantizer strategy based on where the frame is in the coding sequence. Further work to modify the rate control strategy is ongoing and will be submitted via a set of future patches. In this first step, each ARF group is recursively bisected and an ARF frame added at that position in the sequence. The recursion continues until ARF frames are within MIN_GF_INTERVAL frames. The code sits behind the "multiple-arf" experimental flag ("CONFIG_MULTIPLE_ARF"). The experimental flag "oneshotq" ("CONFIG_ONESHOTQ") also needs to be enabled for this patch to work correctly. Change-Id: Ie473b05ebb43ac473c0cfb659b2b8042823085e2
2013-03-26Cleaning up rate control code.Dmitry Kovalev
Lower case variable names, declaration and initialization on the same line, removing redundant casts to double. Change-Id: I7ea3905bed827aa6faac11a78401b85e448b57f9
2013-03-08Continued experiment with nonzero countDeb Mukherjee
Adds probability updates for extra bits for the nzcs, code for getting nzc stats, plus some minor cleanups and fixes. Change-Id: If2814e7f04fb52f5025ad9f400f3e6c50a00b543
2013-03-07Coding con-zero count rather than EOB for coeffsDeb Mukherjee
This patch revamps the entropy coding of coefficients to code first a non-zero count per coded block and correspondingly remove the EOB token from the token set. STATUS: Main encode/decode code achieving encode/decode sync - done. Forward and backward probability updates to the nzcs - done. Rd costing updates for nzcs - done. Note: The dynamic progrmaming apporach used in trellis quantization is not exactly compatible with nzcs. A suboptimal approach has been used instead where branch costs are updated to account for changes in the nzcs. TODO: Training the default probs/counts for nzcs Change-Id: I951bc1e22f47885077a7453a09b0493daa77883d
2013-03-06Added stricter Q control flag.Paul Wilkins
Added a variant of the one shot maxQ flag for two pass that forces a fixed Q for the normal inter frames. Disabled by default. Also small adjustment to the Bits per MB estimation. Change-Id: I87efdfb2d094fe1340ca9ddae37470d7b278c8b8
2013-02-25Minor rate control refactoring and experiments.Paul Wilkins
Some minor refactoring code relating to estimates of bits per MB at a given Q and estimating the allowed Q range. Most of the changes here were included in a previous commit. This commit seeks to separate out the refactoring from more the material changes. Two #define control flags have been added for experimentation. ONE_SHOT_Q_ESTIMATE force the two pass encoder to use its initial Q range estimate for the whole clip even if this results in a miss on the target data rate. In effect this tightens the Q range seen at the expense of rate control accuracy. DISABLE_RC_LONG_TERM_MEM is a related flag that disables the long term memory in the rate control. Local adjustments are still made to try and better hit the rate target on a per frame basis but the impact of rate control misses is not propagated to the remainder of the clip. This means that for example an overshoot early on will not cause frames later in the clip to be starved of bits. Again the result of this relaxation amy be less rate control accuracy especially on short clips. The flags are disabled by default for now. Change-Id: I7482f980146d8ea033b5d50cc689f772e4bd119e
2013-02-23Split coefficient token tables intra vs. inter.Ronald S. Bultje
Change-Id: I5416455f8f129ca0f450d00e48358d2012605072
2013-02-22Merge "Code cleanup." into experimentalJohn Koleszar
2013-02-22Code cleanup.Dmitry Kovalev
Removing redundant 'extern' keywords and parentheses, fixing indentation, making variable names lower case, using short expressions x *= c instead of x = x * c, minor code simplifications. Change-Id: If6a25fcf306d1db26e90d27e3c24a32735c607de
2013-02-22Experimental removal of over quant codePaul Wilkins
The over quant code was added in VP8 post bitstream freeze to allow compression to lower data rates In VP9 the real qualtizer range has been greatly extended anyway. Change-Id: I5d384fa5e9a83ef75a3df34ee30627bd21901526
2013-01-23Adds an error-resilient mode with testDeb Mukherjee
Adds an error-resilient mode where frames can be continued to be decoded even when there are errors (due to network losses) on a prior frame. Specifically, backward updates are turned off and probabilities of various symbols are reset to defaults at the beginning of each frame. Further, the last frame's mvs are not used for the mv reference list, and the sorting of the initial list based on search on previous frames is turned off as well. Also adds a test where an arbitrary set of frames are skipped from decoding to simulate errors. The test verifies (1) that if the error frames are droppable - i.e. frame buffer updates have been turned off - there are no mismatch errors for the remaining frames after the error frames; and (2) if the error-frames are non droppable, there are not only no decoding errors but the mismatch PSNR between the decoder's version of the post-error frames and the encoder's version is at least 20 dB. Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
2013-01-18Use alt-ref frame context for keyframesJohn Koleszar
This matches the behavior prior to generalizing the frame context selection, and intuitively makes sense in that the first forward ref is immediately after the keyframe, so it's quality is improved a bit by using the keyframe's entropy context rather than the default. Change-Id: Ia82cef79382b9d8cfafdc44ba0533d4dc3e44053
2013-01-16Generalize and increase frame coding contextsJohn Koleszar
Previously there were two frame coding contexts tracked, one for normal frames and one for alt-ref frames. Generalize this by signalling the context to use in the bitstream, rather than tieing it to the alt ref refresh bit. Also increase the number of contexts available to 4, which may be useful for temporal scalability. Change-Id: I7b66daaddd55c535c20cd16713541fab182b1662
2013-01-16Start to anonymize reference framesJohn Koleszar
Remove lst_fb_idx, gld_fb_idx, alt_fb_idx, refresh_last_frame, refresh_golden_frame, refresh_alt_ref_frame from common. Gold/Alt are encode side conventions. From the decoder's perspective, we want to be dealing with numbered references. Updates to active_ref 2 signal mode context switches, vestigial from refresh_alt_ref_frame. This needs some clean up to make sense with increased numbers of reference frames, as well as reimplementing the swapping of alt/golden which was previously done using the buffer-to-buffer copy mechanism removed in an earlier commit. Change-Id: I7334445158b7666f9295d2a2dd22aa03f4485f58
2013-01-10Merge tx32x32 experiment.Ronald S. Bultje
Change-Id: I615651e4c7b09e576a341ad425cf80c393637833