summaryrefslogtreecommitdiff
path: root/vp8/encoder/rdopt.c
AgeCommit message (Collapse)Author
2011-05-27Remove unused codeYunqing Wang
Hex search is not called in rdopt.c Change-Id: I67347f03e13684147a7c77fb9e9147e440bb5e8e
2011-05-25 Use var8x8 instead of get8x8var in VP8_UVSSEAttila Nagy
'sum' returned by get8x8var is not used and var8x8 has optimizations for more platforms. Change-Id: I4a907fb1a05f285669fb0b95dc71d42182c980f6
2011-05-24Merge "MODE_INFO size reduction"Scott LaVarnway
2011-05-24MODE_INFO size reductionScott LaVarnway
Declared the bmi in MODE_INFO as a union instead of B_MODE_INFO. This reduced the memory footprint by 518,400 bytes for 1080 resolutions. The decoder performance improved by ~4% for the clip used and the encoder showed very small improvements. (0.5%) This reduction was first mentioned to me by John K. and in a later discussion by Yaowu. This is WIP. Change-Id: I8e175fdbc46d28c35277302a04bee4540efc8d29
2011-05-23Merge "use get8x8var directly for non-subpixel motion case in VP8_UVSSE"Yaowu Xu
2011-05-23use get8x8var directly for non-subpixel motion case in VP8_UVSSEYaowu Xu
VP8_UVSSE mistakenly used subpixvar8x8 to calculate SSE for non-subpixl motion cases. Change-Id: I4a5398bb9ef39c211039f6af4540546d4972e6a9
2011-05-20Merge "cleanup: collect twopass variables"John Koleszar
2011-05-20Merge "Remove unused members of VP8_COMP"John Koleszar
2011-05-19cleanup: collect twopass variablesJohn Koleszar
This patch collects the twopass specific memebers of VP8_COMP into a dedicated struct. This is a first step towards isolating the two pass rate control and aids readability by decorating these variables with the 'twopass.' namespace. This makes it clear to the reader in what contexts the variable will be valid, and is a hint that a section of code might be a good candidate to move to firstpass.c in later refactoring. There likely will be other rate control modes that need their own specific data as well. This notation is probably overly verbose in firstpass.c, so an alternative would be to access this struct through a pointer like 'rc->' instead of 'cpi->firstpass.' in that file. Feel free to make a review comment to that effect if you prefer. Change-Id: I0ab8254647cb4b493a77c16b5d236d0d4a94ca4d
2011-05-19Remove unused members of VP8_COMPJohn Koleszar
Various members that were either completely unreferenced or written and not read. Change-Id: Ie41ebac0ff0364a76f287586e4fe09a68907806e
2011-05-19Using partition_info instead of blockd info for splitmvScott LaVarnway
The partition_info struct contains info just for SPLITMV, so it should be used instead of BLOCKD. Eventually, I want to reduce the size of B_MODE_INFO struct found in BLOCKD, so this is the first step toward that goal. Also, since SPLITMV is not supported in vp8_pick_inter_mode(), the unnecessary mem copies and checks were removed. For rt encodes, this gave a slight performance improvement. Change-Id: I5585c98fa9d5acbde1c7e0f452a01d9ecc080574
2011-05-18Merge "Modify MVcount in pick_inter_mode to eliminate calling of ↵Yunqing Wang
vp8_find_near_mvs"
2011-05-18Fix a bug in vp8_clamp_mv functionYunqing Wang
Scott fixed the bug in MV clamping function in encoder, which could cause artifacts. Change-Id: Id05f2794c43c31cdd45e66179c8811f3ee452cb9
2011-05-17Modify MVcount in pick_inter_mode to eliminate calling of vp8_find_near_mvsYunqing Wang
Moved MVcount modification in pick_inter_mode, and eliminated calling of vp8_find_near_mvs. Change-Id: Icd47448a1dfc8fdf526f86757d0e5a7f218cb5e8
2011-05-13Merge "adjusting rd constant slightly by ~10%"Yaowu Xu
2011-05-12Using int_mv instead of MVScott LaVarnway
The compiler produces better assembly when using int_mv for assignments. The compiler shifts and ors the two 16bit values when assigning MV. Change-Id: I52ce4bc2bfbfaf3f1151204b2f21e1e0654f960f
2011-05-11adjusting rd constant slightly by ~10%Yaowu Xu
This is to reflect the RD improvement in the encoder. The change has a small positive impact on quality (0.25% by VPXSSIM and 0.05% by PSNR) Change-Id: Ic66ffc19b10870645088c0624c85556f009fd210
2011-05-10Merge "Use diamond search to replace full search in full-pixel refining search"Yunqing Wang
2011-05-09Use diamond search to replace full search in full-pixel refining searchYunqing Wang
In NEWMV mode, currently, full search is used as the refining search after n-step search. By replacing it with an iterative diamond search of radius 1 largely reduced the computation complexity, but still maintained the same encoding quality since the refining search is done for every macroblock instead of only a small precentage of macroblocks while using full search. Tests on the test set showed a 3.4% encoding speed increase with none psnr & ssim loss. Change-Id: Ife907d7eb9544d15c34f17dc6e4cfd97cb743d41
2011-05-09clean up unused variable warningsJohann
Change-Id: I9467d7a50eac32d8e8f3a2f26db818e47c93c94b
2011-04-29Merge "Use insertion sort instead of quick sort"Yunqing Wang
2011-04-27SSE2/SSSE3 optimizations for build_predictors_mbuv{,_s}().Ronald S. Bultje
decoding before 10.425 10.432 10.423 =10.426 after: 10.405 10.416 10.398 =10.406, 0.2% faster encoding before 14.252 14.331 14.250 14.223 14.241 14.220 14.221 =14.248 after 14.095 14.090 14.085 14.095 14.064 14.081 14.089 =14.086, 1.1% faster Change-Id: I483d3d8f0deda8ad434cea76e16028380722aee2
2011-04-27Use insertion sort instead of quick sortYunqing Wang
Insertion sort performs better for sorting small arrays. In real- time encoding (speed=-5), test on test set showed 1.7% performance gain with 0% PSNR change in average. Change-Id: Ie02eaa6fed662866a937299194c590d41b25bc3d
2011-04-25remove simpler_lpfJohann
the decision to run the regular or simple loopfilter is made outside the function and managed with pointers stop tracking the option in two places. use filter_type exclusively Change-Id: I39d7b5d1352885efc632c0a94aaf56b72cc2fe15
2011-04-21Removed dc_diff from MB_MODE_INFOScott LaVarnway
The dc_diff flag is used to skip loopfiltering. Instead of setting this flag in the decoder/encoder, we now check for this condition in the loopfilter. Change-Id: Ie2b9cdf9e0f4e8b932bbd36e0878c05bffd28931
2011-04-20Removed force_no_skipScott LaVarnway
force_no_skip is always set to zero. Change-Id: I89b61c5e0bee34627a9c07c05f3517e1db76af77
2011-04-20Removed redundant checks of the mode_info_context flagsScott LaVarnway
Code cleanup. The build inter predictor functions are redundantly checking the mode_info_context for either INTRA_FRAME or SPLITMV. Change-Id: I4d58c3a5192a4c2cec5c24ab1caf608bf13aebfb
2011-04-18Use sub-pixel search's SSE in mode selectionYunqing Wang
Passed SSE from sub-pixel search back to pick_inter_mode function, which is compared with the encode_breakout to see if we could skip evaluating the remaining modes. Change-Id: I4a86442834f0d1b880a19e21ea52d17d505f941d
2011-04-15Merge "Reduce unnecessary distortion computation"Yunqing Wang
2011-04-14Reduce unnecessary distortion computationYunqing Wang
In vp8_pick_inter_mode(), for NEWMV mode, use the error result got from motion search as distortion. This helps performance in real- time mode. Change-Id: I398c4e46cc5381f7d874e748cf78827ef0e0860c
2011-04-12Merge "Bugfix for error accumulator stats"John Koleszar
2011-04-12Bugfix for error accumulator statsJohn Koleszar
Previous to commit de4e9e3, there was an early return in the alt-ref case that was inadvertantly removed when the function was refactored to return void. This patch restores the prior behavior. Change-Id: I783ffd594a4690297e2742f99526fd7ad67698b2
2011-04-11Set cpu_used range to [-16, 16] in real-time modeYunqing Wang
Remove encoding speed limitation in real-time mode. Change-Id: Ib5e35d8bb522b2a25f3e4ad5cfe2788ebebb3617
2011-04-11Define RDCOST only onceYunqing Wang
Clean up the code. Change-Id: I7db048efa4d972b528d553a7921bc45979621129
2011-04-08Fix input MV for full searchYunqing Wang
Input MV needs to be modified to full-pixel precision. Change-Id: Ic5d78e41bf27077e325024332b9fe89f76c44f0c
2011-04-08Error accumulator stats bug.Paul Wilkins
The error accumulator stats values cpi->prediction_error and cpi->intra_error were being populated with rd values not distortion values. These are only "currently" used in a limited way for RT compress key frame detection. Change-Id: I2702ba1cab6e49ab8dc096ba75b6b34ab3573021
2011-04-06Minor modificationYunqing Wang
A small change. Change-Id: I2e7726e58370a95d0319361f4f6ad231138d1328
2011-04-01Use full-pixel MV in mvsadcost calculationYunqing Wang
MV sad cost error is only used in full-pixel motion search, which only need full-pixel resolution instead of quarter-pixel resolution. This change reduced mvsadcost table size, and removed unneccessary pamameter passing since this table is constant once it is generated. Change-Id: I9f931e55f6abc3c99011321f1dfb2f3562e6f6b0
2011-03-17Increase static linkage, remove unused functionsJohn Koleszar
A large number of functions were defined with external linkage, even though they were only used from within one file. This patch changes their linkage to static and removes the vp8_ prefix from their names, which should make it more obvious to the reader that the function is contained within the current translation unit. Functions that were not referenced were removed. These symbols were identified by: $ nm -A libvpx.a | sort -k3 | uniq -c -f2 | grep ' [A-Z] ' \ | sort | grep '^ *1 ' Change-Id: I59609f58ab65312012c047036ae1e0634f795779
2011-03-11Move build_intra_predictors_mby to RTCD frameworkJohn Koleszar
The vp8_build_intra_predictors_mby and vp8_build_intra_predictors_mby_s functions had global function pointers rather than using the RTCD framework. This can show up as a potential data race with tools such as helgrind. See https://bugzilla.mozilla.org/show_bug.cgi?id=640935 for an example. Change-Id: I29c407f828ac2bddfc039f852f138de5de888534
2011-03-07correct zbin boost for splitmv modeJohn Koleszar
Disable zbin boost in SPLITMV mode as intended. Was incorrectly looking at vp8_ref_frame_order instead of vp8_mode_order when comparing against SPLITMV. This condition should have always been false, as SPLITMV is not in the range of valid reference frames. Change-Id: I0408cc7595eff68f00efef6d008e79f5b60d14bf
2011-02-24Removed vp8_block2typeScott LaVarnway
and used defines instead. Change-Id: Idb56e0295d004793f406dfd2d8d8c546aad62e03
2011-02-24Revisited rd_pick_intra4x4blockScott LaVarnway
Removed unnecessary copies. No noticeable speed gains. Change-Id: I996c50c23fedd06d54ee7a3e762cbf559cc4a9d1
2011-02-17Merge "Fix relative include paths"John Koleszar
2011-02-14Improved vp8_rd_pick_intra_mbuv_modeScott LaVarnway
Eliminated unnecessary calculations. Very small change to performance. Change-Id: Ib7213d43c64e36955177c4d47950ff472266f822
2011-02-14Improved rd_pick_intra4x4blockScott LaVarnway
Eliminated unnecessary calculations. Improved performance by 10% on keyframes and 1.6% overall for the test clip used. Change-Id: I87671b26af5e2cc439e81d0fee3b15c7cd2a3309
2011-02-10Merge "Improve motion search in real-time mode"Yunqing Wang
2011-02-10Fix relative include pathsJohn Koleszar
Allow compiling without adding vp8/{common,encoder,decoder} to the include paths. Change-Id: Ifeb5dac351cdfadcd659736f5158b315a0030b6c
2011-02-10Improve motion search in real-time modeYunqing Wang
Applied better MV prediction in real-time mode, which improves the encoding quality. Used quarter-pixel search instead of iterative sub-pixel search for speed >=5 to improve encoding performance. Tests on the test set showed: 1. For speed=-5, quality improvement: 1.7% on AvgPSNR and 2.1% on SSIM, performance improvement: 3.6% (This counts in the performance lose caused by MV prediction calculation in "Improve MV prediction in vp8_pick_inter_mode() for speed>3"). 2. For speed=-8, quality improvement: 2.1% on AvgPSNR and 2.5% on SSIM. but, 6.9% performance decrease because of MV prediction calculation. This should be improved later. Change-Id: I349a96c452bd691081d8c8e3e54419e7f477bebd
2011-02-08Added early breakout for vp8_rd_pick_intra4x4mby_modesScott LaVarnway
Improved performance of good quality, speed 0 (3% average) with no average quality loss. Change-Id: Ica34473f99bd74260eaebde6b132185e09e3c09d