summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_firstpass.c
AgeCommit message (Collapse)Author
2013-11-26Fix unit test failuresYaowu Xu
Change-Id: Ibc61ef81fafeb20df6df6e5496b6c01760f3dc84
2013-11-22Refactoring of rate control - part 1Deb Mukherjee
Moves all rate control variables to a separate structure, removes some currently unused variables, moves some rate control functions to vp9_ratectrl.c, and splits the encode_frame_to_data_rate function. Change-Id: I4ed54c24764b3b6de2dd676484f01473724ab52b
2013-11-20Merge "vpxenc: add --aq-mode flag to control adaptive quantization"Guillaume Martres
2013-11-18Merge "Move vp9_extend.{h,c} from common to encoder"Yaowu Xu
2013-11-18Move vp9_extend.{h,c} from common to encoderYaowu Xu
Since they used in encoder only. This commit also re-order includes for the files that include vp9_extend.h Change-Id: I929fc113f2135d3198cd1fc6a17434e5a2f8a459
2013-11-18Constrain encoder motion search rangeJingning Han
Explicitly constrain the upper limit of motion search range (in the unit of full pixel) to be [-1023, +1023]. It is intended to control the effective motion search range for 4K sequences. Change-Id: I645539c70885eec0f155781f439d97d333336e88
2013-11-15Removing vp9_encodeintra.{h, c} files.Dmitry Kovalev
There was only one function in *.c file, so moving it to vp9_encodemb.c. Change-Id: I728859d08b3d6c05c33c1c5b21f0ea1d0e0f83af
2013-11-15vpxenc: add --aq-mode flag to control adaptive quantizationGuillaume Martres
Change-Id: I57e1ad4bed3487df12893ced77c49093f8755706
2013-11-13Dual buffer encoding for intra modesJingning Han
Overall change (using dual buffer scheme for superblocks of both inter and intra modes) reduces speed 2 runtime: bluesky_1080p at 6000kbps: 263553ms -> 257441ms riverbed_1080p at 8000kbps: 233230ms -> 225308ms. Change-Id: Idf8d70f768a4b0d97b2a8506372c57b7b4022119
2013-11-11Allocate dual buffer sets for encodingJingning Han
Allocate memory space of dual buffer sets that store the coeff, qcoeff, dqcoeff, and eobs. Connect the pointers of macroblock_plane and macroblockd_plane to the actual buffer in use accordingly. Change-Id: I2f0b5f482ca879fae39095013eaf8901db20a5a4
2013-11-06Replacing mi_{width,height}_log2 with num_8x8_blocks_{wide,high}_lookup.Dmitry Kovalev
Change-Id: I04c55daef89bca2b85cb7db0850f9b052abc5a7c
2013-10-31Remove one shot q experimentDeb Mukherjee
The experiment is no longer used and can be removed. Change-Id: I9feab378fc895c120aa375353c68f93cad090609
2013-10-28vp9: add TileInfoJames Zern
replaces use of cur_tile_mi_(row|col)_(start|end) by VP9_COMMON, making it less stateful and more reusable for parallel tile decoding Change-Id: I1df09382b4567a0e5f4434825d47c79afe2399be
2013-10-24Adding get_frame_new_buffer() function to replace duplicated code.Dmitry Kovalev
Change-Id: I6e0e19231a48364c1de7dfab730b121ab227f111
2013-10-17Add missing calls to emms in the adaptive quantization codeGuillaume Martres
Also avoid using floating-point operations when adaptive quantization is disabled. Change-Id: I54936d7afb661df049cdb3ecd246d04ac2a9d8d3
2013-10-16Use a separate MODE_INFO stream for each tile columnGuillaume Martres
This should make parallel tiles decoding easier to implement. Change-Id: I6226456dd11f275fa991e4a7a930549da6675915
2013-10-16Get rid of "this_mi", use "mi_8x8[0]" everywhere insteadGuillaume Martres
The only case where they were intentionally pointing to different structures was in mbgraph, and this didn't have the expected behavior because both of these pointers are used interchangeably through the code Change-Id: I979251782f90885fe962305bcc845bc05907f80c
2013-10-16Implement variance-based adaptive quantizationGuillaume Martres
This should be similar to what x264 does with --aq-mode 1. It works well with clips like parkjoy and touhou (http://x264.nl/developers/Dark_Shikari/LosslessTouhou.mkv). At low bitrates, the segmentation signaling overhead may negate the benefits of this feature. (PGW) Default changed to feature OFF to allow provisional merge. Change-Id: I938abf9bb487e1d4ad3b0264ea03d9826275c70b
2013-10-09Deprecate the use of PARTITION_INFO from encoderJingning Han
Use b_mode_info to store the inter prediction mode of sub8x8 block, in replacement of the use of partition_info. Remove redundant buffer update for partition_info. For bus_cif at 2000 kbps, this seem to make speed 0 about 1% faster. Change-Id: Id1b3be45e75a24fb4b42335ac480c23e440978f6
2013-10-07Merge "cpplint problems resolved with vp9_firstpass.c"Jim Bankoski
2013-10-05cpplint problems resolved with vp9_firstpass.cJim Bankoski
Change-Id: Ic7b7014a0d857585bfd4baaea1d5c27ffe355642
2013-10-04Fix first pass for non-square blocksGuillaume Martres
Change-Id: Ic049f0a6ce190f33859118e7b8cfcfe305979102
2013-09-24Limit mv search range for first pass and mbgraphYaowu Xu
Both first pass and mbgraph search use block size 16x16 for motion estimation. This commit put a limit of motion vector range. The effective range allows the entire 16x16 with required subpel interpolation input to be completely outside image border, but not any further away from image border. Change-Id: Id70a5ed08be49e70959f064859d72adc7d775d08
2013-09-22Improves constant qual, constrained qual turned onDeb Mukherjee
Adds modeled functions to decide the qp for altref frames in constant q mode similar to other functions in use in bitrate mode. Also turns on the constrained quality mode (end-usage=2) option which was turned off before. Basic testing shows the mode works in principle, to cap bitrate to the target-bitrate specified, while allowing lower bitrate depending on the cq-level specified. The mode will need to be improved over time. Results for constant quality vs bitrate control mode: derfraw300/fullderfraw: +3.0% at constant quality over bitrate control. fullstdhdraw: +4.341% stdhdraw250: +5.361% Change-Id: If5027c9ec66c8e88d33e47062c6cb84a07b1cda9
2013-09-19fix integer overflow errorsYaowu Xu
Change-Id: I76f440a917832c02d7a727697b225bac66b99f56
2013-09-11New mode_info_context storage -- undo revertScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of pointers to MODE_INFO structs. The MODE_INFO structs are now stored as a stream (decoder only), eliminating unnecessary copies and is a little more cache friendly. Change-Id: I031d376284c6eb98a38ad5595b797f048a6cfc0d
2013-09-10Modify encode breakout for static framesYunqing Wang
Thank Paul for the suggestions. While turning on static-thresh for static-image videos, a big jump on bitrate was seen. In this patch, we detected static frames in the video using first-pass stats. For different cases, disable encode breakout or reduce encode breakout threshold to limit the skipping. More modification need be done to break incorrect partition picking pattern for static frames while skipping happens. Change-Id: Ia25f47041af0f04e229c70a0185e12b0ffa6047f
2013-09-09Merge "Revert "New mode_info_context storage""James Zern
2013-09-09Revert "New mode_info_context storage"James Zern
This reverts commit dae17734ece414091ba1184f7becd0aa6c0004f1 Encode crashes, leaks and increases integer overflow errors. Change-Id: I595aa2649bb8d0b6552ff91652837a74c103fda2
2013-09-08Merge "New mode_info_context storage"Jim Bankoski
2013-09-06Support a constant quality mode in VP9Deb Mukherjee
Adds a new end-usage option for constant quality encoding in vpx. This first version implemented for VP9, encodes all regular inter frames using the quality specified in the --cq-level= option, while encoding all key frames and golden/altref frames at a quality better than that. The current performance on derfraw300 is +0.910% up from bitrate control, but achieved without multiple recode loops per frame. The decision for qp for each altref/golden/key frame will be improved in subsequent patches based on better use of stats from the first pass. Further, the qp for regular inter frames may also be varied around the provided cq-level. Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
2013-09-06New mode_info_context storageScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of a pointer to a MODE_INFO struct and a "in the image" flag. The MODE_INFO structs are now stored as a stream, eliminating unnecessary copies and is a little more cache friendly. For the test clips used, the decoder performance improved by ~4.3% (1080p) and ~9.7% (720p). Patch Set 2: Re-encoded clips with latest. Now ~1.7% (1080p) and 5.9% (720p). Change-Id: I846f29e88610fce2523ca697a9a9ef2a182e9256
2013-08-27Renaming txfm_size to tx_size.Dmitry Kovalev
Change-Id: I752e374867d459960995b24d197301d65ad535e3
2013-08-16Removing unused or redundant arguments from *_args structures.Dmitry Kovalev
Redundant dst, pre[2] from build_inter_predictors_args, unused cm from encode_b_args. Change-Id: I2c476cd328c5c0cca4c78ba451ca6ba2a2c37e2d
2013-08-15Using { 0 } for initialization instead of memset.Dmitry Kovalev
Change-Id: I4fad357465022d14bfc7e13b348c6da267587314
2013-08-05Replacing long block size enum values with shorter ones (2).Dmitry Kovalev
Change-Id: I428c4d42212b757112e3acfe5b81314cfbb5fd6b
2013-08-01Cleanup: removing unused function arguments.Dmitry Kovalev
Change-Id: I27471768980fc631916069f24bc7c482a5c9ca17
2013-07-25General cleanups.Dmitry Kovalev
Removing unused constants, macros, and function declarations. Using ROUND_POWER_OF_TWO macro, vp9_zero, vp9_copy where possible. Moving #include from *.h to *.c. Merging for loops for motion vectors. Change-Id: Ic3bf841764a2bb177128bb3a6d7aa8f68229cd13
2013-07-18Merge scale_factors and scale_factors_uv.Ronald S. Bultje
This prevents a duplicate memcpy of a 128-byte struct every time set_scale_factors() is called (which is a lot), thus leading to a decrease from 3.7 MB to 1.85 MB of struct copying per 64x64 block RD/partition loop. Overall, this decreases encoding time of the first 50 frames of bus @ 1500kbps (speed 0) from 1min5.9 to 1min4.9, i.e. about a 1.5% overall speedup. We can likely get more gains by removing the copy of the other struct (and replacing it with an indexing) as well. Change-Id: I3dceb7e79f71e6fe911b11cc994cf89a869dde7a
2013-07-16use consistent framerate namingJames Zern
s/frame_rate/framerate/g Change-Id: I6fc3e088e419c5f46e3a9390dd8a2cad2677a2fc
2013-07-12Some minor cleanups for efficiencyDeb Mukherjee
Implements some of the helper functions more efficiently with lookups rathers than branches. Modeling function is consolidated to reduce some computations. Also merged the two enums BLOCK_SIZE_TYPES and BlockSize into one because there is no need to keep them separate (even though the semantics are a little different). No bitstream or output change. About 0.5% speedup Change-Id: I7d71a66e8031ddb340744dc493f22976052b8f9f
2013-07-03Refactoring setup_pre_planes function.Dmitry Kovalev
Removing set_refs, adding set_ref function. Change-Id: I5635c478b106ae4e57d317f1c83d929644307e63
2013-07-01Removing vp9_mbpitch.c, moving vp9_setup_block_dptrs to vp9_block.h.Dmitry Kovalev
Change-Id: Ia547a5dd7650b771fd00edd673ab9f920270731c
2013-06-26Remove empty function vp9_build_block_offsetsJingning Han
This function is empty, hence is removed. Change-Id: Ia9d01710806bffe0398a6dc9405f8a5a81b27d74
2013-06-20disable speed > 1 speed corrections in firstpassJim Bankoski
need to rework these Change-Id: I17dc2c88d2faadd2f8fb117c52c25f04ea2e9856
2013-06-08Merge "Fix firstpass if framesize is not a multiple of 16." into experimentalRonald S. Bultje
2013-06-08Fix firstpass if framesize is not a multiple of 16.Ronald S. Bultje
Change-Id: Iec41736c2b6140715f90f40de5ae6cf52497a9b8
2013-06-07Fix mv range border in pixelsJingning Han
WIP: trying to resolve the mismatch issue in extending frame dimension into multiples of 8. Change-Id: I24e7638ab3c50e21e6969c1eeed4f607d6f11f65
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-05-31Replacing memcpy with struct assignment.Dmitry Kovalev
Change-Id: Ib557cc6351404b9e178e95a545883eb3666f11f0