summaryrefslogtreecommitdiff
path: root/vp8/common
AgeCommit message (Collapse)Author
2012-08-03Merge "16x16 DCT blocks." into experimentalDaniel Kang
2012-08-03Merge "Merging and bug-fix in enhanced_interp experiment" into experimentalDeb Mukherjee
2012-08-0216x16 DCT blocks.Daniel Kang
Set on all 16x16 intra/inter modes Features: - Butterfly fDCT/iDCT - Loop filter does not filter internal edges with 16x16 - Optimize coefficient function - Update coefficient probability function - RD - Entropy stats - 16x16 is a config option Have not tested with experiments. hd: 2.60% std-hd: 2.43% yt: 1.32% derf: 0.60% Change-Id: I96fb090517c30c5da84bad4fae602c3ec0c58b1c
2012-08-02Define INT64_MAX for msvc to buildYaowu Xu
Change-Id: I6cb88d87b7549ded1de6ff9ef65ff958ad448999
2012-08-02Use 8x8 DCT transform for I8X8 prediction modeJingning Han
Apply 2D-DCT transform of dimension 8x8 to encode prediction residuals of I8X8 mode. Brought back block type 3 probability context model for 8x8 tokens, which is used for the coefficients of Y blocks in I8x8 modes. The coefficient costs estimate of I8X8 mode in rate-distortion is also changed appropriately. Performance results: derf: 0.246 yt: 0.114 std-hd: 0.730 hd: 0.670 Change-Id: If1d970eeb4e1827c9f0d2c5b27d33089b347ea27
2012-07-31Removed macros for merged experimentsAdrian Grange
Removed two macros corresponding to experiments that were merged into the main code. Change-Id: I894e8b509a2bb88557f9aba6f226ed7807745065
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-27Merges several experimentsDeb Mukherjee
The following five experiments are merged: newentropy newupdate adaptive_entropy (also includes a couple of parameter changes that improves results a little in common/entropymode.c and encoder/modecosts.c that were not merged from the internal branch) newintramodes expanded_coef_context Change-Id: I8a142a831786ee9dc936f22be1d42a8bced7d270
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-19Adds hybrid transformJingning Han
Adds ADST/DCT hybrid transform coding for Intra4x4 mode. The ADST is applied to directions in which the boundary pixels are used for prediction, while DCT applied to directions without corresponding boundary prediction. Adds enum TX_TYPE in b_mode_infor to indicate the transform type used. Make coding style consistent with google style. Fixed the commented issues. Experimental results in terms of bit-rate reduction: derf: 0.731% yt: 0.982% std-hd: 0.459% hd: 0.725% Will be looking at 8x8 transforms next. Change-Id: I46dbd7b80dbb3e8856e9c34fbc58cb3764a12fcf
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-28Add lossless compression mode.Hui Su
This commit adds lossless compression capability to the experimental branch. The lossless experiment can be enabled using --enable-lossless in configure. When the experiment is enabled, the encoder will use lossless compression mode by command line option --lossless, and the decoder automatically recognizes a losslessly encoded clip and decodes accordingly. To achieve the lossless coding, this commit has changed the following: 1. To encode at lossless mode, encoder forces the use of unit quantizer, i.e, Q 0, where effective quantization is 1. Encoder also disables the usage of 8x8 transform and allows only 4x4 transform; 2. At Q 0, the first order 4x4 DCT/IDCT have been switched over to a pair of forward and inverse Walsh-Hadamard Transform (http://goo.gl/EIsfy), with proper scaling applied to match the range of the original 4x4 DCT/IDCT pair; 3. At Q 0, the second order remains to use the previous walsh-hadamard transform pair. However, to maintain the reversibility in second order transform at Q 0, scaling down is applied to first order DC coefficients prior to forward transform, and scaling up is applied to the second order output prior to quantization. Symmetric upscaling and downscaling are added around inverse second order transform; 4. At lossless mode, encoder also disables a number of minor features to ensure no loss is introduced, these features includes: a. Trellis quantization optimization b. Loop filtering c. Aggressive zero-binning, rounding and zero-bin boosting d. Mode based zero-bin boosting Lossless coding test was performed on all clips within the derf set, to verify that the commit has achieved lossless compression for all clips. The average compression ratio is around 2.57 to 1. (http://goo.gl/dEShs) Change-Id: Ia3aba7dd09df40dd590f93b9aba134defbc64e34
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-06-25Continued adaptive entropy codingDeb Mukherjee
Incorporates mv_ref, mbsplit and second_mv into the adaptive entropy framework. The mv_ref framework has been modified from before. Adds some clean-ups and fixes. Results with the adaptive entropy experiment are currently up by +1.93% on derf; +2.33% std-hd and +1.87% yt-hd. Fixed a nasty intermittent bug. Change-Id: I4b1ac9f9483b48432597595195bfec05f31d1e39
2012-06-25Sign-extend input argument so it can be used in pointer arithmetic.Ronald S. Bultje
Change-Id: I6cbd4de96f9dcc783cef170bfd7652f6cbee36a2
2012-06-19Merge "Add comments to intra prediction probability tables." into experimentalRonald S. Bultje
2012-06-18Fix a bunch of warnings.Christian Duvivier
Change-Id: I883b4f63559c1cf66a25016e946b1b1ae98a20da
2012-06-18x86inc: Move x86inc to the correct location.Daniel Kang
Change-Id: I6802731a4d15feef5ce62993dc505ded55c40f7e
2012-06-18Add comments to intra prediction probability tables.Ronald S. Bultje
Change-Id: Iec81423e8e6c50acd9e10f69bc99ad0e9058517d
2012-06-15Adaptive entropy coding of coefficients, modes, mv.Deb Mukherjee
This patch incorporates adaptive entropy coding of coefficient tokens, and mode/mv information based on distributions encountered in a frame. Specifically, there is an initial forward update to the probabilities in the bitstream as before for coding the symbols in the frame, however at the end of decoding each frame, the forward update to the probabilities is reverted and instead the probabilities are updated towards the actual distributions encountered within the frame. The amount of update is weighted by the number of hits within each context. Results on derf/hd/std-hd are all up by 1.6%. On derf, the most of the gains come from coefficients, however for the hd and std-hd sets, the most of the gains come from the mode/mv information updates. Change-Id: I708c0e11fdacafee04940fe7ae159ba6844005fd
2012-06-15Merge "Adds x86inc.asm and update idct/dequant mmx" into experimentalDaniel Kang
2012-06-12Adds x86inc.asm and update idct/dequant mmxDaniel Kang
Updates idct/dequant mmx assembly to work with vpnext instead of vp8. Also adds x86inc.asm Change-Id: I6e147d5e89177ae449271e97e50d082eb11b078e
2012-06-12changed to use a fixed number for update probabityYaowu Xu
This commit is to remove two arrays, which contain the probabilities of how likely each probability in coef_probs table is updated. The commit changed to use a fixed number "252". Surprisedly, the overall impact on quality is close to zero, which basically says the two big static arrays are not helpful at all. derf: -0.016%, -0.020% std-hd: 0.000%, -0.013% yt: -0.022%, +0.007% yt-hd: -0.038%, +0.034% Change-Id: Ifee94d28a37dcab4f1d2b994bd5b07575be42b72
2012-05-25fixed a number of compiling issuesYaowu Xu
the commit fixed a number of compiling issues when some epxeriments are turned on at the same time. Change-Id: Idb15b215e2d2a7d25f2707f99ef55a34e7301ce7
2012-05-23changed the way that default probs for 8x8 is set.Yaowu Xu
The commit changed how baseline 8x8 coefficient probabilities are initialized, to be consistent with the initialization of baseline 4x4 coefficient probabilities. The commit does not have any effect on compression. Change-Id: Ifb3902b5dc0b0c2e6dc3aa5d4a6589d528e58355
2012-05-15Rewrite reference frame costing in the RD loop.Ronald S. Bultje
I now see I didn't write a very long description, so let's do it here then. We took a pretty big quality hit (0.1-0.2%) from my recent fix of the inversion of arguments to vp8_cost_bit() in the RD reference frame costing. I looked into it and basically the costing prevented us from switching reference frames. This is of course silly, since each frame codes its own prob_intra_coded, so using last frame cost indications as a limiting factor can never be right. Here, I've rewritten that code to estimate costings based partially on statistics from progress on current frame encoding. Overall, this gives us a ~0.2%-0.3% improvement over what we had previously before my argument-inversion-fix, and thus about ~0.4% over current git (on derf-set), and a little more (0.5-1.0%) on HD/STD-HD/YT. Change-Id: I79ebd4ccec4d6edbf0e152d9590d103ba2747775
2012-05-15Adds new Directional Intra prediction modes.Deb Mukherjee
Adds 6 directional intra predictiom modes for 16x16 and 8x8 blocks. Change-Id: I25eccc0836f28d8d74922e4e9231568a648b47d1
2012-05-14Merge "Reversible WHT pair" into experimentalYaowu Xu
2012-05-10Reversible WHT pairYaowu Xu
This commit changed the forward and the inverse 4x4 Walsh Hadamard transform to a new pair, where the inverse transform can pefectly reconstuct the input to forward transform. It also does so without changing the input and output value range. Even more, it does not change the complexity of the transforms. While it was not expected to improve the results of our current test, it does improve std-hd set by 0.2% on all metrics. No change on derf. Change-Id: Ie4f23ddd3a0f3c5fbe97fb58399f860031f99337
2012-05-09Improved index remapping for prob updates.Deb Mukherjee
Also includes some clean ups and refactoring. Rebased. Change-Id: I268c97fe325b4881103fe19f41ae818569e7ccf7
2012-05-08a number of fixes to entropy stats collectionYaowu Xu
1. block types There are only three types of blocks for 8x8 transformed MBs, i.e. Y block with DC does not exist for 8x8 transformed MBs as all MB using 8x8 transform have 2nd order haar transform. This commit introduced a new macro BLOCK_TYPES_8X8 to reflect such fact. 2. context counters This commit also fixed the mixed of context_counters between 4x4 and 8x8 transformed MBs. The mixed use of the counters leads me to think the existing the context probabilities were not properly generated from 8x8 transformed MBs. 3. redundant collecting in recoding The commit also corrected the code that accumulates entropy stats by making sure stats only collected for final packing, not during the recode loop Change-Id: I029f09f8f60bd0c3240cc392ff5c6d05435e322c
2012-05-04Expanding the coefficient encoding contextsDeb Mukherjee
This patch expands the set of prev contexts used for video coding from 3 to 4. There is a small improvement of the order of 0.08% for derf and 0.15% on the HD set. The tests were rerun after the various merges last week. There are two columns in each test - the first are the results with the mbskip change, and the second with expanded contexts added on top of that. Derf: http://www.corp.google.com/~debargha/vp8_results/explibvpx_newentropy_expcontext.html HD: http://www.corp.google.com/~debargha/vp8_results/explibvpx_hd_newentropy_expcontext.html Rebased. Broke up 80 char lines. Change-Id: I82d2e72d054e530cbf5ce9aa0e6d85c582965675
2012-05-01slight adjustment to coef band definitionYaowu Xu
This commit adjusted slightly the 4x4 coefficents band definition to better classify coefficients with similar distributions and usages. It helps derf set about .1%, it is alos slightly positive for std-hd set, where 4x4 blocks are used less frequently. The commit also removed a const array not in use. Change-Id: I78d16905d4036641ec905b0c32c190c1def5b249
2012-04-25Merge QIMODE experimentYaowu Xu
This commit merge the QI mode experiment. As the experiment affects the encoding of intra coding modes on key frame only, the overall effect of the experiment on encoding tests is insignificant. Change-Id: I9e4e3933adface88867ad429cee3986e529c511d
2012-04-25Merge UVINTRA experimentYaowu Xu
The commit merges the UVINTRA experiment and removed the related macros. The overall effect of the experiment is a small gain (.1% on derf) Change-Id: Ia34b3312fb9b5b34c9ba111bf0fa78c6f78ac80b
2012-04-24Merge "Differential encoding of probability updates" into experimentalDeb Mukherjee
2012-04-24Remove unused header files.Ronald S. Bultje
Change-Id: I8708358bb37edabcbe5dfc755ed18791d9e143c4
2012-04-23Differential encoding of probability updatesDeb Mukherjee
Adds differential encoding of prob updates using a subexponential code centered around the previous probability value. Also searches for the most cost-effective update, and breaks up the coefficient updates into smaller groups. Small gain on Derf: 0.2% Change-Id: Ie0071e3dc113e3d0d7ab95b6442bb07a89970030
2012-04-19Fix splitmv/compound prediction when eightpel is enabled.Ronald S. Bultje
Change-Id: I9d6083d54e3d478ec20dc6dc48d3f45eb5c7e16b
2012-04-18Compound prediction for splitmv macroblocks.Ronald S. Bultje
Change-Id: I0af3395500b1cb0ed629249eb6636a0c9322cb18
2012-04-11Refactoring of encode loop and bitstream packingPaul Wilkins
Some code re-factored / moved to allow the main pack operation inside the recode loop so that the size estimate is accurate. Deletion of some redundant code relating to one pass. Aproximate improvement over March 27 code base: Derf 0.0%, YT 0.5%, YThd 0.3% Std_hd 0.25% Change-Id: Id2d071794ab44f0b52935f6fcdb5733d09a6bb86
2012-04-11Superblock encoding orderAdrian Grange
This is the first patch to add superblock (32x32) coding order capabilities. It does not yet do any mode selection at the SB level, that will follow in a further patch. This patch encodes rows of SBs rather than MBs, each SB contains 2x2 MBs. Two intra prediction modes have been disabled since they require reconstructed data for the above-right MB which may not have been encoded yet (e.g. for the bottom right MB in each SB). Results on the one test clip I have tried (720p GIPS clip) suggest that it is somewhere around 0.2dB worse than the baseline version, so there may be bugs. It has been tested with no experiments enabled and with the following 3 experiments enabled: --enable-enhanced_interp --enable-high_precision_mv --enable-sixteenth_subpel_uv in each case the decode buffer matches the recon buffer (using "cmp" to compare the dumped/decoded frames). Note: Testing these experiments individually created errors. Some problems were found with other experiments but it is unclear what state these experiments are in: --enable-comp_intra_pred --enable-newentropy --enable-uvintra This code has not been extensively tested yet, so there is every likelihood that further bugs remain. I also intend to do some code cleanup & refactoring in tandem with the next patch that adds the 32x32 modes. Change-Id: I1eba7f740a70b3510df58db53464535ef881b4d9
2012-03-21Making subpel filters switchable at frame levelDeb Mukherjee
Various refactoring to make the subpel motion compensation filters switchable by a frame level field. Two types of 8-tap filters are supported in addition to the existing bilinar and sixtap filters. One is the default 8-tap and the other has a sharper cut-off for use with frames with substantial edge content. Patch 2: Added a preliminary strategy for filter selection based on edginess detecton. Also includes some filter changes. Change-Id: I866085bda5ae143cfdf2ec88157feaabdf7bd63a
2012-03-21Adding contextual coding of mb_skip_coeff flag.Deb Mukherjee
Using contextual coding of the mkb_skip_coeff flag using the values of this flag from the left and above. There is a small improvement of about 0.15% on Derf: http://www.corp.google.com/~debargha/vp8_results/mbskipcontext.html Refactored to use pred_common.c by adding a new context type. Results on HD set (about 0.66% improvement): http://www.corp.google.com/~debargha/vp8_results/mbskipcontext_hd.html Incliding missing refactoring to use the pred_common utilities. Change-Id: I95373382d429b5a59610d77f69a0fea2be628278
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-03-07removed duplicate a head fileYaowu Xu
Removed the copy in encoder and changed to use the one in common Change-Id: Ief0985a50ffd6053a269638fd4816b055ca273ec
2012-03-05Changed how UV r/d estimates are done for Intra ModesYaowu Xu
The commit changed to compute UV intra RD estimates for 4x4 and 8x8 separately to be used in mode decision for MB modes associated with the appropriate transform size respectively. Now finally after many other changes related 8x8 quantizer zbin boost and zbin_mode_boost, this change overall helps the HD(with 8x8) by around ~.13%. (avg .13% glb .13% ssim .17%) The commit also has a few changes for eliminating compiler warnings. Change-Id: Ibab35dad44820c87e6b44799c66f8d519cc37344
2012-03-01Merge t8x8 experimentsYaowu Xu
Change-Id: I8e9b6b154e1a0d0cb42d596366380d69c00ac15f