summaryrefslogtreecommitdiff
path: root/vp8/encoder/mcomp.h
AgeCommit message (Collapse)Author
2013-03-18ENTROPY_STATS -> VP8_ENTROPY_STATS in vp8/.Ronald S. Bultje
Change-Id: I0027483e47900de84394de47c3273cc8292e6119
2012-06-11Fix pedantic compiler warningsJohn Koleszar
Allows building the library with the gcc -pedantic option, for improved portabilty. In particular, this commit removes usage of C99/C++ style single-line comments and dynamic struct initializers. This is a continuation of the work done in commit 97b766a46, which removed most of these warnings for decode only builds. Change-Id: Id453d9c1d9f44cc0381b10c3869fabb0184d5966
2012-03-05Move SAD and variance functions to commonJohann
The MFQE function of the postprocessor depends on these Change-Id: I256a37c6de079fe92ce744b1f11e16526d06b50a
2012-01-30RTCD: add motion search functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: Ia5828b7ecc80db55b21916704aa3d54cbb98f625
2011-06-30Bug fix in motion vector limit calculationYunqing Wang
Motion vector limits are calculated using right shifts, which could give wrong results for negative numbers. James Berry's test on one clip showed encoder produced some artifacts. This change fixed that. Change-Id: I035fc02280b10455b7f6eb388f7c2e33b796b018
2011-06-06Remove hex search's variance calculation while in real-time modeYunqing Wang
In real-time mode motion search, there is no need to calculate variance. This change improved encoding speed by 1% ~ 2%(speed=-5). Change-Id: I65b874901eb599ac38fe8cf9cad898c14138d431
2011-05-25fix the mix use of errorperbit and sadperbitYaowu Xu
error_per_bit and sad_per_bit were designed as estimates of a bit worth of sum squared error and sum absolute difference respectively. Under this assumption, error_per_bit should be used in combination with 2nd order errors (variance or sum squared error) while sad_per_bit should be used in combination with 1st order SADs in motion estimation. There were a few places where sad_per_bit has been misused with variances, this commit changes to use error_per_bit for those places, also changes parameter names to properly indicate which constant is being used. On cif set, the change has a universal gain by all metrics: 0.13% by average/overall psnr and 0.1% by ssim. Change-Id: I4850fdcc3fd6886b30f784bd843f13dd401215fb
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-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-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-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-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-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-01-10Fix bug in motion searchYunqing Wang
The maximum possible MV in 1/8 pel units is (1<<11), which could cause mvcost out of its range that is 1023. Change maximum possible MV in 1/8 pel units to (1<<11)-8 will fix this problem. Change-Id: I5788ed1de773f66658c14f225fb4ab5b1679b74b
2010-12-14Fix a bug in motion search codeYunqing Wang
The MV's range is 256. Since the new motion search uses a different starting MV than the center ref MV, a MV range checking needs to be done to avoid corruption. Change-Id: I8ae0721d1bd203639e13891e2e54a2e87276f306
2010-12-03Improve MV prediction accuracy to achieve performance gainYunqing Wang
Add vp8_mv_pred() to better predict starting MV for NEWMV mode in vp8_rd_pick_inter_mode(). Set different search ranges according to MV prediction accuracy, which improves encoder performance without hurting the quality. Also, as Yaowu suggested, using diamond search result as full search starting point and therefore adjusting(reducing) full search range helps the performance. Change-Id: Ie4a3c8df87e697c1f4f6e2ddb693766bba1b77b6
2010-10-27Full search SAD function optimization in SSE4.1Yunqing Wang
Use mpsadbw, and calculate 8 sad at once. Function list: vp8_sad16x16x8_sse4 vp8_sad16x8x8_sse4 vp8_sad8x16x8_sse4 vp8_sad8x8x8_sse4 vp8_sad4x4x8_sse4 (test clip: tulip) For best quality mode, this gave encoder a 5% performance boost. For good quality mode with speed=1, this gave encoder a 3% performance boost. Change-Id: I083b5a39d39144f88dcbccbef95da6498e490134
2010-10-26Add half-pixel variance RTCD functionsJohn Koleszar
NEON has optimized 16x16 half-pixel variance functions, but they were not part of the RTCD framework. Add these functions to RTCD, so that other platforms can make use of this optimization in the future and special-case ARM code can be removed. A number of functions were taking two variance functions as parameters. These functions were changed to take a single parameter, a pointer to a struct containing all the variance functions for that block size. This provides additional flexibility for calling additional variance functions (the half-pixel special case, for example) and by initializing the table for all block sizes, we don't have to construct this function pointer table for each macroblock. Change-Id: I78289ff36b2715f9a7aa04d5f6fbe3d23acdc29c
2010-09-09Use WebM in copyright notice for consistencyJohn Koleszar
Changes 'The VP8 project' to 'The WebM project', for consistency with other webmproject.org repositories. Fixes issue #97. Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-06-18cosmetics: trim trailing whitespaceJohn Koleszar
When the license headers were updated, they accidentally contained trailing whitespace, so unfortunately we have to touch all the files again. Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
2010-06-04LICENSE: update with latest textJohn Koleszar
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-05-18Initial WebM releaseJohn Koleszar