summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_pickmode.c
AgeCommit message (Collapse)Author
2014-03-24Enable recursive partition selection for non-RD coding modeJingning Han
This commit enables a recursive partition type search for non-RD mode decisions. It allows the encoder to choose variable block sizes in a 64x64 block based on rate-distortion modeling. It improves speed -6 coding efficiency for rtc set by 2.4%. Most of the gains come from 32-40dB range, where many sequences gain about 5% to 20%. Local tests suggest there is no speed change. Change-Id: I06300016e500a21652812b7b3b081db39a783d66
2014-03-21Merge "Add prediction mode skipping in non-rd situation"Yunqing Wang
2014-03-21changed to use correct pred_mvYaowu Xu
The third pred_mv is stored in x->pred_mv[ref_frame]. This commit make sure the correct mv is read. Change-Id: Ibed24daf36703a63f0394c87b2381ee1d2eb7910
2014-03-21Add prediction mode skipping in non-rd situationYunqing Wang
In non-rd pick_mode code, added mode skipping according to thresholds. Used rd thresholds now, but we can modified them later for real-time case. RTC set borg test showed a 0.095% PSNR gain. For different rtc clips, the real-time(speed 7) encoder speedup is 2% - 10%. Change-Id: Ic72535c96b891092c662453be32d3168f7e34dcc
2014-03-20Remove unused mode_sadYunqing Wang
Removed mode_sad. Change-Id: I230b42ac9b617ae2c375e297057aa0756bd355fe
2014-03-19Enable variable block size test in non-RD mode decisionJingning Han
This is an initial attempt to allow variable block size partition in non-RD coding flow. It tests 8x8, 16x16 and 32x32 block size per 64x64 block, all using non-RD mode decision and the associated rate distortion costs from modeling, then selects the best block size to encode the entire 64x64 block. Such operations are triggered every other 3 frames. The blocks of intermediate frames will reuse the collocated block's partition type. It improves the compression performance by 13.2%. Note that the gains are not evenly distributed. For many hard clips, the compression performance is improved by 20% to 28%. Local speed test shows that it will also increase runtime by 50%, as compared to speed -7. It is now enabled in speed -6 setting. Change-Id: Ib4fb8659d21621c9075b3c369ddaa9ecb0a4b204
2014-03-14Calculate rate_mv after sub-pixel search in non-rd modeYunqing Wang
Modified the non-rd rate_mv calculation and moved it after sub-pixel motion search is done. Change-Id: I6a5cbd3d67ff0a86b3693e25ecf1fd77b16d708c
2014-03-13Return rate and distortion cost values from non-RD mode decisionJingning Han
This commit allows the non-RD mode decision process to return the rate and distortion costs associated with the selected mode. Change-Id: Ibe0f67d323f65839fd9cb0a726c1219bf7b55da9
2014-03-13Merge "Tune rate-distortion modeling for non-RD mode decision"Jingning Han
2014-03-13Merge "Explicitly assign interp_kernel value in non-RD coding mode"Jingning Han
2014-03-12Preliminary code for variance based paritioningDeb Mukherjee
Brings back most of Jim's previous patch for choosing partitioning based on variance while making it compatible with the current state of the code. Also adds a nonrd_use_partition() function to recursively encode for any arbitrary sb_type decisions within a 64x64 block; and includes some refactoring. Currently, when the VAR_BASED_PARTITIONING mode is turned on for speed 7, there is a 10+% speed-up observed. Experiments/improvements with this new partitioning method will be conducted subsequently. Change-Id: Ie6f43bfbde30583e941f450bf07c3b48828c9571
2014-03-12Tune rate-distortion modeling for non-RD mode decisionJingning Han
This commit adjusts the rate-distortion modeling for non-RD mode decision. It puts more weights on energy from AC coefficients when estimating the cost. The coding performance for rtc testset is improved by 0.72%. Change-Id: Ifa6ff11311a513ec2b10586589e82a9a21f6c61c
2014-03-12Explicitly assign interp_kernel value in non-RD coding modeJingning Han
Assign interp_kernel value in MACROBLOCKD. This will be used to select prediction filter coefficient sets and generate motion compensated prediction. Change-Id: I28c8dfb2dae6566f6939bb328aca5875c94bee65
2014-03-10Add a conservative RD based active map in vp9.Alex Converse
Change-Id: I47b3c38aadfd8f3ea08515a18a5948aa1375c650
2014-03-10Merge "Support for a fast diamond search"Deb Mukherjee
2014-03-10Merge "vp9_reconinter.h static functions in header converted to global"Jim Bankoski
2014-03-07Support for a fast diamond searchDeb Mukherjee
Adds a fast diamond search which is about 5% faster than FAST_HEX with only a 0.1% drop in psnr when turned on for both speeds 5 and 7. This search is turned on for speed 7. Change-Id: I497630aa88a5148926086bb3038e7975e5f4eb98
2014-03-07Skip mode check when mv has been testedJingning Han
This commit allows the non-RD mode decision to skip mode RD modelling check, if the motion vector associated with the current mode is same as that of NEARESTMV mode. This makes speed -7 about 2% faster. Previous change that converts cost metric from SAD to model based RD value makes the codec 6% slower at speed -7. Change-Id: I30cfec5452f606a671b8432a2f7f0c94fbb49fc8
2014-03-07Clearn up model_rd in non-RD coding modeJingning Han
The rate-distortion model in non-RD coding mode is only applied to luma component. This commit removed a few redundant addition steps. Change-Id: Id8edc0a47c2dbef8deba43debe2c95db39454de3
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-06Fixes static analysis issuesDeb Mukherjee
Removes some unused variables and assignments Change-Id: I228f43d658ce50237d65ce8dc8ab2ccf0a0b21ca
2014-03-05Merge "Replacing int_mv with MV in full_pixel_motion_search()."Dmitry Kovalev
2014-03-03Refactoring motion search libsDeb Mukherjee
The core motion estimation fucntions all return sad now consistently. The only exception is vp9_full_pixel_diamond(), however the core diamond and refining search routines called from vp9_full_pixel_diamond() also return SAD. If variance of pred error + mv cost is desired it must be calculated explicitly outside these functions. For very fast encoding, hopefully this will eliminate some redundant computations. Also suggests reimplementing FAST_HEX with the vp9_pattern_search framework. It is not exactly the same as the existing FAST_HEX, but performance is slightly better and speed is very similar. Enables removing a lot of duplicate code. Change-Id: I152736393438c25bdf7e96b37cbb8ce330f4f94a
2014-03-03vp9_reconinter.h static functions in header converted to globalJim Bankoski
Change-Id: I916944950deb22f4c2301d83a803b732bf3ecd77
2014-03-03Replacing int_mv with MV in full_pixel_motion_search().Dmitry Kovalev
Change-Id: I16dd4d4aaae8ce6a482da3c9d142f41fe9155e82
2014-03-03Clear implied conversion to int64_t warning.Paul Wilkins
Clear warning caused by implied conversion from int32 to int64. Change-Id: I473b37a54984cbfb22702eb3f712465881ff86e8
2014-02-28Merge "Replacing int_mv with MV."Dmitry Kovalev
2014-02-28Merge "Adds speed 8 to vp9 as reference"Deb Mukherjee
2014-02-28Merge "Sorting and eliminating includes in vp9_pickmode.c."Dmitry Kovalev
2014-02-28Adds speed 8 to vp9 as referenceDeb Mukherjee
Adds a speed 8 to VP9 where only the nearestmv (0 mv) is searched. This seems to be about the same speed as vp8 speed 5. Adds a new speed feature to disable inter modes based on a mask for each blocksize. Adds code for having lower complexity motion search methods in nonrd pick mode function, even though speed 7 still uses DIAMOND search for now. Also uses HEX search for speed 6 rather than FAST_HEX which improves psnr by 0.56% without any noticeable speed drop (tested on gipsmotion). Change-Id: Ic13176572dbd3aed5884a26786940a4b1bbd8a75
2014-02-28Replacing int_mv with MV.Dmitry Kovalev
Change-Id: Ib68d4a2de838254a66272324b909292048cbe60d
2014-02-28Sorting and eliminating includes in vp9_pickmode.c.Dmitry Kovalev
Change-Id: Icc057b819d80c608a6003fd7ef58aefed7a15824
2014-02-28Skip some mode SAD calculation in non-RD modeJingning Han
This commit checks if the motion vector associated with the current mode has been computed in previous mode tests. If possible, skip the redundant reference block generation and SAD calculation in the non-RD mode decision process. For test sequence pedestrian_area 1080p, the runtime goes from 24261 ms to 23770 ms. This does not change compression performance. The speed-up is mostly around places with consistent motion. Change-Id: I97be63c6a2d07c57be26b3c600fbda3803adddda
2014-02-28Merge "Enable using fast HEX search in non-rd pick mode"Yunqing Wang
2014-02-27Enable using fast HEX search in non-rd pick modeYunqing Wang
Added fast HEX search while doing non-rd partition picking to speed up the encoder. Borg test(speed 7) on rtc set showed 1.8% overall PSNR loss. Encoder speedup was 5% - 15% for different rtc clips. Change-Id: I9c83026eabc70b69fcc747c90369ec60bfa3ca24
2014-02-27Assign motion vector invalid value in intra modeJingning Han
In non-RD mode decision, assign motion vector INVALID_MV when intra prediction mode is selected. Change-Id: I8f6ec39b71e755758f0f698074a2c17d934622ea
2014-02-26Run sub-pixel motion search for NEWMV mode testJingning Han
As Yunqing suggested, this commit makes non-RD mode decision always run sub-pixel motion search in NEWMV mode. The compression performance gains becomes fairly significant after we enabled sub-pixel accuracy motion compensated prediction to calculate SAD cost. For test sequences pedestrian_area at 1080p and vidyo1 at 720p, the runtime goes slower by 5%. For rtc test set, the compression performance is improved by 21.20%. Change-Id: I38cbfdd5c53d79423e1fafb3154f8ddeed63bbf0
2014-02-25Use sub-pixel accuracy prediction non-RD modeJingning Han
This commit builds the actual prediction block in sub-pixel accuracy and uses which to calculate SAD for non-RD mode decision. In the trail run on pedestrian_area at 1080p, rtc speed -7 runtime goes from 23495 ms -> 25107 ms (7% slower). The compression performance is improved by 20.57% for rtc test set. Change-Id: I438589cd103fe99f1b50c2d1939ac6ca43fa0157
2014-02-25Use dedicated variables to store the best modeJingning Han
Use a set of dedicated variables to buffer the current best mode in non-RD mode decision. This allows to use mode_info for more complicated test in the non-RD process. Change-Id: I6024c9feb0662afd3eb29f7017f7b5a5446f303f
2014-02-21Changed a constant array to static const typeYaowu Xu
Change-Id: I5b3918441f63ceb7889dcf546e9a2d781be4a3cb
2014-02-21Refactor selected partition size coding for rtcJingning Han
This commit makes a refactoring of the rtc_use_partition. It allows the encoder to take a preferred block size for non-RD mode decision. The boundary blocks are handled such that smaller block sizes that fit in the boundary size will be used instread. In rtc mode, the coding performance of speed -6 for pedestrian_1080p goes from 158980 b/f, 38.934 dB, 22721 ms to 159008 b/f, 40.064 dB, 23721 ms. For rtc set, the speed -6 compression performance is improved by 26%. Still about 2dB behind speed -5 at this point. Change-Id: If0944f0880eaf1ad340bc325d97cea8d0f9dd53f
2014-02-20Enable reduced set of intra modes in rtc codingJingning Han
This commit enables the use of DC, vertical, and horizontal intra prediction mode in rtc non-RD mode decision. When the best cost value of inter modes is above a given threshold, the encoder runs the above three intra modes and selects the one that has minimum prediction residual in terms of SAD. This together with recent changes on non-RD mode decision and coding control improves compression performance of speed -6 by derf 91% yt 61% hd 46% stdhd 52% In terms of encoding speed, it is about 3 times faster than speed -5. Change-Id: I6b483bfd0307e6482bb22a6676ae4e25a52b1310
2014-02-19Rework non-RD mode decision coding flowJingning Han
In the first coding run of a 64x64 block, check the coding mode for each 8x8 block. Will need a second annealing stage to decide the partition size to be encoded. Change-Id: Ida9417805ff3358979b0c0429d4099c023c88866
2014-02-18Merge "Enable sub-pixel motion search for rtc mode"Jingning Han
2014-02-18Enable sub-pixel motion search for rtc modeJingning Han
Run sub-pixel motion search when NEWMV gives lower rate-distortion cost. This improves coding performance of derf set by 8%, std-hd by 2.2%. Change-Id: Ife50f7fda8463927784fe59a41cc439c833e941a
2014-02-14vp9_pickmode.c resolve vs issueJim Bankoski
Change-Id: Ibe4276fa9ffeb2ef30871d6db8ac75c4648f1e58
2014-02-13Using MV instead of int_mv inside vp9_full_pixel_diamond().Dmitry Kovalev
Change-Id: If33a5a12c4025d9b5ec863dfccea7ee70f800665
2014-02-13Merge "Renaming skip_coeff to skip for consistency."Dmitry Kovalev
2014-02-13Merge "vp9_pickmode.c static analysis issues resolved"Jim Bankoski