summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropy.c
AgeCommit message (Collapse)Author
2014-02-18vp9: normalize DECLARE_ALIGNED use on global tablesJames Zern
- place extern within the macro - use in the header only Change-Id: I4274b345d8af9ef329c0eb9553a3ddaad70d1d26
2013-12-16Converting vp9_treecoder.h to vp9_prob.{h, c}Dmitry Kovalev
Moving vp9_norm probability table from vp9_entropy.c to vp9_prob.c Change-Id: Ie757b73860c6f43130790c332b292e2a1a81b788
2013-12-06Removing BLOCK_TYPES and adding PLANE_TYPES constant instead.Dmitry Kovalev
Change-Id: Ic3bb862e93aedf6a489a33ea6f7e5097d96855ee
2013-12-05Moving vp9_tree_probs_from_distribution() to encoder.Dmitry Kovalev
Writing custom coeff branch count calculation (which is much clearer) in adapt_coef_probs() function. Removing vp9_treecoder.c file. Change-Id: I8880fb7a39996c8bcf6cd0acf9898a8c712ba91f
2013-12-05Renaming PREV_COEF_CONTEXTS to COEFF_CONTEXTS.Dmitry Kovalev
Also adding BAND_COEFF_CONTEXTS macro to simplify for loop logic. Change-Id: I12a78a49cf1addf81e6b3fe2a3736ec2b79bd79e
2013-12-04Removing vp9_default_coef_probs.h file.Dmitry Kovalev
Moving all probability tables from removed file to vp9_entropy.c. Change-Id: I12846f1da778c3016d96b82e53384d4634883430
2013-12-04Merge "Cleaning up vp9_entropy.h file."Dmitry Kovalev
2013-12-03Formatting vp9_pareto8_full array.Dmitry Kovalev
Change-Id: Ic7f47a8d233daf5e61e82092865837ea4eda4095
2013-12-03Cleaning up vp9_entropy.h file.Dmitry Kovalev
Renaming constants for consistency: DCT_VAL_CATEGORY1 => CATEGORY1_TOKEN DCT_VAL_CATEGORY2 => CATEGORY2_TOKEN DCT_VAL_CATEGORY3 => CATEGORY3_TOKEN DCT_VAL_CATEGORY4 => CATEGORY4_TOKEN DCT_VAL_CATEGORY5 => CATEGORY5_TOKEN DCT_VAL_CATEGORY6 => CATEGORY6_TOKEN DCT_EOB_TOKEN => EOB_TOKEN DCT_EOB_MODEL_TOKEN => EOB_MODEL_TOKEN MAX_ENTROPY_TOKENS => ENTROPY_TOKENS Moving constants: INTER_MODE_CONTEXTS from vp9_entropy.h to vp9_blockd.h. EOSB_TOKEN from vp9_entropy.h to vp9_tokenize.h Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
2013-11-27Moving token-encoding related stuff from common to encoder.Dmitry Kovalev
Change-Id: I0e59d320407b3bed0ba3622a7b29975f6fad7ebf
2013-11-20Clean up removal of vp9_pareto8 table.Jim Bankoski
Change-Id: I5556e8d1fc150be8a3e93af21900829b59a500dc
2013-11-20remove the model and copy in pack_mb_tokensJim Bankoski
Change-Id: I00a5203c8ed76c184d936fccf93d76e7c06773d3
2013-11-19entropy code speedupJim Bankoski
Change-Id: Ic316d3374ff9a2b43897272260947d56765a0fdd
2013-11-18Cleaning up vp9_entropy.c file.Dmitry Kovalev
Change-Id: I568f5e2d4ef2f2affe013ba1691ffb546f1fe8c6
2013-11-13Simplifies band-getting with a static arrayDeb Mukherjee
Simplifies the code by implementing band mapping with static arrays. A lot of the code complexity introduced in a previous patch disappears. Change-Id: Ia3fac36e594fb5ad2d55ae141c58bba4c55c2d28
2013-11-05Localizing NEARESTMV special cases in the code.Dmitry Kovalev
Removing special case handling from vp9_tree_probs_from_distribution(), tree_merge_probs(), and vp9_tokens_from_tree_offset() functions. Replacing inter_mode_offset() function with macro INTER_OFFSET which is used now for vp9_inter_mode_tree definition. Change-Id: Iff75a1499d460beb949ece543389c8754deaf178
2013-11-01Removing 'new' probability calculation from convert_distribution().Dmitry Kovalev
We don't have to calculate 'new' probability in convert_distribution() because it is enough to calculate only 'new' counters which could be used to calculate probability if necessary. That's why removing a lot of unused temporary probability arrays and reducing number of get_binary_prob() calls. Change-Id: I4e14eb7203d1ace61bbddefd6b9b6326be83ba63
2013-10-16Merge "Using constants instead of plain numbers."Dmitry Kovalev
2013-10-15Updated encoder to handle intra-only framesAlexander Voronov
Updated the encoder to handle frames that are coded intra-only. Intra-only frames must be non-showable, that is, the "show frame" flag must be set to 0 in the frame header. Tested by forcing the ARF frames to be coded intra- only. Note: The rate control code will need to be modified to account for intra-only frames better than they are currently handled. Change-Id: I6a9dd5337deddcecc599d3a44a7431909ed21079
2013-10-14Using constants instead of plain numbers.Dmitry Kovalev
Replacing 22 with TREE_SIZE(MAX_ENTROPY_TOKENS) 12 with MAX_ENTROPY_TOKENS Change-Id: If24919336e8ace9cf64991bd5ae33fa6656f7b93
2013-10-10Merge "Moving all scan/iscan code into separate vp9_scan.{h, c} files."Dmitry Kovalev
2013-10-09Adding const to several pointers.Dmitry Kovalev
Change-Id: I7231589bda71d0d23c730283febd5bb58585a0da
2013-10-07Moving all scan/iscan code into separate vp9_scan.{h, c} files.Dmitry Kovalev
Now we have entropy code separate from scan/iscan code. The next step in future is to move iscan code from common part to the encoder. Change-Id: Id9732f7d80aec00af35c1d58d1137c4c96c91451
2013-09-29vp9_entropy.c lint issuesJim Bankoski
Change-Id: I4e163cc4ce9ec2f3a5a8b9da478049c71b08d71f
2013-09-27Removing vp9_get_coef_neighbors_handle function.Dmitry Kovalev
Change-Id: I6be72c8b048d1ccc7ef43764cf84c32360098970
2013-08-29consistently name VP9_COMMON variables #1James Zern
pc -> cm Change-Id: If3e83404f574316fdd3b9aace2487b64efdb66f3
2013-08-08General code cleanup.Dmitry Kovalev
Removing redundant parenthesis and curly braces. Combining declarations with initializations. Adding useful intermediate variables instead of recalculating expressions every time. Change-Id: I00106f404afd60bfc189905b0fded881684f941a
2013-08-08Removing unneeded intermediate entropy_nodes_adapt var.Dmitry Kovalev
Change-Id: I541a178d997b4541e0e2d4d5b854e2ed6b113c3a
2013-07-31Adding missing const to vp9_extra_bits array.Dmitry Kovalev
Change-Id: Icd128ab58719e0b9066bdfa66a5d0d427a84d6df
2013-07-29Merge "Remove unnecessary 64 byte alignment"John Koleszar
2013-07-29Renaming txfm to tx for consistency in some places.Dmitry Kovalev
Change-Id: I2a6a646570e2af66315e7c658d00d99f80c4b127
2013-07-29Remove unnecessary 64 byte alignmentJohn Koleszar
Fixes a warning on MSVS 2012 where the alignment of vp9_default_iscan_8x8 didn't match between its declaration and definition. Change-Id: I1466a15635f4b22594d705d570b7e399bfb6cf21
2013-07-25General cleanups.Dmitry Kovalev
Removing unused constants, macros, and function declarations. Using ROUND_POWER_OF_TWO macro, vp9_zero, vp9_copy where possible. Moving #include from *.h to *.c. Merging for loops for motion vectors. Change-Id: Ic3bf841764a2bb177128bb3a6d7aa8f68229cd13
2013-07-24Removing duplicated code for merging two probabilities.Dmitry Kovalev
Adding common merge_probs and merge_probs2 functions. Changing ints to usigned ints in some places. Change-Id: Icf088ffdea7cf5b95284a128916409bdd53506b0
2013-07-24Removing CONFIG_BALANCED_COEFTREE experiment.Dmitry Kovalev
Change-Id: I61a8b0101eac3ee2e0621d56151b90c269fd4db4
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-19Removing pre probabilities from FRAME_CONTEXT.Dmitry Kovalev
Using cm->frame_contexts[cm->frame_context_idx] as source of previous probabilities. Change-Id: Ie03778acf0e7bebdc3a1f6a51854d4a0712f24a1
2013-07-15Removing and moving around constant definitions.Dmitry Kovalev
Removing unused and duplicated constants, moving them from *.h to *.c if possible. Change-Id: Ief4d6b984a3ca2e9b38504f0d855ed072cf7133f
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-24Move vp9_full_to_model_counts to encoderJohn Koleszar
This function is not called from the decoder, so it doesn't need to be in common/. Change-Id: I6977dd462a25b4ff39c9c7e1b0b5b16aa58ee733
2013-06-21Remove unused vp9_model_to_full_probs_sb()John Koleszar
This function never referenced. Change-Id: I1c42cd355bfa88e17d169f7335a44be682af58cc
2013-06-14Remove constant vp9_coef_update_prob tableJohn Koleszar
All elements of this table are equal to 252, so replace it with a single constant VP9_COEF_UPDATE_PROB. Change-Id: I1e2d1d284326ce6df9899a740c2fc344b3ec81c9
2013-06-10Implement intra-coded framesAdrian Grange
Implements ability to signal and decode frames that are encoded using only intra coding modes. Only the decode side has been implemented here. Change-Id: I53ac6a8d90422cd08ba389e5236e15b45f9e93de
2013-06-03Merge "Replace scatter scan 32x32 with HW friendly scan." into experimentalPaul Wilkins
2013-05-31Merge all various transform size data trackers into single variables.Ronald S. Bultje
Change-Id: I2dfc569106b29fbe4da20585a0e85e5e9ea6a4db
2013-05-30Replace scatter scan 32x32 with HW friendly scan.Sami Pietila
The first 240 coeff positions (15 top-left blocks) are scanned in the same order as in scatter scan, after that the coeffs are scanned in "block bands", each band at a time, all coeffs in one band before moving on to the next band. This brings down the amount of 4x4 coeff blocks that need to be buffered while scanning, from 15 blocks to 8 blocks. Change-Id: I478a991d63c48bd5e64d36e59fed7a00c9a651ba
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