summaryrefslogtreecommitdiff
path: root/vp8/encoder/rdopt.c
AgeCommit message (Collapse)Author
2011-08-11Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/decoder/detokenize.c vp8/decoder/onyxd_if.c vp8/vp8_common.mk Change-Id: Ifca1108186a8bc715da86a44021ee2fa5550b5b8
2011-07-28Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: Iaca87acc9726b5173d638528684d154538ec01e6
2011-07-27Preload reference area in sub-pixel motion search (real-time mode)Yunqing Wang
This change implemented same idea in change "Preload reference area to an intermediate buffer in sub-pixel motion search." The changes were made to vp8_find_best_sub_pixel_step() and vp8_find_best_half _pixel_step() functions which are called when speed >= 5. Test result (using tulip clip): 1. On Core2 Quad machine(Linux) rt mode, speed (-5 ~ -8), encoding speed gain: 2% ~ 3% rt mode, speed (-9 ~ -11), encoding speed gain: 1% ~ 2% rt mode, speed (-12 ~ -14), no noticeable encoding speed gain 2. On Xeon machine(Linux) Test on speed (-5 ~ -14) didn't show noticeable speed change. Change-Id: I21bec2d6e7fbe541fcc0f4c0366bbdf3e2076aa2
2011-07-27Merge "Fix range checks in motion search"Yunqing Wang
2011-07-27Fix range checks in motion searchYunqing Wang
There were some situations that the start motion vectors were out of range. This fix adjusted range checks to make sure they are checked and clamped. Change-Id: Ife83b7fed0882bba6d1fa559b6e63c054fd5065d
2011-07-27Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I1ae82458536ba2f0969e1bea78f41cd16fe96b79
2011-07-26cosmetics: consistently use [u]int64_tJames Zern
Removes mixed usage of (unsigned) long long and INT64. Fixes Issue #208. Change-Id: I220d3ed5ce4bb1280cd38bb3715f208ce23cf83a
2011-07-21fix more merge issuesYaowu Xu
With this fix, the experimental branch now builds and encodes correctly with the following two configure options respectively: --enable-experimental --enable-t8x8 --enable-experimental Change-Id: I3147c33c503fe713a85fd371e4f1a974805778bf
2011-07-20Add 8x8 transform to experimental branchDeb Mukherjee
Please refer to previous commit messages for detailed info: https://on2-git.corp.google.com/g/#change,5940 https://on2-git.corp.google.com/g/#change,6045 Change-Id: I8b16992f2f69c5a808ad40a3e32ef589cce7c59d
2011-07-13Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I9dab62c24d71f71cdc36732ed8ed469bee67d7e1
2011-07-13Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-07-09Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: Ica63d16cb39e2d65a3414f0b9f86c8a64112dfa3
2011-07-09Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-07-08Minor change in pick_inter_mode()Yunqing Wang
Scott suggested to move vp8_mv_pred() under "case NEWMV" to save extra checks. Change-Id: I09e69892f34a08dd425a4d81cfcc83674e344a20
2011-07-08Adjust full-pixel clamping and motion vector limit calculationYunqing Wang
Do mvp clamping in full-pixel precision instead of 1/8-pixel precision to avoid error caused by right shifting operation. Also, further fixed the motion vector limit calculation in change: b7480454706a6b15bf091e659cd6227ab373c1a6 Change-Id: Ied88a4f7ddfb0476eb9f7afc6ceeddbf209fffd7
2011-07-01Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: Iaf6e9e14d0cfe5cef3895cfb68524d51139a6d23
2011-07-01Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-06-30Merge "Copy macroblock data to a buffer before encoding it"Yunqing Wang
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-30Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/encoder/bitstream.c Change-Id: I44c00f98dcb99eb728ce4f5256aefb135a711a74
2011-06-30Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I35c9ca116aecd0d03e762942d9cf1289edb4f23d
2011-06-28Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistentlyJohn Koleszar
There were many instances in the code of vp8_coef_tokens and vp8_coef_tokens-1, which was a preprocessor macro despite the naming convention. Replace these with MAX_ENTROPY_TOKENS and ENTROPY_NODES, respectively. Change-Id: I72c4f6c7634c94e1fa066cd511471e5592c748da
2011-06-28Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
2011-06-23Copy macroblock data to a buffer before encoding itYunqing Wang
I got this idea from Pascal (Thanks). Before encoding a macroblock, copy it to a 16x16 buffer, and then read source data from there instead. This will help keep the source data in cache, and help with the performance. Change-Id: Id05f4cb601299150511d59dcba0ae62c49b5b757
2011-06-23fix build issues for experimental branchYaowu Xu
experimental branch build was broken from some merge artifacts, this commit fixes those issues to enable the experimental branch to build. Change-Id: Ic52b2d2f1d1b80abb7ecaa4c0927bcf887ac0c2a
2011-06-23Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
2011-06-22Merge remote branch 'origin/master' into experimentalJohann
Conflicts: vp8/encoder/rdopt.c Use new constant (110) from 10ed60dc7 Change-Id: Ic7d8a45ccc8deeeb94a0ab1c58d5d052ef3c27e4
2011-06-20adjusting the calculation of errorperbitYaowu Xu
RDMULT/RDDIV defines a bit worth of distortion in term of sum squared difference. This has also been used as errorperbit in subpixel motion search, where the distortions computed as variance of the difference. The variance of differences is different from sum squared differences by amount of DC squared. Typically, for inter predicted MBs, this difference averages around 10% between the two distortion, so this patch introduces a 110% constant in deriving errorperbit from RDMULT/RDDIV. Test on CIF set shows small but positive gain on overall PSNR (.03%) and SSIM (.07%), overall impact on average PSNR is 0. Change-Id: I95425f922d037b4d96083064a10c7cdd4948ee62
2011-06-17Merge remote branch 'internal/upstream' into HEADJohn Koleszar
Conflicts: vp8/encoder/encodeframe.c vp8/encoder/rdopt.c Change-Id: I183fd3ce9e94617ec888c9f891055b9f1f8ca6c5
2011-06-17Merge remote branch 'origin/master' into experimentalJohann
Conflicts: vp8/encoder/encodeframe.c vp8/encoder/rdopt.c Change-Id: I8bab720889ac652361abdedfe2cc91a89742cb30
2011-06-13Calc ref_frame_cost once per frameScott LaVarnway
instead of every macro block. Change-Id: I2604e94c6b89e3a8457777e21c8c38406d55b165
2011-06-08Move RD intra block mode selection to rdopt.cJohn Koleszar
This change is analogous to I0b67dae1f8a74902378da7bdf565e39ab832dda7, which made the move for the non-RD path. Change-Id: If63fc1b0cd1eb7f932e710f83ff24d91454f8ed1
2011-06-07Merge "remove redundant functions"Yaowu Xu
2011-06-07adjust sad per bit constantsYaowu Xu
While investigating the effect of DC values on SAD and SSE in motion estimation, a side finding indicates the two table of constants need be adjusted. The adjustment was done by multiplying old constants by 90% with rounding. Also absorb the 1/2 scaling constant into the two tables. Refer to change Ifa285c3e for background of the 1/2 factor. Cif set test showed a very small gain on all metric. Change-Id: I04333527a823371175dd46cb04a817e5b9a8b752
2011-06-06remove redundant functionsYaowu Xu
The encoder defined about 4 set of similar functions to calculate sum, variance or sse or a combination of them. This commit removed one set of these functions, get8x8var and get16x16var, where calls to the later function are replaced with var16x16 by using the fact on a 16x16 MB: variance == sse - sum*sum/256 Change-Id: I803eabd1fb3ab177780a40338cbd596dffaed267
2011-06-04Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I81ac427cbaf3d0865df4acef3e0bfc2e95556c4b
2011-06-03Merge "Removed B_MODE_INFO"Scott LaVarnway
2011-06-03Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I7395011ef6c1783110ebd06305ca3d908d2457bb
2011-06-02Removed B_MODE_INFOScott LaVarnway
Declared the bmi in BLOCKD as a union instead of B_MODE_INFO. Then removed B_MODE_INFO completely. Change-Id: Ieb7469899e265892c66f7aeac87b7f2bf38e7a67
2011-06-02Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I993dbef81ca3d1638e16c4134aa8dc177e57875c
2011-06-01further clean up of errorperbit and sadperbitYaowu Xu
this commit makes the usage errorperbit and sadperbit consistent for encoding modes and passes. Removed all different magic weight factors associated with errorperbit. Now 1/2 is used for both sadperbit16 and sadperbit4, the /2 operation is merged into initializations of the 2 variables. Tests on cif set show .23%, 0.18% and 0.19% gain by avg psnr, overall psnr and ssim respectively. Change-Id: Ifa285c3e065ce0a5a77addfc9f95aabf54ee270d
2011-06-01remove some magic weights associated with sad_per_bitYaowu Xu
sad_per_bit has been used for a number of motion vector search routines with different magic weights: 1, 1/2 and 1/4. This commit remove these magic numbers and use 1/2 for all motion search routines, also reformat a number of source code lines to within 80 column limit. Test on cif set shows overall effect is neutral on all metrics. <=0.01% Change-Id: I8a382821fa4cffc9c0acf8e8431435a03df74885
2011-06-01Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I1e7ce466bc01e380eb392b964ba677f0bb8cd13b
2011-05-31vp8_pick_inter_mode code cleanupScott LaVarnway
Small code cleanups before attempting to reduce the size of bmi found in BLOCKD. Change-Id: Ie9c14adb53afd847716a75bcce067d0e6c04f225
2011-05-28Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: Ie2a4927754a9c220b30a84fc7e1372e565fe9eec
2011-05-27Remove unused codeYunqing Wang
Hex search is not called in rdopt.c Change-Id: I67347f03e13684147a7c77fb9e9147e440bb5e8e
2011-05-26Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: Ica721b36ffaa6c4c02e1cf82850496c7063ce577
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-25Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I9e5c28f898d92091e39f62193f6329b593968819
2011-05-24Merge "MODE_INFO size reduction"Scott LaVarnway