summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeframe.c
AgeCommit message (Collapse)Author
2011-10-31Segmentation Entropy and tweaks.Paul Wilkins
Some correction for entropy impact of segment signaled (EOB and ref frame) Other slight tweaks. Derf VBR average gain now over 1% (best over 7%) One YT test clip has gains of circa 30% (VBR) There is still an issue with noisy clips where making the background static and coded with 0,0 can have a negative effect, especially at low Q. This is probably because of the loss of smoothing by fractional pixel filters. Change-Id: I7a225613c98067b96f8fc7a7e36f95d465b2b834
2011-10-24Segmentation Features;Paul Wilkins
Only encode sign bit for feature data that can have a sign. Tweaks to the test segmentation rules so that it now actually gives a net benefit on the derf set of about 0.4% though much higher on some clips at the low end. Change-Id: I8e61f1aebf41c9037db7e67e2f8975aa18a0c986
2011-10-24Further segment feature extensions.Paul Wilkins
This quite large check in includes the following: Merge in some code from Ronald (mbgraph.c) that scans a Gf/arf group. This is used as a basis for a simple segmentation for the normal frames in a gf/arf group. This code also uses satd functions from Yaowu. Adds functionality for coding the latest possible position of an EOB for blocks in the segment. (Currently 0-15 only, hence just for 4x4 dct). Where the EOB position is 0 this acts like "skip" and the normal coding of skip at the per mb level is disabled. Added functions (seg_common.c) for setting and reading segment feature elements. These may want to be optimized away at some point but while the mecahnism is in a state of flux they provide a single location for making changes and keep things a bit cleaner. This is still proof of concept code. Currently the tested feature set:- Quantizer, Loop Filter level, Reference frame, Prediction Mode, EOB end stop. TBD:- Add functions for setting and reading the feature data with range and validity checking. Handling of signed and unsigned feature data. At the moment all is assumed to be signed and a sign bit is coded but many cannot be negative. Correct handling of EOB feature with intra coded blocks. Testing/trapping of legal/illegal ref frame and mode combinations. Transform size switch plus merge and test with 8c8 DCT work Merge and test with Sumans Segmenation coding optimizations Change-Id: Iee12e83661c7abbd1e0ce6810915eb4ec35e2d8e
2011-09-30Segment coding of mode and reference frame.Paul Wilkins
Proof of concept test code that encodes mode and reference frame data at the segment level. Decode-able bit stream but some issues not yet resolved. As it this helps a little on a couple of clips but hurts on most as the basis for segmentation is unsound. To build and test, configure with --enable-experimental --enable-segfeatures Change-Id: I22a60774f69273523fb152db8c31f4b10b07c7f4
2011-09-16add 8x8 intra prediction modesYaowu Xu
Patch 1 to Patch 3 is an initial implementation of 8x8 intra prediction modes, here are with the following assumptions: a. 8x8 has 4 prediction modes DC, H, V and TM b. UV 4x4 block use the same mode as corresponding 8x8 area c. i8x8 modes are enabled for key frame only for now Patch 4: d. removed debug code from previous patches Patch 5: e. added stats code to collect entropy stats and further cleaned up Patch 6: f. changed mode stats code to collect finer stats of modes Patch 7: g. normalized i8x8 modes distribution to total at 256 (8bits). Patch 8: h. fixed a bug in decoder and removed debug printf output. Patch 9: i. more cleanups to address paul's comment Patch 10: j. messy rebase/merges to bring the commit up to date. Tests on HD clips encoded with all key frame showing consistent gain on all clips and all metrics:~0.5%(psnr) and 0.6%(ssim): http://www.corp.google.com/~yaowu/no_crawl/i8x8hd_allkey_fixedq.html To build and test, configure with: --enable-experimental --enable-i8x8 Change-Id: I9813fe07ae48cab5fdb5d904bca022514ad01e7f
2011-09-16Merge remote branch 'internal/upstream' into HEADJohn Koleszar
Conflicts: vp8/decoder/decodframe.c vp8/encoder/encodeframe.c vp8/encoder/encodemb.c Change-Id: I6e0d1669e4409a2dfd73ba2c7038d730842d3953
2011-09-13Segment Features:Paul Wilkins
Some basic plumbing added for a range of segment level features. MB_LVL_* changed to SEG_LVL_* to better reflect meaning. Change-Id: Iac96da36990aa0e40afc0d86e990df337fd0c50b
2011-08-31Merge "Removed bmi copy to/from BLOCKD"Scott LaVarnway
2011-08-31Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-08-30Recalculate zbin_extra only if regular quantizer is being usedAlpha Lam
vp8_update_zbin_extra() is called all the time even though the fast quantizer doesn't use it. Skip this call if fast quantizer is used. Change-Id: Ia711c38431930cc2486cf59b8466060ef0e9d9db
2011-08-24Removed bmi copy to/from BLOCKDScott LaVarnway
for SPLITMV and B_PRED modes. Modified code to use the bmi found in mode_info_context instead of BLOCKD. On the decode side, the uvmvs are calculated only when required, instead of every macroblock. This is WIP. (bmi should eventually be removed from BLOCKD) Small performance gains noticed for RT encodes and decodes.(VGA) Change-Id: I2ed7f0fd5ca733655df684aa82da575c77a973e7
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-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-20fixed a number of problems caused by auto mergesYaowu Xu
The auto merge process pull and merge commits from public git or master branch. These automerges while worked well most time, but has created a few problems. This commit fixed several issues existed long before the latest 8x8 transform commit. Change-Id: I895ca99713231b1aec521d57db5d9839f74aacfa
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-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-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-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-20Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/encoder/encodeframe.c vp8/encoder/rdopt.c Change-Id: I6ff3d92aa400bef10f6cc87f9da7ebaf6db8cc88
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-14Fix RT only buildTero Rintaluoma
Moved encode_intra function from firstpass.c to encodeintra.c to prevent linking problem in real-time only build. Also changed name of the function to vp8_encode_intra because it is not a static. Change-Id: Ibf3c6c1de3152567347e5fbef47d1d39564620a5
2011-06-13Calc ref_frame_cost once per frameScott LaVarnway
instead of every macro block. Change-Id: I2604e94c6b89e3a8457777e21c8c38406d55b165
2011-06-09bug fix mode_info_context not initialized for error-resilientJames Berry
uninitialized xd->mode_info_context would crash vpxenc for --error-resilient=1. Change-Id: I31849e40281e3d65ab63257cfec5e93398997f0b
2011-06-09Update keyframe activity in non-RD modeJohn Koleszar
Activity update is no longer dependent on being in RD mode, so update it unconditionally. Change-Id: Ib617a6fc210dfc045455e3e4467d7ee5e3d1fa0e
2011-06-08Merge "Move RD intra block mode selection to rdopt.c"John Koleszar
2011-06-08Adjust errorperbit according to RDMULT in activity maskingYaowu Xu
In activity masking, RDO constant RDMULT is adjusted on a per MB basis adaptive to activity with the MB. errorperbit, which is defined as RDMULT/RDDIV, is a constant used in motion estimation. Previously, in activity masking, errorperbit is not changed even when RDMULT is changed. This commit changed to adjust errorperbit according to the change in RDMULT. Test in cif set showed a very small but consistent gain by all quality metrics (average, overall psnr and ssim) when activity masking is on. Change-Id: I07ded3e852919ab76757691939fe435328273823
2011-06-08Merge "Further activity masking changes:"Yaowu Xu
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-08Move intra block mode selection to pickinter.cJohn Koleszar
This commit moves the intra block mode selection from encodeframe.c to pickinter.c (in the non-RD case). This allowed pick_intra_mbuv_mode and pick_intra4x4mby_modes to be made static, and is a step towards refactoring intra mode selection in the main pickinter loop. Gave a small perf increase (~0.5%). Change-Id: I0b67dae1f8a74902378da7bdf565e39ab832dda7
2011-06-08Further activity masking changes:Paul Wilkins
Some further re-structuring of activity masking code. Still has various experimental switches. Supports a metric based on intra encode. Experimental comparison against a fixed activity target rather than a frame average, for altering rd and zbin. Overall the SSIM performance is similar to TT's original code but there is a much smaller PSNR hit of circa 0.5% instead of 3.2% Change-Id: I0fd53b2dfb60620b3f74d7415e0b81c1ac58c39a
2011-06-07Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I67cc3b490266f958a1b3a935ec08ee19d7b4f6a0
2011-06-07Merge remote branch 'internal/upstream' into HEADJohn Koleszar
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-06Merge "neon fast quantize block pair"Johann
2011-06-06Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/encoder/encodeframe.c Change-Id: Ibb5a3894ede08ed401ec6e974a8902d7393c9978
2011-06-04Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I81ac427cbaf3d0865df4acef3e0bfc2e95556c4b
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-01neon fast quantize block pairTero Rintaluoma
vp8_fast_quantize_b_pair_neon function added to quantize two adjacent blocks at the same time to improve performance. - Additional 3-6% speedup compared to neon optimized fast quantizer (Tanya VGA@30fps, 1Mbps stream, cpu-used=-5..-16) Change-Id: I3fcbf141e5d05e9118c38ca37310458afbabaa4e
2011-05-26Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-05-26Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/encoder/encodeframe.c vp8/encoder/ethreading.c Change-Id: I4becf6f101756923de6b98ca6a2132c3605c6ea5
2011-05-26Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: Ica721b36ffaa6c4c02e1cf82850496c7063ce577
2011-05-25Return sse value in vp8_variance SSE2 functionsYunqing Wang
Minor modification. Change-Id: I09511d38fd1451d5c4106a48acdb3f766ce59cb7
2011-05-25Merge remote branch 'origin/master' into experimentalJohn Koleszar
Change-Id: I9e5c28f898d92091e39f62193f6329b593968819