summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_tokenize.c
AgeCommit message (Collapse)Author
2013-08-12Entropy context related cleanups.Dmitry Kovalev
Adding set_skip_context() function used from both encoder and decoder. Change-Id: Ia22cfad3211a00a63eb294f64f857b78f4aa9b85
2013-08-09Inlining 16 as a stride for BLOCK_OFFSET macro.Dmitry Kovalev
Change-Id: I7f23d174eb089e5500f268a10db09648634c1b82
2013-08-02Adding is_inter_block function.Dmitry Kovalev
Using it instead of long unclear verbose check "mbmi->ref_frame[0] != INTRA_FRAME". Change-Id: I9c7b4b3797942fa962bf3ba7460fff3084beabe9
2013-08-02Cleaning up set_contexts_on_border function.Dmitry Kovalev
Change-Id: I8f21c18b29f54b277fb1c167f278f109d9f3b996
2013-07-31Adding missing const to vp9_extra_bits array.Dmitry Kovalev
Change-Id: Icd128ab58719e0b9066bdfa66a5d0d427a84d6df
2013-07-29Remove a redundant branching in tokenize_bJingning Han
The tokenize_b function is only called when output flag is on. Hence removing the conditional branch on it therein. Change-Id: Ib709f47f23f39ca05a695faf86fa3377f11f2dd0
2013-07-29Tune tokenization/detokenization flow for speed-upJingning Han
This commit optimizes the tokenization and detokenization operational flow for speed-up. It makes the coding process about 0.3% faster at speed 0. Change-Id: I28008df7482874e4b5f237f2d418ff82a249dd56
2013-07-29Skip redundant tokenization in rd loopJingning Han
This commit makes the encoder skip the redundant tokenization process in the rate-distortion optimization search loop, while updating the entropy contexts accordingly. It makes the speed 0 encoding process about 0.5% faster at no performance change. Change-Id: I34a4155a0b5332afeb45c93a51c7f35a294d685c
2013-07-29Renaming txfm to tx for consistency in some places.Dmitry Kovalev
Change-Id: I2a6a646570e2af66315e7c658d00d99f80c4b127
2013-07-29Renaming TX_SIZE_MAX_SB to TX_SIZES.Dmitry Kovalev
Change-Id: I6aa4191935aa93461a07c41b59fdae1eb5f5f107
2013-07-24Removing CONFIG_BALANCED_COEFTREE experiment.Dmitry Kovalev
Change-Id: I61a8b0101eac3ee2e0621d56151b90c269fd4db4
2013-07-24Adding condition inside get_tx_type_{4x4, 8x8, 16x16}.Dmitry Kovalev
Adding plane type check condition because it was always used outside of get_tx_type_{4x4, 8x8, 16x16}. Change-Id: I02f0bbfee8063474865bd903eb25b54d26e07230
2013-07-23Moving counts from FRAME_CONTEXT to new struct FRAME_COUNTS.Dmitry Kovalev
Counts are separate from frame context. We have several frame contexts but need only one copy of all counts. Change-Id: I5279b0321cb450bbea7049adaa9275306a7cef7d
2013-07-11Removing redundant code mostly from vp9_pred_common.{h, c}.Dmitry Kovalev
Removing redundant function arguments and curly braces. Change-Id: I46e02561f33fe02e84a3b19756f03b9504bd6a1b
2013-07-11Moving segmentation related vars into separate struct.Dmitry Kovalev
Adding segmentation struct to vp9_seg_common.h. Struct members are from macroblockd and VP9Common structs. Moving segmentation related constants and enums to vp9_seg_common.h. Change-Id: I23fabc33f11a359249f5f80d161daf569d02ec03
2013-07-09removing case statements around prediction entropy codingJim Bankoski
Removes SEG_ID Removes MBSKIP Removes SWITCHABLE_INTERP Removes INTRA_INTER Removes COMP_INTER_INTER Removes COMP_REF_P Removes SINGLE_REF_P1 Removes SINGLE_REF_P2 Removes TX_SIZE Change-Id: Ie4520ae1f65c8cac312432c0616cc80dea5bf34b
2013-07-01Make get_coef_context() branchless.Ronald S. Bultje
This should significantly speedup cost_coeffs(). Basically what the patch does is to make the neighbour arrays padded by one item to prevent an eob check in get_coef_context(), then it populates each col/row scan and left/top edge coefficient with two times the same neighbour - this prevents a single/double context branch in get_coef_context(). Lastly, it populates neighbour arrays in pixel order (rather than scan order), so we don't have to dereference the scantable to get the correct neighbours. Total encoding time of first 50 frames of bus (speed 0) at 1500kbps goes from 2min10.1 to 2min5.3, i.e. a 2.6% overall speed increase. Change-Id: I42bcd2210fd7bec03767ef0e2945a665b851df56
2013-07-01Quantize (64-bit only, for now) SSSE3 SIMD.Ronald S. Bultje
Total encoding time for first 50 frames of bus (speed 0) @ 1500kbps goes 2min34.8 to 2min14.4, i.e. a 10.4% overall speedup. The code is x86-64 only, it needs some minor modifications to be 32bit compatible, because it uses 15 xmm registers, whereas 32bit only has 8. Change-Id: I2df53770c2e850813ffa713e1a91b45b0082b904
2013-06-28Inline vp9_get_coef_context() (and remove vp9_ prefix).Ronald S. Bultje
Makes cost_coeffs() a lot faster: 4x4: 236 -> 181 cycles 8x8: 888 -> 588 cycles 16x16: 3550 -> 2483 cycles 32x32: 17392 -> 12010 cycles Total encode time of first 50 frames of bus (speed 0) @ 1500kbps goes from 2min51.6 to 2min43.9, i.e. 4.7% overall speedup. Change-Id: I16b8d595946393c8dc661599550b3f37f5718896
2013-06-25Removing unused code.Dmitry Kovalev
Removing block index (ib) parameter from get_tx_type_{8x8, 16x16} functions. Change-Id: Ia213335aae7a7cb027f97b9cc9b04519840250f1
2013-06-07Cleans up mbskip encodingDeb Mukherjee
Refactors mbskip coding to be compatible with coding of the rest of the symbols. Adds forward/backward adaptation and removes a lot of the legacy code. Results: fast50: +1.6% derfraw300: +0.317% Change-Id: I395a2976d15af044d3b8ded5acfa45f6f065f980
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-06-06don't tokenize & encode tokens for blocks in UMVJim Bankoski
This avoids encoding tokens for blocks that are entirely in the UMV border. This changes the bitstream. Change-Id: I32b4df46ac8a990d0c37cee92fd34f8ddd4fb6c9
2013-05-31Merge all various transform size data trackers into single variables.Ronald S. Bultje
Change-Id: I2dfc569106b29fbe4da20585a0e85e5e9ea6a4db
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