summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.h
AgeCommit message (Collapse)Author
2016-08-02vp9/encoder: apply clang-formatclang-format
Change-Id: I45d9fb4013f50766b24363a86365e8063e8954c2
2016-01-22Short circuit flat blocks when coding screen content at realtime speed.Alex Converse
In inter mode search skip all modes except NEARESTMV and DC_PRED. 10% less encode latency for large frames using the chromium remoting_perftests. +0.313% BDRATE on the screencast set at speed -6. Change-Id: Ib97a39dd8bcdeab545509e0e02d78ce7033f8c63
2015-07-08Changes to use of rectangular partitions.paulwilkins
Changes to allow more use of rectangular partitions at speeds 1 and 2 for content classed by the first pass as animation and for blocks near the active image edge. This has quite a big impact in quality for the animated test sequence but also hurts encode speed for speed 2. For other content types the impact on both speed and quality is small. Added some plumbing for detection of internal vertical image edges. Change-Id: I3fc48de2349f8cb87946caaf0b06dbb0ea261a9a
2015-07-08Change speed and rd features for formatting bars.paulwilkins
Change speed features / behavior for split mode when there is an internal active edge (e.g. formatting bars). Remove some threshold constraints in rd code near the active edge of the image. Add some plumbing for left and right active edge detection. Patch set 5. Limit rd pass through for sub 8x8 to internal active edges. This takes away any speed penalty for most clips but keeps the enhanced edge coding for the more critical case of internal image edges Change-Id: If644e4762874de4fe9cbb0a66211953fa74c13a5
2015-03-20Experimental rd bias based on source vs recon variance.paulwilkins
This experiment biases the rd decision based on the impact a mode decision has on the relative spatial complexity of the reconstruction vs the source. The aim is to better retain a semblance of texture even if it is slightly misaligned / wrong, rather than use a simple rd measure that tends to favor use of a flat predictor if a perfect match can't be found. This improves the appearance of texture and visual quality on specific test clips but is hidden under a flag and currently off by default pending visual quality testing on a wider Yt set. Change-Id: Idf6e754a8949bf39ed9d314c6f2daaa20c888aad
2014-10-27Refactor encoder tile data structureJingning Han
Make the common tile info as one element in the encoder tile data struct. Change-Id: I8c474b4ba67ee3e2c86ab164f353ff71ea9992be
2014-10-24Tile based adaptive mode search in RD loopJingning Han
Make the spatially adaptive mode search in rate-distortion optimization loop inter tile independent. Experiments suggest that this does not significantly change the coding staticstics. Single tile, speed 3: pedestrian_area 1080p 1500 kbps 59192 b/f, 40.611 dB, 101689 ms blue_sky 1080p 1500 kbps 58505 b/f, 36.347 dB, 62458 ms mobile_cal 720p 1000 kbps 13335 b/f, 35.646 dB, 45655 ms as compared to 4 column tiles, speed 3: pedestrian_area 1080p 1500 kbps 59329 b/f, 40.597 dB, 101917 ms blue_sky 1080p 1500 kbps 58712 b/f, 36.320 dB, 62693 ms mobile_cal 720p 1000 kbps 13191 b/f, 35.485 dB, 45319 ms Change-Id: I35c6e1e0a859fece8f4145dec28623cbc6a12325
2014-10-13Fix vp9_rd_pick_inter/intra function typesJingning Han
The returned value is not used anywhere, hence changing the function type into void. Change-Id: I0ece49ed61e7aab6df01140135503ad41d4ef4a4
2014-10-13Refactor rate distortion cost structureJingning Han
This commit makes a struct that contains rate value, distortion value, and the rate-distortion cost. The goal is to provide a better interface for rate-distortion related operation. It is first used in rd_pick_partition and saves a few RDCOST calculations. Change-Id: I1a6ab7b35282d3c80195af59b6810e577544691f
2014-09-25Adds various high bit-depth encode functionsDeb Mukherjee
Change-Id: I6f67b171022bbc8199c6d674190b57f6bab1b62f
2014-07-02Split vp9_rdopt into vp9_rdopt and vp9_rd.Alex Converse
vp9_rdopt is for making rd optimal mode decisions. vp9_rd is for all other rd related routines. Anything used outside of making an rd optimal decision belongs in rd. Change-Id: I772a3073f7588bdf139f551fb9810b6864d8e64b
2014-06-29remove unused parms from rd_pick_inter_mode_sb_seg_skipJim Bankoski
Change-Id: I7f989d197444d166133ad91eb23ac1033109f58d
2014-06-25Merge "Add vp9_ prefix to mv_pred and setup_pred_block functions"Jingning Han
2014-06-24Add vp9_ prefix to mv_pred and setup_pred_block functionsJingning Han
Make these two functions accessible by both RD and non-RD coding modes. Change-Id: Iecb39dbf3d65436286ea3c7ffaa9920d0b3aff85
2014-06-20Fork vp9_rd_pick_inter_mode_sb_seg_skipAlex Converse
Change-Id: I549868725b789f0f4f89828005a65972c20df888
2014-06-13Moving RD-opt related code from vp9_encoder.h to vp9_rdopt.h.Dmitry Kovalev
Change-Id: I8fab776c8801e19d3f5027ed55a6aa69eee951de
2014-06-12Moving full_pixel_search() to vp9_mcomp.c.Dmitry Kovalev
Change-Id: I12389f801ebd3bd2ae3bf31e125433bfb429ee65
2014-05-27Cleaning up full_pixel_search().Dmitry Kovalev
Change-Id: Ie517ac06385133ffb3bbc449d9f23240f245976d
2014-05-21Reusing rd_less_than_thresh() function.Dmitry Kovalev
Change-Id: I29df10fde86128467f5e99fc373ac04f004257e1
2014-05-07Merge "Clean up full-pixel search calling code"Yunqing Wang
2014-05-05Clean up full-pixel search calling codeYunqing Wang
Removed repetitive code. Change-Id: Ib6adb6eaf7d4e3feeabb71651f4cc447974a925d
2014-05-01Moving costs from MACROBLOCK to VP9_COMP.Dmitry Kovalev
Change-Id: I61471dd0f77d1547abec13cbf9670e1c4eb9131a
2014-04-22Renaming "onyx" to "encoder".Dmitry Kovalev
Actual renames: vp9_onyx_if.c -> vp9_encoder.c vp9_onyx_int.h -> vp9_encoder.h Change-Id: I80532a80b118d0060518e6c6a0d640e3f411783c
2014-04-18Moving set_rd_speed_thresholds{,_sub8x8} to vp9_rdopt.{h, c}.Dmitry Kovalev
Change-Id: I983364b33e8f103b43a0448821e890989176f1cc
2014-04-08Select prediction filter type in non-RD mode decisionJingning Han
This commit allows the non-RD mode decision flow to select prediction filter type in NEWMV mode. It provides 8.14% compression performance gains in both settings of AQ=0 and 3. The current speed impact is about 5% to 10% slower. Change-Id: Id66ecebf77abd8f90fb3f6a066c0e8dfb4bf1c42
2014-03-18Rearranging and removing unused defines.Dmitry Kovalev
Change-Id: I03049f89565ce19a297e65e2d53db127dc6f77d9
2014-03-07Merge "Use modeled rate distortion costs for non-RD mode"Jingning Han
2014-03-06Use modeled rate distortion costs for non-RD modeJingning Han
This commit replaces SAD cost with modeled rate-distortion cost for non-RD mode decision. It translates the prediction residual SSE into estimate rate and reconstruction distorion costs, hence capturing the quantization setting effect. The compression performance of speed -7 for rtc set is improved by 14.79%. Change-Id: Ifda014eb0501d13109fe7f92680bf1410b463632
2014-03-05Inlining and removing vp9_set_mbmode_and_mvs().Dmitry Kovalev
Change-Id: I9717ef611ef9c39b109b2358c9771bf7fae2dd50
2014-03-03Adding consts and cleaning up vp9_rdopt.Dmitry Kovalev
Change-Id: I9423b543e1be414e5c9e10480b813f06e6b88f8a
2014-02-26Moving common code into vp9_get_entropy_contexts().Dmitry Kovalev
Change-Id: I197670a405f7c2e7796424faa187a61081db8567
2014-01-24Merge changes ↵James Zern
I826655a7,I5164df72,Iba9b198c,Ide9a6846,I4f51ce85,I0e6aa00f,Ic334da9a,I252f5f8a,I7865db2d,I13b434b1 * changes: test/: remove unnecessary extern "C"s top-level: add extern "C" to headers vpx_ports: add extern "C" to headers vpx: add extern "C" to headers vp9/encoder: add extern "C" to headers vp9/decoder: add extern "C" to headers vp9/common: add extern "C" to headers vp8/encoder: add extern "C" to headers vp8/decoder: add extern "C" to headers vp8/common: add extern "C" to headers
2014-01-23vp9/encoder: add extern "C" to headersJames Zern
Change-Id: I4f51ce859a97bf1b8fd2b37ac585b7c643232b69
2014-01-22Removing get_scale_ref_frame_idx() function + cleanup.Dmitry Kovalev
Change-Id: Ic9472f361f8749a165aa464c2fa859681b66381b
2014-01-21Cleaning up vp9_setup_buffer_inter() function.Dmitry Kovalev
Change-Id: Ia63e2d05fa5dca3fb67788b0f1f28e9802ef27dd
2014-01-16Inter-frame non-RD mode decisionJingning Han
This commit setups a test framework for real-time coding. It enables a light motion search for non-RD mode decision purpose. Change-Id: I8bec656331539e963c2b685a70e43e0ae32a6e9d
2014-01-13Converting int_mv to MV.Dmitry Kovalev
Change-Id: Id31c0e100d275bd3650eaf5e4b8fe5ce648dbfaf
2014-01-10Declare setup_buffer_inter in vp9_rdopt.hJingning Han
This funtion initializes buffer pointers and first stage motion vector prediction. It will be needed by both regular rate-distortion optimization loop and the non-RD mode decision. Hence move its declaration in vp9_rdopt.h Change-Id: I64e8b6316c9d05f20756a62721533a2e4d158235
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-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-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-11Change in rddiv parameter to make it a power of 2Deb Mukherjee
Converts the constant rddiv parameter to 128 (from 100) and implements RDCOST with bit-shift rather than multiplication. Other parameters are also adjusted to roughly keep the same balance between Rate and Distortion. There is a slight speed-up of about 0.5-1% (at speed 0) as testted on football_cif. There is a slight change in performance due to small change in the parameters. derfraw300: +0.033% stdhdraw250; +0.102% Change-Id: I70ac69f58fa71c83108f68fe41796cd19d1fc760
2013-10-03Refactor inter mode rate-distortion searchJingning Han
This commit separates the rate-distortion optimization loop of superblocks from that of sub8x8 blocks. This allows better design rate-distortion optimization search loop for each setting. It also removes the use of SPLITMV and I4X4_PRED therein. No performance change in speed 0 settings. For bus@CIF at 2000kbps, the speed 1 runtime goes from 48009ms to 43894ms (about 10% faster). The overall compression performance on derf changed by -0.021%. Speed 2 runtime goes from 27114ms to 28700ms (6% slower), while the overall coding efficiency goes up by 1.629% for derf, 1.236% for yt. Change-Id: Ie6bdfa0a370148dd60bd800961077f7e97e67dd4
2013-10-01cpplint issue in vp9_rdopt.hJim Bankoski
Change-Id: I84209d382ca5dfc537ee533cd792d8caa0e25cee
2013-09-24Adding vp9_get_entropy_contexts function.Dmitry Kovalev
Change-Id: Ife0dd29fb4ad65c7e12ac5f1db8cea4ed81de488
2013-08-27Renaming BLOCK_SIZE_TYPE to BLOCK_SIZE in the encoder.Dmitry Kovalev
Change-Id: I62bb07c377f947cb72fac68add7a6b199e42c6b9
2013-08-15Remove unused RDCOST_8X8 macroJingning Han
Change-Id: I17c7d7eaa60fe69c543403c340f7c1078bfd339f
2013-07-17Best_rd breakout in rd partition search.Ronald S. Bultje
About 15% faster for bus (speed 0) first 50 frames @ 1500kbps, which goes from 1min36 to 1min24. Results become slightly better (+0.2% on derf/yt, +0.4% on hd), probably because of a bugfix for skipmode in super_block_yrd(). Overall speed change (on derfraw300) is roughly -13%. This can probably be improved further by caching best_yrd between partition searches. Also, we might be able to get more speedups by always doing PARTITION_NONE before PARTITIONS_SPLIT, not just at the sb8x8 level. Change-Id: I83736949ebd5b4a3b400ee688d7661913fefc98b
2013-07-15Skip duplicate block encoding in the rd loopJingning Han
This speed feature allows the encoder to largely remove the spatial dependency between blocks inside a 64x64 superblock, thereby removing the need to repeatedly encode superblocks per partition type in the rate-distortion optimization loop. A major challenge lies in the intra modes tested in the rate-distortion optimization loop. The subsequent blocks do not have access to the reconstructed boundary pixels without the intermediate coding steps. This was resolved by using the original pixels for intra prediction in the rd loop, followed by an appropriately designed distortion modeling on the quantization parameters. Experiments also suggested that the performance impact is more discernible at lower bit-rate/psnr settings. Hence a quantizer dependent threshold is applied to deactivate skip of block coding. For bus_cif at 2000 kbps, speed 0: runtime 269854ms -> 237774ms (12% speed-up) at 0.05dB performance loss. speed 1: runtime 65312ms -> 61536ms, (7% speed-up) at 0.04dB performance loss. This operation is currently turned on in settings of speed 1. Change-Id: Ib689741dfff8dd38365d8c1b92860a3e176f56ec
2013-06-21Implement SSE2 block_error.Ronald S. Bultje
Change vp9_block_error() to return a 64bit error variable, change all callers to expect a 64bit return value (this will prevent overflows, which we basically don't check for at all right now). Remove duplicate block_error() function, which fixed that through truncation. Remove old (incompatible) mmx/sse2 block_error SIMD versions and replace with a new one that returns a 64bit value. Encoding time of first 50 frames of bus @ 1500kbps goes from 3min29 to 3min23, i.e. a 3% overall speedup. Change-Id: Ib71ac5508b5ee8a80f1753cd85d72df1629abe68