summaryrefslogtreecommitdiff
path: root/vp8/common/reconinter.c
AgeCommit message (Collapse)Author
2012-10-16removed the recon rtcd invoke macro code (unrevert)Jim Bankoski
This reinstates reverted commit 2113a831575d81faeadd9966e256d58b6b2b1633 Change-Id: I9a9af13497d1e58d4f467e3e083fddf06b1b786c
2012-10-13Revert "removed the recon. rtcd invoke macro code"Jim Bankoski
This reverts commit 2113a831575d81faeadd9966e256d58b6b2b1633
2012-10-13removed the recon. rtcd invoke macro codeJim Bankoski
Code clean up - removed rtcd Change-Id: Id963ecf53c370b1d99484ef18d6befeed7e0c748
2012-10-09convert copy16x16 to rtcdJim Bankoski
Convert copy16x16 from invoke to rtcd. The first in a long string of converts. Change-Id: I296b0aa32f40e9fb649f7a3cb914a4e5300cad63
2012-09-06New motion vector entropy codingDeb Mukherjee
Adds a new experiment with redesigned/refactored motion vector entropy coding. The patch also takes a first step towards separating the integer and fractional pel components of a MV. However the fractional pel encoding still depends on the integer pel part and so they are not fully independent. Further experiments are in progress to see how much they can be decoupled without affecting performance. All components including entropy coding/decoding, costing for MV search, forward updates and backward updates to probability tables, have been implemented. Results so far: derf: +0.19% std-hd: +0.28% yt: +0.80% hd: +1.15% Patch: Simplifies the fractional pel models: derf: +0.284% std-hd: +0.289% yt: +0.849% hd: +1.254% Patch: Some changes in the models, rebased. derf: +0.330% std-hd: +0.306% yt: +0.816% hd: +1.225% Change-Id: I646b3c48f3587f4cc909639b78c3798da6402678
2012-08-30hybrid transform of 16x16 dimensionJingning Han
Enable ADST/DCT of dimension 16x16 for I16X16 modes. This change provides benefits mostly for hd sequences. Set up the framework for selectable transform dimension. Also allowing quantization parameter threshold to control the use of hybrid transform (This is currently disabled by setting threshold always above the quantization parameter. Adaptive thresholding can be built upon this, which will further improve the coding performance.) The coding performance gains (with respect to the codec that has all other configuration settings turned on) are derf: 0.013 yt: 0.086 hd: 0.198 std-hd: 0.501 Change-Id: Ibb4263a61fc74e0b3c345f54d73e8c73552bf926
2012-08-20Merge "Superblock coding." into experimentalRonald S. Bultje
2012-08-20Superblock coding.Ronald S. Bultje
This commit adds a pick_sb_mode() function which selects the best 32x32 superblock coding mode. Then it selects the best per-MB modes, compares the two and encodes that in the bitstream. The bitstream coding is rather simplistic right now. At the SB level, we code a bit to indicate whether this block uses SB-coding (32x32 prediction) or MB-coding (anything else), and then we follow with the actual modes. This could and should be modified in the future, but is omitted from this commit because it will likely involve reorganizing much more code rather than just adding SB coding, so it's better to let that be judged on its own merits. Gains on derf: about even, YT/HD: +0.75%, STD/HD: +1.5%. Change-Id: Iae313a7cbd8f75b3c66d04a68b991cb096eaaba6
2012-08-16Fix valgrind error which causes non-deterministic results.Daniel Kang
Error was introduced in bf474e170fefbed60cf20fa3d2e9e229776469f0 Change-Id: I55bf114a1938c3a8869d8ff49cbe076eb9e83ea0
2012-08-15Code clean up.Paul Wilkins
Further cases of inconsistent naming convention. Change-Id: Id3411ecec6f01a4c889268a00f0c9fd5a92ea143
2012-08-14Some build fixesDeb Mukherjee
Fixes two typos that breaks the build introduced in recent check-ins. Change-Id: I3f15f3c088c48a63fede8941c9a4ba05dd0403c2
2012-08-14Code clean up.Paul Wilkins
References to MACROBLOCKD that use "x" changed to "xd" to comply with convention elsewhere that x = MACROBLOCK and xd = MACROBLOCKD. Simplify some repeat references using local variables. Change-Id: I0ba2e79536add08140a6c8b19698fcf5077246bc
2012-08-10Refactor RD to take same codepath for single and comp predDaniel Kang
Change-Id: Id38baf1b89648ef534e28be72f583137871f920c
2012-08-09Refactor vp8_build_inter16x16_predictor functionsDaniel Kang
Change-Id: I4fceefe76b14bd38a358dc4356708f7981bab339
2012-08-08Merging in the sixteenth subpel uv experimentDeb Mukherjee
Merges this experiment in to make it easier to run tests on filter precision, vectorized implementation etc. Also removes an experimental filter. Change-Id: I1e8706bb6d4fc469815123939e9c6e0b5ae945cd
2012-07-31Merging and bug-fix in enhanced_interp experimentDeb Mukherjee
Merged the enhanced_interp experiment. Found and fixed a bug in the include files framework, whereby certain encoder files were still using the old INTERP_EXTEND value of 3 instead of 4. The thresholds for mv range mcomp.c need a small adjustment to prevent crashes. The results are more or less unchanged. Change-Id: Iac5008390f1efc97ce1102fbb5f8989c847fb579
2012-07-30Adds support for switchable interpolation filters.Deb Mukherjee
Allows for swtiching/setting interpolation filters at the MB level. A frame level flag indicates whether to use a specifc filter for the entire frame or to signal the interpolation filter for each MB. When switchable filters are used, the encoder chooses between 8-tap and 8-tap sharp filters. The code currently has options to explore other variations as well, which will be cleaned up subsequently. One issue with the framework is that encoding is slow. I tried to do some tricks to speed things up but it is still slow. Decoding speed should not be affected since the number of filter taps remain unchanged. With the current version, we are up 0.5% on derf on average but some videos city/mobile improve by close to 4 and 2% respectively. If we did a full-search by turning the SEARCH_BEST_FILTER flag on, the results are somewhat better. The framework can be combined with filtered prediction, and I seek feedback regarding that. Rebased. Change-Id: I8f632cb2c111e76284140a2bd480945d6d42b77a
2012-07-24Use macro for filter extension lengthAdrian Grange
Replaced local definitions of the extension required by the filters with the globally defined value. Change-Id: If9e590a1f2e5b0bdc2d3e3c3f04aacbd3b09bfee
2012-07-17Restyle codeJohn Koleszar
Approximate the Google style guide[1] so that that there's a written document to follow and tools to check compliance[2]. [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml [2]: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py Change-Id: Idf40e3d8dddcc72150f6af127b13e5dab838685f
2012-07-09change to enable encoder to clamp UV motion vectorYaowu Xu
This is to avoid a rare encoder/decoder mismatch for MB using SPLITMV mode. In decoder, the UV mv can be determined to need clamp, but the flag is never set in encoder motion vector selection process, and the clamp is not done in encoding in encoder. Change-Id: I60520d3f790354c7855dadf03f0978ea9b77e2c0
2012-06-27Added Prediction Filter to Mode SelectionAdrian Grange
Added the ability to optionally filter the prediction data when inter modes are selected (excludes SPLITMV, for now). The mode selection loop considers both the filtered and non-filtered prediction data when choosing mode. The filter can be turned on/off at the frame-level, or signaled for each MB. Change-Id: I1b783c71d95a361ab36c761b07e8a6b06bc36822
2012-04-18Compound prediction for splitmv macroblocks.Ronald S. Bultje
Change-Id: I0af3395500b1cb0ed629249eb6636a0c9322cb18
2012-03-14added clamp for 2nd motion vectorYaowu Xu
The commit added a clamp to the 2nd motion vector used in compound prediction to insure mv within UMV borders. The clamp is similar to that of the first motion vector except that No SPLITMV is ever used for the 2nd motion vector. Change-Id: I26dd63c304bd66b2e03a083749cc98c641667116
2012-02-23Supporting high precision 1/8-pel motion vectorsDeb Mukherjee
This is the initial patch for supporting 1/8th pel motion. Currently if we configure with enable-high-precision-mv, all motion vectors would default to 1/8 pel. Encode and decode syncs fine with the current code. In the next phase the code will be refactored so that we can choose the 1/8 pel mode adaptively at a frame/segment/mb level. Derf results: http://www.corp.google.com/~debargha/vp8_results/enhinterp_hpmv.html (about 0.83% better than 8-tap interpoaltion) Patch 3: Rebased. Also adding 1/16th pel interpolation for U and V Patch 4: HD results. http://www.corp.google.com/~debargha/vp8_results/enhinterp_hd_hpmv.html Seems impressive (unless I am doing something wrong). Patch 5: Added mmx/sse for bilateral filtering, as well as enforced use of c-versions of subpel filters with 8-taps and 1/16th pel; Also redesigned the 8-tap filters to reduce the cut-off in order to introduce a denoising effect. There is a new configure option sixteenth-subpel-uv which will use 1/16 th pel interpolation for uv, if the motion vectors have 1/8 pel accuracy. With the fixes the results are promising on the derf set. The enhanced interpolation option with 8-taps alone gives 3% improvement over thei derf set: http://www.corp.google.com/~debargha/vp8_results/enhinterpn.html Results on high precision mv and on the hd set are to follow. Patch 6: Adding a missing condition for CONFIG_SIXTEENTH_SUBPEL_UV in vp8/common/x86/x86_systemdependent.c Patch 7: Cleaning up various debug messages. Patch 8: Merge conflict Change-Id: I5b1d844457aefd7414a9e4e0e06c6ed38fd8cc04
2012-02-16Removing a stray CONFIG_DUALPRED, and a INTERP_EXTEND fix.Deb Mukherjee
Change-Id: I7549e424ca6846b07a796f2b9cd4e9d4e550ca9b
2012-02-10Improved coding using 8x8 transformRonald S. Bultje
In summary, this commit encompasses a series of changes in attempt to improve the 8x8 transform based coding to help overall compression quality, please refer to the detailed commit history below for what are the rationale underly the series of changes: a. A frame level flag to indicate if 8x8 transform is used at all. b. 8x8 transform is not used for key frames and small image size. c. On inter coded frame, macroblocks using modes B_PRED, SPLIT_MV and I8X8_PRED are forced to using 4x4 transform based coding, the rest uses 8x8 transform based coding. d. Encoder and decoder has the same assumption on the relationship between prediction modes and transform size, therefore no signaling is encoded in bitstream. e. Mode decision process now calculate the rate and distortion scores using their respective transforms. Overall test results: 1. HD set http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120206.html (avg psnr: 3.09% glb psnr: 3.22%, ssim: 3.90%) 2. Cif set: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120206.html (avg psnr: -0.03%, glb psnr: -0.02%, ssim: -0.04%) It should be noted here, as 8x8 transform coding itself is disabled for cif size clips, the 0.03% loss is purely from the 1 bit/frame flag overhead on if 8x8 transform is used or not for the frame. ---patch history for future reference--- Patch 1: this commit tries to select transform size based on macroblock prediction mode. If the size of a prediction mode is 16x16, then the macroblock is forced to use 8x8 transform. If the prediction mode is B_PRED, SPLITMV or I8X8_PRED, then the macroblock is forced to use 4x4 transform. Tests on the following HD clips showed mixed results: (all hd clips only used first 100 frames in the test) http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8.html http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_log.html while the results are mixed and overall negative, it is interesting to see 8x8 helped a few of the clips. Patch 2: this patch tries to hard-wire selection of transform size based on prediction modes without using segmentation to signal the transform size. encoder and decoder both takes the same assumption that all macroblocks use 8x8 transform except when prediciton mode is B_PRED, I8X8_PRED or SPLITMV. Test results are as follows: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cifmodebase8x8_0125.html http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_0125log.html Interestingly, by removing the overhead or coding the segmentation, the results on this limited HD set have turn positive on average. Patch 3: this patch disabled the usage of 8x8 transform on key frames, and kept the logic from patch 2 for inter frames only. test results on HD set turned decidedly positive with 8x8 transform enabled on inter frame with 16x16 prediction modes: (avg psnr: .81% glb psnr: .82 ssim: .55%) http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdintermode8x8_0125.html results on cif set still negative overall Patch 4: continued from last patch, but now in mode decision process, the rate and distortion estimates are computed based on 8x8 transform results for MBs with modes associated with 8x8 transform. This patch also fixed a problem related to segment based eob coding when 8x8 transform is used. The patch significantly improved the results on HD clips: http://www.corp.google.com/~yaowu/no_crawl/t8x8/hd8x8RDintermode.html (avg psnr: 2.70% glb psnr: 2.76% ssim: 3.34%) results on cif also improved, though they are still negative compared to baseline that uses 4x4 transform only: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif8x8RDintermode.html (avg psnr: -.78% glb psnr: -.86% ssim: -.19%) Patch 5: This patch does 3 things: a. a bunch of decoder bug fixes, encodings and decodings were verified to have matched recon buffer on a number of encodes on cif size mobile and hd version of _pedestrian. b. the patch further improved the rate distortion calculation of MBS that use 8x8 transform. This provided some further gain on compression. c. the patch also got the experimental work SEG_LVL_EOB to work with 8x8 transformed macroblock, test results indicates it improves the cif set but hurt the HD set slightly. Tests results on HD clips: http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120201.html (avg psnr: 3.19% glb psnr: 3.30% ssim: 3.93%) Test results on cif clips: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120201.html (avg psnr: -.47% glb psnr: -.51% ssim: +.28%) Patch 6: Added a frame level flag to indicate if 8x8 transform is allowed at all. temporarily the decision is based on frame size, can be optimized later one. This get the cif results to basically unchanged, with one bit per frame overhead on both cif and hd clips. Patch 8: Rebase and Merge to head by PGW. Fixed some suspect 4s that look like hey should be 64s in regard to segmented EOB. Perhaps #defines would be bette. Bulit and tested without T8x8 enabled and produces unchanged output. Patch 9: Corrected misalligned code/decode of "txfm_mode" bit. Limited testing for correct encode and decode with T8x8 configured on derf clips. Change-Id: I156e1405d25f81579d579dff8ab9af53944ec49c
2012-02-09Merge dualpred (compound prediction) experiment.Ronald S. Bultje
Change-Id: Ieaaa07c50eae41118596197f6a4d848135946e41
2012-02-01Import a decoder bug fix from public stable branchScott LaVarnway
Please see the following public commit for details: https://gerrit.chromium.org/gerrit/#change,7608 Change-Id: I589eed0b6078e2c5c9c74e942886e503bd02b273
2011-12-06Dual 16x16 inter prediction.Ronald S. Bultje
This patch introduces the concept of dual inter16x16 prediction. A 16x16 inter-predicted macroblock can use 2 references instead of 1, where both references use the same mvmode (new, near/est, zero). In the case of newmv, this means that two MVs are coded instead of one. The frame can be encoded in 3 ways: all MBs single-prediction, all MBs dual prediction, or per-MB single/dual prediction selection ("hybrid"), in which case a single bit is coded per-MB to indicate whether the MB uses single or dual inter prediction. In the future, we can (maybe?) get further gains by mixing this with Adrian's 32x32 work, per-segment dual prediction settings, or adding support for dual splitmv/8x8mv inter prediction. Gain (on derf-set, CQ mode) is ~2.8% (SSIM) or ~3.6% (glb PSNR). Most gain is at medium/high bitrates, but there's minor gains at low bitrates also. Output was confirmed to match between encoder and decoder. Note for optimization people: this patch introduces a 2nd version of 16x16/8x8 sixtap/bilin functions, which does an avg instead of a store. They may want to look and make sure this is implemented to their satisfaction so we can optimize it best in the future. Change-ID: I59dc84b07cbb3ccf073ac0f756d03d294cb19281
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-07-25Use CONFIG_FAST_UNALIGNED consistently in codecYunqing Wang
CONFIG_FAST_UNALIGNED is enabled by default. Disable it if it is not supported by hardware. Change-Id: I7d6905ed79fed918bca074bd62820b0c929d81ab
2011-04-28Consolidated build inter predictorsScott LaVarnway
Code cleanup. Change-Id: Ic8b0167851116c64ddf08e8a3d302fb09ab61146
2011-04-27Removed unused code in reconinterScott LaVarnway
The skip flag is never set by the encoder for SPLITMV. Change-Id: I5ae6457edb3a1193cb5b05a6d61772c13b1dc506
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-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
2010-10-27Eliminate more warnings.Timothy B. Terriberry
This eliminates a large set of warnings exposed by the Mozilla build system (Use of C++ comments in ISO C90 source, commas at the end of enum lists, a couple incomplete initializers, and signed/unsigned comparisons). It also eliminates many (but not all) of the warnings expose by newer GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite without checking the return values). There are a few spurious warnings left on my system: ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used uninitialized in this function gcc seems to be unable to figure out that the value shortcut doesn't change between the two if blocks that test it here. ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned expression >= 0 is always true ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned expression >= 0 is always true This is true, so far as it goes, but it's comparing against an enum, and the C standard does not mandate that enums be unsigned, so the checks can't be removed. Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
2010-10-04fixed a typo that mis-used Y plane stride for UV blocks.Yaowu Xu
Raised by Lei Yang, the Y plane stride was used for UV blocks. This is clearly a typo. But as the comments in the code suggested that this port of code has not been used yet, so the typo should not have created any damage yet. Change-Id: Iea895edc17469a51c803a8cc6d0fce65a1a7fc2f
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-08-12Removed unnecessary MB_MODE_INFO copiesScott LaVarnway
These copies occurred for each macroblock in the encoder and decoder. Thetemp MB_MODE_INFO mbmi was removed from MACROBLOCKD. As a result, a large number compile errors had to be fixed. Change-Id: I4cf0ffae3ce244f6db04a4c217d52dd256382cf3
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