summaryrefslogtreecommitdiff
path: root/vp9/encoder
AgeCommit message (Collapse)Author
2013-02-11butterfly inverse 4x4 ADSTJingning Han
fixed format issues. Implement the inverse 4x4 ADST using 9 multiplications. For this particular dimension, the original ADST transform can be factorized into simpler operations, hence is retained. Change-Id: Ie5d9749942468df299ab74e90d92cd899569e960
2013-02-11Merge "Port sadNxNx4d functions to x86inc.asm." into experimentalRonald S. Bultje
2013-02-11Change rd thresholds and add speed trade off flags.Paul Wilkins
Experimental tweaks to various thresholds to measure quality / speed trade off. Add flag that allows static segmentation to be turned off and disables it unless in the second pass of a two pass encode. Change-Id: I219702ffe858412a83db801cbbbd869924b8c61b
2013-02-09Merge "Nearest / Zero Mv default entropy tweak." into experimentalPaul Wilkins
2013-02-08Merge "Pass macroblock index to pick inter functions" into experimentalJohn Koleszar
2013-02-08Port sadNxNx4d functions to x86inc.asm.Ronald S. Bultje
Change-Id: Ic639f5742f7a007753d7a3fa5c66235172eb31d8
2013-02-08Add sad64x64 and sad32x32 SSE2 versions.Ronald S. Bultje
Also port the 4x4, 16x16, 8x16 and 16x8 versions to x86inc.asm; this makes them all slightly faster, particularly on x86-64. Remove SSE3 sad16x16 version, since the SSE2 version is now faster. About 1.5% overall encoding speedup. Change-Id: Id4011a78cce7839f554b301d0800d5ca021af797
2013-02-08Make cost_coeffs() more efficient.Ronald S. Bultje
Cache the constant offset in one variable to prevent re-loading that in each loop iteration, and mark the function as inline so we can use the fact that the transform size is always known in the caller. Almost 1% faster encoding overall. Change-Id: Id78325a60b025057d8f4ecd9003a74086ccbf85a
2013-02-08Pass macroblock index to pick inter functionsJohn Koleszar
Pass the current mb row and column around rather than the recon_yoffset and recon_uvoffset, since those offsets will change from predictor to predictor, based on the reference frame selection. Change-Id: If3f9df059e00f5048ca729d3d083ff428e1859c1
2013-02-08Merge changes Icd1a2a5a,I204d17a1,I3ed92117 into experimentalJohn Koleszar
* changes: Initial support for resolution changes on P-frames Avoid allocating memory when resizing frames Adds a test for the VP8E_SET_SCALEMODE control
2013-02-08Merge changes Ife0d8147,I7d469716,Ic9a5615f into experimentalJohn Koleszar
* changes: Restore SSSE3 subpixel filters in new convolve framework Convert subpixel filters to use convolve framework Add 8-tap generic convolver
2013-02-08Initial support for resolution changes on P-framesJohn Koleszar
Allows inter-frames to change resolution. Currently these are almost equivalent to keyframes, as only intra prediction modes are allowed, but without the other context resets that occur on keyframes. Change-Id: Icd1a2a5af0d9462cc792588427b0a1f5b12e40d3
2013-02-08Avoid allocating memory when resizing framesJohn Koleszar
As long as the new frame is smaller than the size that was originally allocated, we don't need to free and reallocate the memory allocated. Instead, do the allocation on the size of the first frame. We could make this passed in from the application instead, if we wanted to support external upscaling. Change-Id: I204d17a130728bbd91155bb4bd863a99bb99b038
2013-02-08Adds a test for the VP8E_SET_SCALEMODE controlJohn Koleszar
Tests that the external interface to set the internal codec scaling works as expected. Also updates the test to pull the height from the decoded frame size rather than parsing the keyframe header, in anticipation of allowing resolution changes on non-keyframes. Change-Id: I3ed92117d8e5288fbbd1e7b618f2f233d0fe2c17
2013-02-08Nearest / Zero Mv default entropy tweak.Paul Wilkins
Tweak to default mode context to account for the fact that when there are no non zero motion candidates Nearest is now the preferred mode for coding a 0,0 vector. Also resolve duplicate function name and typos. Change-Id: I76802788d46c84e3d1c771be216a537ab7b12817
2013-02-07move dct/idct constants to a header fileYaowu Xu
also removed some un-unsed functions. Change-Id: Ie363bcc8d94441d054137d2ef7c4fe59f56027e5
2013-02-07Butterfly ADST based hybrid transformJingning Han
Refactor the 8x8 inverse hybrid transform. It is now consistent with the new inverse DCT. Overall performance loss (due to the use of this variant ADST, and the rounding errors in the butterfly implementation) for std-hd is -0.02. Fixed BUILD warning. Devise a variant of the original ADST, which allows butterfly computation structure. This new transform has kernel of the form: sin((2k+1)*(2n+1) / (4N)). One of its butterfly structures using floating-point multiplications was reported in Z. Wang, "Fast algorithms for the discrete W transform and for the discrete Fourier transform", IEEE Trans. on ASSP, 1984. This patch includes the butterfly implementation of the inverse ADST/DCT hybrid transform of dimension 8x8. Change-Id: I3533cb715f749343a80b9087ce34b3e776d1581d
2013-02-07Added skip switches for SB32 and SB64Paul Wilkins
Added switches and code to skip/breakout from doing SB32 and SB64 tests based on whether the 16x16 MB tests used split modes. Also to optionally skip 64x64 if 16x16 was chosen over 32x32. Impact varies depending on clip from a few % up to almost 50% on encode speed. Only the split mode breakout is currently enabled. Change-Id: Ib5836140b064b350ffa3057778ed2cadcc495cf8
2013-02-06Use fdct8x4 instead of fdct4x4 where the block size allows it.Ronald S. Bultje
This allows for faster SIMD implementations in the future (currently there is no speed impact). Change-Id: I732647e9148b5dcb44e6bc8728138f0141218329
2013-02-06Use configure checks for various inline keywords.Ronald S. Bultje
Change-Id: I8508f1a3d3430f998bb9295f849e88e626a52a24
2013-02-06Add sse2 versions of sub_pixel_variance{32x32,64x64}.Ronald S. Bultje
7.5% faster overall encoding. Change-Id: Ie9bb7f9fdf93659eda106404cb342525df1ba02f
2013-02-06Merge "Reindent segmentation code." into experimentalRonald S. Bultje
2013-02-06Reindent segmentation code.Ronald S. Bultje
Indentation was off by 2 spaces for this particular block. Change-Id: I1e587b7ad3eff77ade5521252d20c7bb2daa0f6d
2013-02-06Eliminate tautologyJohn Koleszar
Unreachable code that does nothing anyway removed forever. Change-Id: I14105d2dd9dbc9d558f36464055e350dbeb45488
2013-02-06Merge "Change definition of NearestMV." into experimentalPaul Wilkins
2013-02-05Fix mismatch after merge of the tiling patch.Ronald S. Bultje
Change-Id: I8ecc178b4d4069e721c7fec6d7631c00e4a3e5d5
2013-02-05[WIP] Add column-based tiling.Ronald S. Bultje
This patch adds column-based tiling. The idea is to make each tile independently decodable (after reading the common frame header) and also independendly encodable (minus within-frame cost adjustments in the RD loop) to speed-up hardware & software en/decoders if they used multi-threading. Column-based tiling has the added advantage (over other tiling methods) that it minimizes realtime use-case latency, since all threads can start encoding data as soon as the first SB-row worth of data is available to the encoder. There is some test code that does random tile ordering in the decoder, to confirm that each tile is indeed independently decodable from other tiles in the same frame. At tile edges, all contexts assume default values (i.e. 0, 0 motion vector, no coefficients, DC intra4x4 mode), and motion vector search and ordering do not cross tiles in the same frame. t log Tile independence is not maintained between frames ATM, i.e. tile 0 of frame 1 is free to use motion vectors that point into any tile of frame 0. We support 1 (i.e. no tiling), 2 or 4 column-tiles. The loopfilter crosses tile boundaries. I discussed this briefly with Aki and he says that's OK. An in-loop loopfilter would need to do some sync between tile threads, but that shouldn't be a big issue. Resuls: with tiling disabled, we go up slightly because of improved edge use in the intra4x4 prediction. With 2 tiles, we lose about ~1% on derf, ~0.35% on HD and ~0.55% on STD/HD. With 4 tiles, we lose another ~1.5% on derf ~0.77% on HD and ~0.85% on STD/HD. Most of this loss is concentrated in the low-bitrate end of clips, and most of it is because of the loss of edges at tile boundaries and the resulting loss of intra predictors. TODO: - more tiles (perhaps allow row-based tiling also, and max. 8 tiles)? - maybe optionally (for EC purposes), motion vectors themselves should not cross tile edges, or we should emulate such borders as if they were off-frame, to limit error propagation to within one tile only. This doesn't have to be the default behaviour but could be an optional bitstream flag. Change-Id: I5951c3a0742a767b20bc9fb5af685d9892c2c96f
2013-02-05Merge "Add SSE3 versions for sad{32x32,64x64}x4d functions." into experimentalRonald S. Bultje
2013-02-05Merge "rewrite 4x4 idct and fdct" into experimentalYaowu Xu
2013-02-05Add SSE3 versions for sad{32x32,64x64}x4d functions.Ronald S. Bultje
Overall encoding about 15% faster. Change-Id: I176a775c704317509e32eee83739721804120ff2
2013-02-05Convert subpixel filters to use convolve frameworkJohn Koleszar
Update the code to call the new convolution functions to do subpixel prediction rather than the existing functions. Remove the old C and assembly code, since it is unused. This causes a 50% performance reduction on the decoder, but that will be resolved when the asm for the new functions is available. There is no consensus for whether 6-tap or 2-tap predictors will be supported in the final codec, so these filters are implemented in terms of the 8-tap code, so that quality testing of these modes can continue. Implementing the lower complexity algorithms is a simple exercise, should it be necessary. This code produces slightly better results in the EIGHTTAP_SMOOTH case, since the filter is now applied in only one direction when the subpel motion is only in one direction. Like the previous code, the filtering is skipped entirely on full-pel MVs. This combination seems to give the best quality gains, but this may be indicative of a bug in the encoder's filter selection, since the encoder could achieve the result of skipping the filtering on full-pel by selecting one of the other filters. This should be revisited. Quality gains on derf positive on almost all clips. The only clip that seemed to be hurt at all datarates was football (-0.115% PSNR average, -0.587% min). Overall averages 0.375% PSNR, 0.347% SSIM. Change-Id: I7d469716091b1d89b4b08adde5863999319d69ff
2013-02-05rewrite 4x4 idct and fdctYaowu Xu
This commit changes the 4x4 iDCT to use same algorithm & constants as other iDCTs. The 4x4 fDCT is also changed to be based on the new iDCT. Change-Id: Ib1a902693228af903862e1f5a08078c36f2089b0
2013-02-05Change definition of NearestMV.Paul Wilkins
This commit makes the NearestMV match the chosen best reference MV. It can be a 0,0 or non zero vector which means the the compound nearest mv mode can combine a 0,0 and a non zero vector. Change-Id: I2213d09996ae2916e53e6458d7d110350dcffd7a
2013-02-04Re-factor code for rd thresholds.Paul Wilkins
Separate out code to set the main encode speed related rd thresholds. Some values changed from the initial defaults for various new modes. Quality test results pending but even the addition of some further non-zero defaults helps encode speed somewhat in limited testing on derf clips. Adjustment of thresholds for quality / speed tradeoff to follow. Change-Id: I117ee473157e151a1b93193d5f393449328de20d
2013-02-01Merge "fix a small bug in 16 point forward dct" into experimentalYaowu Xu
2013-01-31fix a small bug in 16 point forward dctYaowu Xu
The commit fixes a minor error in 16 point fdct where in a rotation can produce result of -1 instead of 0. Change-Id: I45aac4a52bcd06225c6d04e643547a13e1c1aade
2013-01-30Merge "Adding a frame parallel decoding mode" into experimentalDeb Mukherjee
2013-01-30Merge "don't code the branch for the predicted seg_id if that flag is ↵Ronald S. Bultje
false." into experimental
2013-01-30don't code the branch for the predicted seg_id if that flag is false.Ronald S. Bultje
Change-Id: Icb6e21dc0c2d9918faa33c8bf70943660df7ad88
2013-01-29Default superblock skip flag to 32x32 for skip-blocks.Ronald S. Bultje
This is identical to the later decisions made in encode_superblock(). This commit doesn't actually change anything, but makes the mbmi state more consistent between the RD loop and the final encode result. Change-Id: I9e735afb7c5a52e5b61728cb88c67ef9b9bf59be
2013-01-29Reset skip flag in superblock RD loop.Ronald S. Bultje
This is the superblock equivalent of commit 290b83a. Change-Id: Ib3945dd9e992fa9ec1fdea5a11e17a3cc0e37637
2013-01-29Merge "Fix block pointer corruption in intra8x8 prediction with 4x4 ↵Ronald S. Bultje
transform." into experimental
2013-01-29Merge "Remove eob_max_offset markers." into experimentalPaul Wilkins
2013-01-29Merge "Segment Skip Flag" into experimentalPaul Wilkins
2013-01-29Fix block pointer corruption in intra8x8 prediction with 4x4 transform.Ronald S. Bultje
The RD loop would change the pointer after the first mode (DC) was tested, leading to corrupt block objects being provided for the others. This would essentially render the i8x8 predictor useless. Change-Id: I16c5906ca64fb34878ac32ce59af8974e4582bb8
2013-01-29Remove eob_max_offset markers.Paul Wilkins
Remove eob_max_offset markers and replace with the generic skip_block flag to indicate to the quantizer that all coeffs to be set to 0 and eob position set to 0; Change-Id: Id477e8f8d4ec1a5562758904071013c24b76bfd7
2013-01-28Segment Skip FlagPaul Wilkins
First step in simplifying the segment mode and segment EOB flags into a simpler segment skip flag that implies 0,0 mv and EOB at position 0. Change-Id: Ib750cac31a7a02dc21082580498efd9f7d8d72a5
2013-01-28Merge "Simplify Zero bin and zero bin run code." into experimentalPaul Wilkins
2013-01-28Simplify Zero bin and zero bin run code.Paul Wilkins
Simplification to eliminate a number of very large data data structures. All zero run, zbin boosts for different transform sizes are now limited to a maximum run length of 15 before they max out the boost. Some further work still needs be done to refactor, rationalize and optimize the multiple quantizer functions. The simplification coupled with tweaks to the 16 element array now used for all transform sizes, has minimal effect on quality. Change-Id: I6f3948b8ca0418b60d4db9030ff19026a34ed423
2013-01-25Adding a frame parallel decoding modeDeb Mukherjee
Adds a flag to disable features that would inhibit frame parallel decoding. This includes backward adaptation and MV sorting based on search in ref frame buffer. Also includes some minor clean-ups. Change-Id: I434846717a47b7bcb244b37ea670c5cdf776f14d