summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_tokenize.c
AgeCommit message (Collapse)Author
2013-05-29Balancing coef-tree to reduce bool decodesDeb Mukherjee
This patch changes the coefficient tree to move the EOB to below the ZERO node in order to save number of bool decodes. The advantages of moving EOB one step down as opposed to two steps down in the other parallel patch are: 1. The coef modeling based on the One-node becomes independent of the tree structure above it, and 2. Fewer conext/counter increases are needed. The drawback is that the potential savings in bool decodes will be less, but assuming that 0s are much more predominant than 1's the potential savings is still likely to be substantial. Results on derf300: -0.237% Change-Id: Ie784be13dc98291306b338e8228703a4c2ea2242
2013-05-29Residual coding to cache energy class of tokens.Sami Pietila
Proposal for tuning the residual coding by changing how the context from previous tokens is calculated. Storing the energy class of previous tokens instead of the token itself eases the critical path of HW implementations. Change-Id: I6d71d856b84518f6c88de771ddd818436f794bab
2013-05-23Merge Scatter Scan experiment.Paul Wilkins
Removal from under configure flag. A bit renaming Change-Id: I2213229dfe852001dfec16b149f47c52ce88f3aa
2013-05-23Merge 4x4 block level partition into codebaseJingning Han
Move 4x4/4x8/8x4 partition coding out of experimental list. This commit fixed the unit test failure issues. It also resolved the merge conflicts between 4x4 block level partition and iterative motion search for comp_inter_inter. Change-Id: I898671f0631f5ddc4f5cc68d4c62ead7de9c5a58
2013-05-22Using 128 entry look up table for coef modelsDeb Mukherjee
Reverts to using 128 bit LUT for the coef models rather than 48 to ease hardware implementation. Also incorporates some cleanups including removing various hooks to support different lookup tables based on block_type and ref_type. Change-Id: I54100c120cca07a2ebd3a7776bc4630fa6a153f6
2013-05-21Merging the model coef prob experimentDeb Mukherjee
Merges the experiment. Change-Id: I4eb19af6de6df6aa3a96a2e82f231d47ed9b3ae9
2013-05-20Updating the model coef experimentDeb Mukherjee
Cleans up the experiment. Actually uses reduced counts for backward updates, and reduced number of probabilities in the context. No change in bitstream when the experiment is on. Between expt on and off: derfraw300 is down only -0.062% (which is better than when expts were run previously). Change-Id: I55285a049a0c22810bdb42914212ab5a4f8521b5
2013-05-14Enable recursive partition down to 4x4Jingning Han
This commit allows the rate-distortion optimization recursion at encoder to go down to 4x4 block size. It deprecates the use of I4X4_PRED and SPLITMV syntax elements from bit-stream writing/reading. Will remove the unused probability models in the next patch. The partition type search and bit-stream are now capable of supporting the rectangular partition of 8x8 block, i.e., 8x4 and 4x8. Need to revise the rate-distortion parts to get these two partition tested in the rd loop. Change-Id: I0dfe3b90a1507ad6138db10cc58e6e237a06a9d6
2013-05-13Change to band calculation.Paul Wilkins
Change band calculation back to simpler model based on the order in which coefficients are coded in scan order not the absolute coefficient positions. With the scatter scan experiment enabled the results were appear broadly neutral on derf (-0.028) but up a little on std-hd +0.134). Without the scatterscan experiment on the results were up derf as well. Change-Id: Ie9ef03ce42a6b24b849a4bebe950d4a5dffa6791
2013-05-07Deprecate code_zerogroup experiment.Paul Wilkins
Delete code under the CONFIG_CODE_ZEROGROUP flag. Change-Id: I5fe6c7b42a5da9b73118e33594301da4129f320a
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-03Remove old_block_idx_4x4John Koleszar
Removes several instances where the old block numbering was still in use. Change-Id: Id35130591455a4abe6844613e45c0b70c1220c08
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-29Use foreach_transformed_block with tokenize_bJohn Koleszar
Updates the tokenizer to use the common block walker used by the detokenizer, to support non-4:2:0 and more than 3 planes. Change-Id: If1854117a9c7c1427349209fa2b3051ce6459dcb
2013-04-29Merge "Immigrate tokenize_mb into tokenize_sb" into experimentalJingning Han
2013-04-29Immigrate tokenize_mb into tokenize_sbJingning Han
Unify the tokenize_ function and enable configurable block size for superblock 8x8. We are immigrating the functionalities of macroblock handles into superblock ones, and eventually will remove encode_mb and decode_mb. To be continued on detokenize_ module. Change-Id: I9f81e8c2291082535cf5e0c4b662eb24fb7c8a7f
2013-04-29Change above/left_context to use an 8x8 basis.Ronald S. Bultje
Output changes slightly because of a minor bug in (at least) the sb32x16 block2above tx16x16 tables that previously existed in vp9_blockd.c. Change-Id: I624af28ac200a8322d64454cf05c79e9502968cc
2013-04-25Use b_width/height_log2 instead of mb_ where appropriate.Ronald S. Bultje
Basic assumption: when talking about transform units, use b_; when talking about macroblock indices, use mb_. Change-Id: Ifd163f595d4924ff892de4eb0401ccd56dc81884
2013-04-24Move sbsegment out of experimental listJingning Han
Move rectangular superblock coding out of experimental list. Change-Id: I96c37547d122330d666a67b4bf577ae54547857f
2013-04-23Merge "Adding get_scan_{4x4, 8x8, 16x16} functions." into experimentalDmitry Kovalev
2013-04-23Remove unused stuffing function.Ronald S. Bultje
Change-Id: I2bc8d775f8d698bf8582f4eecabc2329452e8d9b
2013-04-22Adding get_scan_{4x4, 8x8, 16x16} functions.Dmitry Kovalev
Change-Id: Id4306ef6d65d4a3984aed50b775bdf48d4f6c438
2013-04-22Removes the code_nonzerocount experimentDeb Mukherjee
This patch does not seem to give any benefits. Change-Id: I9d2b4091d6af3dfc0875f24db86c01e2de57f8db
2013-04-22End of orientation zero group experimentDeb Mukherjee
Adds an experiment that codes an end-of-orientation symbol for every eligible zero encountered in scan order. This cleans out various other sub-experiments that were part of the origiinal patch, which will be later included if found useful. Results are slightly positive on all sets (0.1 - 0.2% range). Change-Id: I57765c605fefc7fb9d1b57f1b356843602abefaf
2013-04-19Renaming vp9_extra_bit_struct to vp9_extra_bit.Dmitry Kovalev
Change-Id: Ie4713da125e954c1d30e1d4cbeb38666fce90ccc
2013-04-18Fixing member names inside TOKENVALUE and TOKENEXTRA structs.Dmitry Kovalev
Change-Id: I183ec5819d4d80966c92db36db75b8c3be0d381d
2013-04-18Merge "Replacing VP9_COMBINEENTROPYCONTEXTS macro with function." into ↵Dmitry Kovalev
experimental
2013-04-17Use BLOCK_SIZE_TYPE in foreach_ walkerJohn Koleszar
Change-Id: I655305c9e22bdd9abc893d3c40d4bc6616aa1d35
2013-04-17Fairly basic integration of rectangular blocks in encoding RD loop.Ronald S. Bultje
Adds RD integration for 32x16, 16x32, 64x32 and 32x64 rectangular blocks. Derf almost +0.6%, HD a little over +1.0%, STDHD +1.3%. Change-Id: Id651fdb6a655fdbb5c47009757e63317acfb88a5
2013-04-16Replacing VP9_COMBINEENTROPYCONTEXTS macro with function.Dmitry Kovalev
Change-Id: I3bbc31840af69481e1d9bb4427c9ee25abf82946
2013-04-16Remove the mb_no_coeff_skip flagJohn Koleszar
This flag was added to VP8 to allow a mode where MB-level skipping was not allowed, saving a bit per mb. It was never used in practice, and hasn't been tested in VP9, so remove it. Change-Id: Id450ec6904c6d06c1919508e7efc52d05cde5631
2013-04-14Merge "Renaming vp9_token_struct to vp9_token and removing previous ↵Dmitry Kovalev
typedef." into experimental
2013-04-11Merge changes I6721e42f,Iaffb1ae8 into experimentalJohn Koleszar
* changes: tokenize: convert skippable functions Add foreach_transformed_block
2013-04-11Renaming vp9_token_struct to vp9_token and removing previous typedef.Dmitry Kovalev
Change-Id: If69c3d795f87af5cc7bfdfe70ef733c41b4d55c8
2013-04-11tokenize: convert skippable functionsJohn Koleszar
Use the common block walker to calculate skippability. Change-Id: I6721e42f065df237426c91c1d871ec226ba7cdcb
2013-04-11Remove vp9_reset_mb_tokens_contextJohn Koleszar
Use sb-common version instead. Change-Id: If2552b5a39fd2e5272f66a41c5667dda85fd3939
2013-04-10Make usage of sb_type independent of literal values.Ronald S. Bultje
Change-Id: I0d12f9ef9d960df0172a1377f8e5236eb6d90492
2013-04-09Make SB coding size-independent.Ronald S. Bultje
Merge sb32x32 and sb64x64 functions; allow for rectangular sizes. Code gives identical encoder results before and after. There are a few macros for rectangular block sizes under the sbsegment experiment; this experiment is not yet functional and should not yet be used. Change-Id: I71f93b5d2a1596e99a6f01f29c3f0a456694d728
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-29Merge "Framework changes in nzc to allow more flexibility" into experimentalDeb Mukherjee
2013-03-28Framework changes in nzc to allow more flexibilityDeb Mukherjee
The patch adds the flexibility to use standard EOB based coding on smaller block sizes and nzc based coding on larger blocksizes. The tx-sizes that use nzc based coding and those that use EOB based coding are controlled by a function get_nzc_used(). By default, this function uses nzc based coding for 16x16 and 32x32 transform blocks, which seem to bridge the performance gap substantially. All sets are now lower by 0.5% to 0.7%, as opposed to ~1.8% before. Change-Id: I06abed3df57b52d241ea1f51b0d571c71e38fd0b
2013-03-28Fix mix-up in pt token indexing.Ronald S. Bultje
This fixes uninitialized reads in the trellis, and probably makes the trellis do something again. Change-Id: Ifac8dae9aa77574bde0954a71d4571c5c556df3c
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-26Redo banding for all transforms.Ronald S. Bultje
Now that the first AC coefficient in both directions use the same DC as their context, there no longer is a purpose in letting both have their own band. Merging these two bands allows us to split bands for some of the very high-frequency AC bands. In addition, I'm redoing the banding for the 1D-ADST col/row scans. I don't think the old banding made any sense at all (it merged the last coefficient of the first row/col in the same band as the first two of the second row/col), which was clearly an oversight from the band being applied in scan-order (rather than in their actual position). Now, coefficients at the same position will be in the same band, regardless what scan order is used. I think this makes most sense for the purpose of banding, which is basically "predict energy for this coefficient depending on the energy of context coefficients" (i.e. pt). After full re-training, together with previous patch, derf gains about 1.2-1.3%, and hd/stdhd gain about 0.9-1.0%. Change-Id: I7a0cc12ba724e88b278034113cb4adaaebf87e0c
2013-03-26Use above/left (instead of previous in scan-order) as token context.Ronald S. Bultje
Pearson correlation for above or left is significantly higher than for previous-in-scan-order (absolute values depend on position in scan, but in general, we gain about 0.1-0.2 by using either above or left; using both basically just makes this even better). For eob branch skipping, we continue to use the previous token in scan order. This helps about 0.9% on derf after re-training on a limited data set. Full re-training and results on larger-resolution clips are pending. Note that this commit breaks trellis, so we can probably get further gains out of it by fixing trellis at some later point. Change-Id: Iead68e296fc3a105cca746b5e3da9555d6010cfe
2013-03-18Fix ENTROPY_STATS code in vp9_tokenize.c.Ronald S. Bultje
Change-Id: I9b4cb1e2ce6c6a99cffd473ff2fa7579bd318fcd
2013-03-08Continued experiment with nonzero countDeb Mukherjee
Adds probability updates for extra bits for the nzcs, code for getting nzc stats, plus some minor cleanups and fixes. Change-Id: If2814e7f04fb52f5025ad9f400f3e6c50a00b543
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