summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
AgeCommit message (Collapse)Author
2013-08-09Renaming BLOCK_SIZE_TYPES constant to BLOCK_SIZES.Dmitry Kovalev
There will be another change set to rename BLOCK_SIZE_TYPE enum to BLOCK_SIZE. Change-Id: I8d1dfc873d6186fa5e554262f5169e929978085e
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-08-09Bug fix: call set_offsets before rd_auto_partition_rangeScott LaVarnway
The set_offsets call is necessary inorder to set the mode_info_context ptr correctly. Change-Id: I644910cc5bacc50ee9cd78458843274ad8ee636d
2013-08-08Moved fast motion search level decision to functionAdrian Grange
Moving this block of code into a function makes the code easier to read and change. Change-Id: If4ede570cce1eab1982b188c4d3e4fd3d4db236e
2013-08-08Simplify & fix potential bug in rd_pick_partitionAdrian Grange
Different partitionings were not being evaluated against best_rd and there were unnecessary calls to RDCOST. This could have resulted in a non-optimal partioning being selected. I simplified the variables used to track the rate, distortion and RD values throughout the function. Change-Id: Ifa7085ee80d824e86791432a5bc6d8fea5a3e313
2013-08-07Use low precision 32x32fdct for encodemb in speed1Jingning Han
The low precision 32x32 fdct has all the intermediate steps within 16-bit depth, hence allowing faster SSE2 implementation, at the expense of larger round-trip error. It was used in the rate-distortion optimization search loop only. Using the low precision version, in replace of the high precision one, affects the compression performance by about 0.7% (derf, stdhd) at speed 0. For speed 1, it makes derf set down by only 0.017%. Change-Id: I4e7d18fac5bea5317b91c8e7dabae143bc6b5c8b
2013-08-06Inlining vp9_get_pred_probs_switchable_interp function.Dmitry Kovalev
There was no benefit having this function. For example, inside read_switchable_filter_type switchable filter context was calculated twice. Change-Id: I79cd5bf95cbc0f6d8bf91a2e32289e01b18dcff1
2013-08-06Merge "Finally removing all old block size constants."Dmitry Kovalev
2013-08-06Merge "Changing the order switchable filter enum constants."Dmitry Kovalev
2013-08-06Merge "Add variance based mode/skipping"Deb Mukherjee
2013-08-05Finally removing all old block size constants.Dmitry Kovalev
Change-Id: I3aae21e88b876d53ecc955260479980ffe04ad8d
2013-08-05Add variance based mode/skippingDeb Mukherjee
Adds a speed feature to skip all intra modes other than DC_PRED if the source variance is small. This feature is made part of speed 1 and up. Results on derf300: psnr -0.07%, speedup about 1-2% Also uses the source variance to fine-tune the early termination criteria when FLAG_EARLY_TERMINATE is on. This feature is made part of speed 2 and up. Results on derf300: psnr -0.52%, speedup about 5-7% Change-Id: I59e38aa836557cfa5405ae706fc64815cbfe4232
2013-08-05Merge "cleanups after bw bh code"Jim Bankoski
2013-08-05Changing the order switchable filter enum constants.Dmitry Kovalev
This changeset allows to remove vp9_switchable_interp and vp9_switchable_interp_map arrays and make code much clear. Actually we still have to use these mapping but only inside read_interp_filter_type and write_interp_filter_type functions. Change-Id: I4026c6f8c4acefba6c81421b7bacbaa52cc45f50
2013-08-05cleanups after bw bh codeJim Bankoski
Cons bw/bh parms that should have been const. Additional formatting. Change-Id: Icd36a5c9dc17dadd7284315ac0d6fef1a565ca16
2013-08-05Replacing long block size enum values with shorter ones (2).Dmitry Kovalev
Change-Id: I428c4d42212b757112e3acfe5b81314cfbb5fd6b
2013-08-02Replacing "txfm" with "tx" in identifiers.Dmitry Kovalev
Consistent names with TX_SIZE, TX_MODE, and TX_MODE. Change-Id: I79592218bf5a40ace89197a34a06ee7de581ed8d
2013-08-02Adding is_inter_block function.Dmitry Kovalev
Using it instead of long unclear verbose check "mbmi->ref_frame[0] != INTRA_FRAME". Change-Id: I9c7b4b3797942fa962bf3ba7460fff3084beabe9
2013-08-02Merge "Add more checking to using_small_partition_info"Yunqing Wang
2013-08-02Merge "Fixed typos and added a few explanatory comments"Adrian Grange
2013-08-02Replacing long block size enum values with shorter ones.Dmitry Kovalev
Change-Id: I0e9329490828684a4fd46f540d89114cc68e8407
2013-08-02Merge "Comment out 2 unused speed features"Yunqing Wang
2013-08-01Cleanup: replacing xd->seg with seg, and xd->lf with lf.Dmitry Kovalev
Change-Id: I73b59d7699a8e7e7acd3bf8041cb6c98ce9ba4bf
2013-08-01Merge "Cleanup: removing unused function arguments."Dmitry Kovalev
2013-08-01Cleanup: removing unused function arguments.Dmitry Kovalev
Change-Id: I27471768980fc631916069f24bc7c482a5c9ca17
2013-08-01Adds a source variance computation functionDeb Mukherjee
Adds a function to compute source variance for various sb_types to be used for pruning mode and partition searches. [The existing activity measure function is currently specialized for only 16x16 MBs and needs to be updated]. Change-Id: I22a41e6f1430184201487326fdbebb9b47e6fc24
2013-08-01Add more checking to using_small_partition_infoYunqing Wang
If the partition is out of partition size range, we don't need to process small partition information. Change-Id: Ice9bfbbdebe1f2ef79271a3aee17de0ed4608376
2013-08-01Comment out 2 unused speed featuresYunqing Wang
use_min_partition_size and use_max_partition_size are not used currently, and could be added back if needed later. Change-Id: Ib22a9c06b064567a7c1d6d5445567ed77e0d3acc
2013-08-01Fixed typos and added a few explanatory commentsAdrian Grange
Change-Id: Ib4e4b41094b54874ee34343dd77c0c131ceed9d2
2013-07-31Remove unnecessary arguments in rd_pick_ref_frameJingning Han
This commit removes redundant arguments passing in the function of rd_pick_reference_frame. This resolves the clang warnings about potential use of uninitialized values. Change-Id: Ic68f949a9f8fcd0a583786b0c75321104ea44739
2013-07-31Merge "Make the use of ref_frame index consistent"Jingning Han
2013-07-30Make the use of ref_frame index consistentJingning Han
Refactor the frame buffer referencing in choose_partition and make it consistent with other places. This means to prevent potential issues when we extend reference frame buffer. Change-Id: I5ff33ed5f671e1f4cc7049622212769a9b4578d9
2013-07-30Merge "Cleanup typos, remove unnecessary lines, replace switch"Adrian Grange
2013-07-30Cleanup typos, remove unnecessary lines, replace switchAdrian Grange
Removed unnecessary code lines, replaced switch with an if, fixed spelling errors and formatting. Change-Id: Ie48aa4604aa0ed48362ca359d792fb21b2ec1dc6
2013-07-29Renaming NB_TXFM_MODES constant to TX_MODES.Dmitry Kovalev
Change-Id: I10bf06e3a3d5271221ae6a42a36074d01d493039
2013-07-29Renaming TX_SIZE_MAX_SB to TX_SIZES.Dmitry Kovalev
Change-Id: I6aa4191935aa93461a07c41b59fdae1eb5f5f107
2013-07-26Merge "General cleanups."Dmitry Kovalev
2013-07-26Auto min and max partition size experiment.Paul Wilkins
Speed feature experiment to set an upper and lower partition size limit based on what has been seen in spatial neighbors. This seems to gives quite reasonable speed gains in local (10-15%) and when used with speed 0 the losses are small (0.25% derf, 0.35% stdhd). However, for now I am only enabling it on speed 1 as there may be clashes with the existing temporal partition selection in speed 2. Using a tighter min / max around the range derived from the neighbors increases speed further but at the cost of a bigger quality loss. However, I think this spatial method could be combined with data from either the last frame or a variance method (or both) to refine the range of minimum and maximum partition size. I.e. consider the min and max from spatial and temporal neighbors and the variance recommendation. Change-Id: I1b96bf8b84368d6aad0c7aa600fe141b4f07435f
2013-07-25Merge "Add encoding option --static-thresh"Yunqing Wang
2013-07-25Add encoding option --static-threshYunqing Wang
This option exists in VP8, and it was rewritten in VP9 to support skipping on different partition levels. After prediction is done, we can check if the residuals in the partition block will be all quantized to 0. If this is true, the skip flag is set, and only prediction data are needed in reconstruction. Based on DCT's energy conservation property, the skipping check can be estimated in spatial domain. The prediction error is calculated and compared to a threshold. The threshold is determined by the dequant values, and also adjusted by partition sizes. To be precise, the DC and AC parts for Y, U, and V planes are checked to decide skipping or not. Test showed that 1. derf set: when static-thresh = 1, psnr loss is 0.666%; when static-thresh = 500, psnr loss is 1.162%; 2. stdhd set: when static-thresh = 1, psnr loss is 1.249%; when static-thresh = 500, psnr loss is 1.668%; For different clips, encoding speedup range is between several percentage and 20+% when static-thresh <= 500. For example, clip bitrate static-thresh psnr time akiyo(cif) 500 0 48.923 5.635s(50f) akiyo 500 500 48.863 4.402s(50f) parkjoy(1080p) 4000 0 30.380 77.54s(30f) parkjoy 4000 500 30.384 69.59s(30f) sunflower(1080p) 4000 0 44.461 85.2s(30f) sunflower 4000 500 44.418 78.1s(30f) Higher static-thresh values give larger speedup with larger quality loss. Change-Id: I857031ceb466ff314ab580ac5ec5d18542203c53
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-25Merge "Simplify handling of sub-partition motion vectors"Adrian Grange
2013-07-25Simplify handling of sub-partition motion vectorsAdrian Grange
Simplified the code that extracts and uses the motion vectors for the 4 sub-partitions in rd_pick_partition. Change-Id: Iaf698ef7ee3aef9edd59015e1ae065dd359b17d9
2013-07-25fix a bug where flags are not resetYaowu Xu
The feature that uses small partition results as a measure to skip mode evaluation at larger partition requires the flags to be reset. The reset was missing in the code path that calls rd_use_partition(). Change-Id: Ia0a3a0aee1a862b6e2333d596808db7c48033d50
2013-07-24Merge "Correct spelling mistakes"Adrian Grange
2013-07-24Correct spelling mistakesAdrian Grange
Change-Id: Id4138293efeac4503b2e01ce7a6c150a5abeef77
2013-07-23Moving counts from FRAME_CONTEXT to new struct FRAME_COUNTS.Dmitry Kovalev
Counts are separate from frame context. We have several frame contexts but need only one copy of all counts. Change-Id: I5279b0321cb450bbea7049adaa9275306a7cef7d
2013-07-23Merge "Rolled-up several for loops into one"Adrian Grange
2013-07-23Rolled-up several for loops into oneAdrian Grange
Several consecutive for loops executed over the same index range, so I rolled them into one. Change-Id: I5cfcc8c38c738478965768409cca9d09adf224e1
2013-07-23Merge "Adding update_tx_counts function."Dmitry Kovalev