summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeintra.c
AgeCommit message (Collapse)Author
2013-11-15Removing vp9_encodeintra.{h, c} files.Dmitry Kovalev
There was only one function in *.c file, so moving it to vp9_encodemb.c. Change-Id: I728859d08b3d6c05c33c1c5b21f0ea1d0e0f83af
2013-10-04cpp lint issues resolved in vp9_encodeintra.cJim Bankoski
Change-Id: Ib6a8360d24f44eeaec12c5055568382a105dc235
2013-09-11New mode_info_context storage -- undo revertScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of pointers to MODE_INFO structs. The MODE_INFO structs are now stored as a stream (decoder only), eliminating unnecessary copies and is a little more cache friendly. Change-Id: I031d376284c6eb98a38ad5595b797f048a6cfc0d
2013-09-09Revert "New mode_info_context storage"James Zern
This reverts commit dae17734ece414091ba1184f7becd0aa6c0004f1 Encode crashes, leaks and increases integer overflow errors. Change-Id: I595aa2649bb8d0b6552ff91652837a74c103fda2
2013-09-06New mode_info_context storageScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of a pointer to a MODE_INFO struct and a "in the image" flag. The MODE_INFO structs are now stored as a stream, eliminating unnecessary copies and is a little more cache friendly. For the test clips used, the decoder performance improved by ~4.3% (1080p) and ~9.7% (720p). Patch Set 2: Re-encoded clips with latest. Now ~1.7% (1080p) and 5.9% (720p). Change-Id: I846f29e88610fce2523ca697a9a9ef2a182e9256
2013-08-27Renaming txfm_size to tx_size.Dmitry Kovalev
Change-Id: I752e374867d459960995b24d197301d65ad535e3
2013-08-16Removing unused or redundant arguments from *_args structures.Dmitry Kovalev
Redundant dst, pre[2] from build_inter_predictors_args, unused cm from encode_b_args. Change-Id: I2c476cd328c5c0cca4c78ba451ca6ba2a2c37e2d
2013-08-05Replacing long block size enum values with shorter ones (2).Dmitry Kovalev
Change-Id: I428c4d42212b757112e3acfe5b81314cfbb5fd6b
2013-07-15Skip duplicate block encoding in the rd loopJingning Han
This speed feature allows the encoder to largely remove the spatial dependency between blocks inside a 64x64 superblock, thereby removing the need to repeatedly encode superblocks per partition type in the rate-distortion optimization loop. A major challenge lies in the intra modes tested in the rate-distortion optimization loop. The subsequent blocks do not have access to the reconstructed boundary pixels without the intermediate coding steps. This was resolved by using the original pixels for intra prediction in the rd loop, followed by an appropriately designed distortion modeling on the quantization parameters. Experiments also suggested that the performance impact is more discernible at lower bit-rate/psnr settings. Hence a quantizer dependent threshold is applied to deactivate skip of block coding. For bus_cif at 2000 kbps, speed 0: runtime 269854ms -> 237774ms (12% speed-up) at 0.05dB performance loss. speed 1: runtime 65312ms -> 61536ms, (7% speed-up) at 0.04dB performance loss. This operation is currently turned on in settings of speed 1. Change-Id: Ib689741dfff8dd38365d8c1b92860a3e176f56ec
2013-06-28Minor cleanupsYaowu Xu
Change-Id: I379617c1c731a686b3f7e032b8805860c1055b12
2013-06-17Removing vp9_invtrans.{c, h} files.Dmitry Kovalev
Moving single function from vp9_invtrans.c to vp9_encodemb.c. Change-Id: I26bf6bb90de342a3036c0dbfba78a7dd75a61fe7
2013-06-08Fix firstpass if framesize is not a multiple of 16.Ronald S. Bultje
Change-Id: Iec41736c2b6140715f90f40de5ae6cf52497a9b8
2013-06-06Change ref frame coding.Ronald S. Bultje
Code intra/inter, then comp/single, then the ref frame selection. Use contextualization for all steps. Don't code two past frames in comp pred mode. Change-Id: I4639a78cd5cccb283023265dbcc07898c3e7cf95
2013-05-30Changed to use new intra coding calls for 1st passYaowu Xu
And removed 1st pass specific version of intra coding funcitons Change-Id: Ia54e67c71d750957cb2efda8360bf2133468498a
2013-05-27a few clean-upsYaowu Xu
1. remove prediction mode conversion 2. unified bmode, same for key and non-key frame 3. set I4X4_PRED count for pdf to 0, as I4X4_PRED is no longer coded ever. It is determined by ref_frame and block partition Change-Id: If5b282957c24339b241acdb9f2afef85658fe47d
2013-05-27Reduce bmi buffer length from 16 to 4Jingning Han
This commit removes the use of bmi_ in the first-pass encoding by forcing encode_intra4x4block_ to use DC_PRED, followed by DCT_DCT only, as John suggested. This makes the need for bmi buffer only up to 4 entries, instead of 16. Change-Id: I3410007dfae789ee46a09ae20c39d3ce3c7954aa
2013-05-22Generalized intra 4x4 encoding for all sizesYaowu Xu
Change-Id: I1b86744fa247233c8df031b3f4b87b212c8dd094
2013-05-20WIP: 4x4 idct/recon mergeScott LaVarnway
This patch eliminates the intermediate diff buffer usage by combining the short idct and the add residual into one function. The encoder can use the same code as well. Change-Id: I296604bf73579c45105de0dd1adbcc91bcc53c22
2013-05-07Deprecate the newbintramode experiment.Paul Wilkins
Clean out code relating to newbintramode. Change-Id: Ie91f4f156cdf60ce0da8ca407c1c9cb00c7d0705
2013-05-07Merge SB8X8 into the codebaseJingning Han
Pull sb8x8 out of experimental list. verified via borg run tests. Fixed unit test failures. Change-Id: I12a4bbd17395930580c048ab68becad1ffe46e76
2013-05-04Fix first-pass intra4x4 for sb8x8 experiment.Ronald S. Bultje
Change-Id: I1df17f45721c690d157800daa6a0b377e3d32bc2
2013-05-03Separate transform and quant from vp9_encode_sbJohn Koleszar
This allows removing a large number of transform size specific functions, as well as supporting 444/alpha by routing all code through the subsampling-aware path. Change-Id: Ieb085cebe9f37f24fc24de179898b22abfda08a4
2013-04-30Make vp9_optimize_sb* commonJohn Koleszar
Unify the various vp9_optimize_sb functions into one that handles all transform sizes. Change-Id: I48b642fbfb3e72cc2e0bcf1d0317a80a80547882
2013-04-30sb8x8 integration in rd loop.Ronald S. Bultje
Work-in-progress, not yet ready for review. TODO items: - bitstream writing (encoder) and reading (decoder) - decoder reconstruction Change-Id: I5afb7284e7e0480847b47cd0097cb469433c9081
2013-04-29Separate I4X4_PRED coding from macroblock modulesJingning Han
Separate the functionality of I4X4_PRED from decode_mb. Use decode_atom_intra instead, to enable recursive partition of superblock down to 8x8. Change-Id: Ifc89a3be82225398954169d0a839abdbbfd8ca3b
2013-04-26Remove BLOCKD structureJohn Koleszar
All members can be referenced from their per-plane counterparts, and removes assumptions about 24 blocks per macroblock. Change-Id: I7ff2fa72d22c29163eb558981c8193765a8113d9
2013-04-26Remove destination pointers from BLOCKDJohn Koleszar
Access these members from MACROBLOCKD instead. Change-Id: I7907230dd473ff12ebe182b9280d8b7f12a888c4
2013-04-26Merge "quantize: make 4x4, 8x8 common with larger transforms" into experimentalJohn Koleszar
2013-04-26Removed bmi from blockdScott LaVarnway
This originally was "Removed update_blockd_bmi()". Now, this patch removed bmi from blockd and uses the bmi found in mode_info_context. Eliminates unnecessary bmi copies between blockd and mode_info_context. Change-Id: I287a4972974bb363f49e528daa9b2a2293f4bc76
2013-04-25quantize: make 4x4, 8x8 common with larger transformsJohn Koleszar
There were 4 variants of the quantize loop in vp9_quantize.c, now there is 1. Change-Id: Ic853393411214b32d46a6ba53769413bd14e1cac
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