summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeintra.c
AgeCommit message (Collapse)Author
2013-04-25Remove diff from BLOCKDJohn Koleszar
The underlying storage for these buffers is in the per-plane MACROBLOCKD area, so read it from there directly. Change-Id: Id6bd835117fdd9dea07db95ad06eff9f12afaaf7
2013-04-25Remove BLOCK structureJohn Koleszar
All members can be referenced from their per-plane counterparts, and removes assumptions about 24 blocks per macroblock. Change-Id: I593fb0715e74cd84b48facd1c9b18c3ae1185d4b
2013-04-23Remove coeff from BLOCKJohn Koleszar
Lookup the data per-plane from the MACROBLOCK struct. Change-Id: I9253c4d3cf886aa9ab4aeab23a2156bfcf994ede
2013-04-23Move src_diff to per-plane MACROBLOCK dataJohn Koleszar
First in a series of commits making certain MACROBLOCK members addressable per-plane. This commit also refactors the block subtraction functions vp9_subtract_b, vp9_subtract_sby_c, etc to be loops-over-planes and variable subsampling aware. Change-Id: I371d092b914ae0a495dfd852ea1a3d2467be6ec3
2013-04-22Remove vp9_recon_intra_mbuvJohn Koleszar
Use common vp9_recon_sbuv instead. Change-Id: I146f79adfdfda2b52257a52fa783727f12afa246
2013-04-19Move dst to per-plane MACROBLOCKD dataJohn Koleszar
First in a series of commits moving the framebuffers pointers to per-plane data, so that they can be indexed numerically rather than by name. Change-Id: I6e0d60fd4d51e6375c384eb7321776564df21775
2013-04-19Remove vp9_recon_mb{,y}John Koleszar
Use the common sb functions instead. Change-Id: I4fa0a8ee3c6ada56271dd09bf895b97642f55858
2013-04-18Make the use of pred buffers consistent in MB/SBJingning Han
Use in-place buffers (dst of MACROBLOCKD) for macroblock prediction. This makes the macroblock buffer handling consistent with those of superblock. Remove predictor buffer MACROBLOCKD. Change-Id: Id1bcd898961097b1e6230c10f0130753a59fc6df
2013-04-11Merge "WIP: removing predictor buffer usage from decoder" into experimentalScott LaVarnway
2013-04-11WIP: removing predictor buffer usage from decoderScott LaVarnway
This patch will use the dest buffer instead of the predictor buffer. This will allow us in future commits to remove the extra mem copy that occurs in the dequant functions when eob == 0. We should also be able to remove extra params that are passed into the dequant functions. Change-Id: I7241bc1ab797a430418b1f3a95b5476db7455f6a
2013-04-11Remove unused macroblock versions of reconstruction functions.Ronald S. Bultje
More specifically, remove vp9_quantize_mb*, vp9_optimize_mb*, vp9_inverse_transform_mb* and vp9_transform_mb*. Instead, use the generic _sb* functions that take a size argument, and call them with BLOCK_SIZE_MB16X16. Change-Id: I33024afea95d3a23ffbc1df7da426e4645110f29
2013-04-04Move EOB to per-plane dataJohn Koleszar
Continue migrating data from BLOCKD/MACROBLOCKD to the per-plane structures. Change-Id: Ibbfa68d6da438d32dcbe8df68245ee28b0a2fa2c
2013-04-04Move qcoeff, dqcoeff from BLOCKD to per-plane dataJohn Koleszar
Start grouping data per-plane, as part of refactoring to support additional planes, and chroma planes with other-than 4:2:0 subsampling. Change-Id: Idb76a0e23ab239180c818025bae1f36f1608bb23
2013-03-26Add col/row-based coefficient scanning patterns for 1D 8x8/16x16 ADSTs.Ronald S. Bultje
These are mostly just for experimental purposes. I saw small gains (in the 0.1% range) when playing with this on derf. Change-Id: Ib21eed477bbb46bddcd73b21c5c708a5b46abedc
2013-03-16Context-pred fix to not use top/left on edgesDeb Mukherjee
This fix resolves some of the mismatch issues being seen recently. While this is the right thing to do when tiling is used for this experiment, it is not the underlying cause of the the mismatches. Something else is causing writing outside of the allowable frame area in the encoder leading to this mismatch. Change-Id: If52c6f67555aa18ab8762865384e323b47237277
2013-03-07Re-add support for ADST in superblocks.Ronald S. Bultje
This also changes the RD search to take account of the correct block index when searching (this is required for ADST positioning to work correctly in combination with tx_select). Change-Id: Ie50d05b3a024a64ecd0b376887aa38ac5f7b6af6
2013-03-07Coding con-zero count rather than EOB for coeffsDeb Mukherjee
This patch revamps the entropy coding of coefficients to code first a non-zero count per coded block and correspondingly remove the EOB token from the token set. STATUS: Main encode/decode code achieving encode/decode sync - done. Forward and backward probability updates to the nzcs - done. Rd costing updates for nzcs - done. Note: The dynamic progrmaming apporach used in trellis quantization is not exactly compatible with nzcs. A suboptimal approach has been used instead where branch costs are updated to account for changes in the nzcs. TODO: Training the default probs/counts for nzcs Change-Id: I951bc1e22f47885077a7453a09b0493daa77883d
2013-03-04Make superblocks independent of macroblock code and data.Ronald S. Bultje
Split macroblock and superblock tokenization and detokenization functions and coefficient-related data structs so that the bitstream layout and related code of superblock coefficients looks less like it's a hack to fit macroblocks in superblocks. In addition, unify chroma transform size selection from luma transform size (i.e. always use the same size, as long as it fits the predictor); in practice, this means 32x32 and 64x64 superblocks using the 16x16 luma transform will now use the 16x16 (instead of the 8x8) chroma transform, and 64x64 superblocks using the 32x32 luma transform will now use the 32x32 (instead of the 16x16) chroma transform. Lastly, add a trellis optimize function for 32x32 transform blocks. HD gains about 0.3%, STDHD about 0.15% and derf about 0.1%. There's a few negative points here and there that I might want to analyze a little closer. Change-Id: Ibad7c3ddfe1acfc52771dfc27c03e9783e054430
2013-02-28Code cleanup.Dmitry Kovalev
Removing redundant 'extern' keyword, better formatting, code simplification. Change-Id: I132fea14f08c706ee9ea147d19464d03f833f25b
2013-02-27Move eob from BLOCKD to MACROBLOCKD.Ronald S. Bultje
Consistent with VP8. Change-Id: I8c316ee49f072e15abbb033a80e9c36617891f07
2013-02-25Changing pitch value meaning for fht and iht transforms.Dmitry Kovalev
Pitch now means the number of elements, not the number of bytes. Change-Id: Idb9f2f012e39b09d596a3cc1802305a80b7c13af
2013-02-25clean up forward and inverse hybrid transformJingning Han
Rebased. Remove the old matrix multiplication transform computation. The 16x16 ADST/DCT can be switched on/off and evaluated by setting ACTIVE_HT16 300/0 in vp9/common/vp9_blockd.h. Change-Id: Icab2dbd18538987e1dc4e88c45abfc4cfc6e133f
2013-02-21Forward butterfly hybrid transformJingning Han
This patch includes 4x4, 8x8, and 16x16 forward butterfly ADST/DCT hybrid transform. The kernel of 4x4 ADST is sin((2k+1)*(n+1)/(2N+1)). The kernel of 8x8/16x16 ADST is of the form sin((2k+1)*(2n+1)/4N). Change-Id: I8f1ab3843ce32eb287ab766f92e0611e1c5cb4c1
2013-02-13Merge "enable bitstream lossless support" into experimentalYaowu Xu
2013-02-13enable bitstream lossless supportYaowu Xu
1. Added a bit in frame header to to indicate if a frame is encoded in lossless mode, so decoder does not make the decision based on Q0 2. Minor changes to make sure that lossy coding works same as when the lossless experiment is not enabled. 3. Renamed function pointers for transforms to be consistent, using prefix fwd_txm and inv_txm for forward and inverse respectively To encode in lossless mode, using "--lossless=1 --min-q=0 --max-q=0" with vpxenc. Change-Id: Ifae53b26d2ffbe378d707e29d96817b8a5e6c068
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-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-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-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-01-14Remove compound intra-intra experiment.Ronald S. Bultje
This experiment gives little gains and adds relatively much code complexity (and it hinders other experiments), so let's get rid of it. Change-Id: Id25e79a137a1b8a01138aa27a1fa0ba4a2df274a
2012-12-26Build fixes to merge vp9-preview into masterJohn Koleszar
Various fixups to resolve issues when building vp9-preview under the more stringent checks placed on the experimental branch. Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
2012-12-12Improved vp9_ihtllm_cScott LaVarnway
As suggested by Yaowu, we can use eob to reduce the complexity of the vp9_ihtllm_c function. For the 1080p test clip used, the decoder performance improved by 17%. Change-Id: I32486f2f06f9b8f60467d2a574209aa3a3daa435
2012-11-29unused variableJim Bankoski
Change-Id: I1302a6eaa840d419e8bb9ad0673e42ef139d3fee
2012-11-29ihtllm moves to rtcdJim Bankoski
clears up some warnings Change-Id: I9899637497c6ad7519f098e055ab98580ae6d688
2012-11-28more rtcd cleanupJim Bankoski
Change-Id: Ieefd76e164ca4aa87597da0412977614ddfbacb7
2012-11-28Fixing 8x8/4x4 ADST for intra modes with tx selectDeb Mukherjee
This patch allows use of 8x8 and 4x4 ADST correctly for Intra 16x16 modes and Intra 8x8 modes when the block size selected is smaller than the prediction mode. Also includes some cleanups and refactoring. Rebase. Change-Id: Ie3257bdf07bdb9c6e9476915e3a80183c8fa005a
2012-11-28fixed includes to be fully specifiedJim Bankoski
Change-Id: Ia1cce221f8511561b9cbd8edb7726fbc286ff243
2012-11-27Add vp9_ prefix to all vp9 filesJohn Koleszar
Support for gyp which doesn't support multiple objects in the same static library having the same basename. Change-Id: Ib947eefbaf68f8b177a796d23f875ccdfa6bc9dc