summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.h
AgeCommit message (Collapse)Author
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
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-26Grow MODE_INFO array to use an 8x8 basis.Ronald S. Bultje
Change-Id: I087e08e7909a406b71715b8525c104208daa6889
2013-04-11Merge pick_sb_modes and pick_sb64_modes.Ronald S. Bultje
Change-Id: Iad69e7a3b7e470acf6094f6a52e7da69066fd552
2013-04-10Make RD superblock mode search size-agnostic.Ronald S. Bultje
Merge various super_block_yrd and super_block_uvrd versions into one common function that works for all sizes. Make transform size selection size-agnostic also. This fixes a slight bug in the intra UV superblock code where it used the wrong transform size for txsz > 8x8, and stores the txsz selection for superblocks properly (instead of forgetting it). Lastly, it removes the trellis search that was done for 16x16 intra predictors, since trellis is relatively expensive and should thus only be done after RD mode selection. Gives basically identical results on derf (+0.009%). Change-Id: If4485c6f0a0fe4038b3172f7a238477c35a6f8d3
2013-03-01Code cleanup.Dmitry Kovalev
Removing redundant 'extern' keyword, lowercase variable names. Change-Id: I608e8d8579aba8981f5fac3493f77b4481b13808
2013-02-26Spatial resamping of ZEROMV predictorsJohn Koleszar
This patch allows coding frames using references of different resolution, in ZEROMV mode. For compound prediction, either reference may be scaled. To test, I use the resize_test and enable WRITE_RECON_BUFFER in vp9_onyxd_if.c. It's also useful to apply this patch to test/i420_video_source.h: --- a/test/i420_video_source.h +++ b/test/i420_video_source.h @@ -93,6 +93,7 @@ class I420VideoSource : public VideoSource { virtual void FillFrame() { // Read a frame from input_file. + if (frame_ != 3) if (fread(img_->img_data, raw_sz_, 1, input_file_) == 0) { limit_ = frame_; } This forces the frame that the resolution changes on to be coded with no motion, only scaling, and improves the quality of the result. Change-Id: I1ee75d19a437ff801192f767fd02a36bcbd1d496
2013-02-08Pass macroblock index to pick inter functionsJohn Koleszar
Pass the current mb row and column around rather than the recon_yoffset and recon_uvoffset, since those offsets will change from predictor to predictor, based on the reference frame selection. Change-Id: If3f9df059e00f5048ca729d3d083ff428e1859c1
2013-01-0564x64 blocksize support.Ronald S. Bultje
3.2% gains on std/hd, 1.0% gains on hd. Change-Id: I481d5df23d8a4fc650a5bcba956554490b2bd200
2012-12-18Use standard integer types for pixel values and coefficients.Ronald S. Bultje
For coefficients, use int16_t (instead of short); for pixel values in 16-bit intermediates, use uint16_t (instead of unsigned short); for all others, use uint8_t (instead of unsigned char). Change-Id: I3619cd9abf106c3742eccc2e2f5e89a62774f7da
2012-11-30google style guide include guardsJim Bankoski
Change-Id: I2c252f3ddcc99e96c1f5d3dab8bcb25a2a3637ea
2012-11-27Add vp9_ prefix to all vp9 filesJohn Koleszar
Support for gyp which doesn't support multiple objects in the same static library having the same basename. Change-Id: Ib947eefbaf68f8b177a796d23f875ccdfa6bc9dc