summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropymode.h
AgeCommit message (Collapse)Author
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-11-26Moving mode encodings from common to encoder + cleanup.Dmitry Kovalev
Change-Id: I248ccb1532e2cd95314d0b95108f2c2e71cf084f
2013-11-04Splitting partition_probs array into two arrays.Dmitry Kovalev
We only update partition_probs for inter frames but they are constant for key frames. It is not necessary to have constants inside frame context and copy them every time. This change reduces FRAME_CONTEXT size by at least 48 bytes. Change-Id: If70a53be51043f37fe7d113853217937710932a7
2013-10-30Replacing (SWITCHABLE_FILTERS + 1) with SWITCHABLE_FILTER_CONTEXTS.Dmitry Kovalev
Change-Id: I9781a62bc1a4cd9176554d1271d87dbcafda9cb0
2013-10-11Adding TREE_SIZE macro + cleanup.Dmitry Kovalev
Using TREE_SIZE for the following trees: vp9_intra_mode_tree vp9_inter_mode_tree vp9_partition_tree vp9_switchable_interp_tree vp9_mv_joint_tree vp9_mv_class_tree vp9_mv_class0_tree vp9_mv_fp_tree Change-Id: I0212bb4c1ee6648249f68517e28a67a56591ee1b
2013-10-11Replacing {VP9_COEF, MODE}_UPDATE_PROB with DIFF_UPDATE_PROB.Dmitry Kovalev
Values of MODE_UPDATE_PROB and VP9_COEF_UPDATE_PROB are equal, so replacing them with one constant. Inlining appropriate arguments for functions: vp9_cond_prob_diff_update (encoder) vp9_diff_update_prob (decoder) Change-Id: I1255a1cb477743b799b3bfbbcd8de6b32b067338
2013-09-30Adding const to function arguments.Dmitry Kovalev
Function list: tx_counts_to_branch_counts_32x32 tx_counts_to_branch_counts_8x8 tx_counts_to_branch_counts_8x8 update_ct update_ct2 update_mode_probs Change-Id: I120d8945a34378cf285d6bd415e23de1d522cf2f
2013-09-25Removing unused SUBMVREF_COUNT constant.Dmitry Kovalev
Change-Id: I302ab4603553352a84b57bc89bc9e3d037978d29
2013-08-29consistently name VP9_COMMON variables #3James Zern
stragglers Change-Id: Ib1e853f9a331b7b66639dc34d79568d84d1930f1
2013-08-23cosmetics: strip 'VP9_' from defines in vp9 only codeJames Zern
Change-Id: I481d9bb2fa3ec72b6a83d5f04d545ad8013f295c
2013-08-15Moving segmentation struct from MACROBLOCKD to VP9_COMMON.Dmitry Kovalev
VP9_COMMON is the right place to segmentatation struct because it has global segmentation parameters, not something specific to macroblock processing. Change-Id: Ib9ada0c06c253996eb3b5f6cccf6a323fbbba708
2013-08-05Changing the order switchable filter enum constants.Dmitry Kovalev
This changeset allows to remove vp9_switchable_interp and vp9_switchable_interp_map arrays and make code much clear. Actually we still have to use these mapping but only inside read_interp_filter_type and write_interp_filter_type functions. Change-Id: I4026c6f8c4acefba6c81421b7bacbaa52cc45f50
2013-07-30Consistent update for inter_mode probabilities.Dmitry Kovalev
Using inter-mode counts instead of inter-mode-tree branch counts inside FRAME_COUNTS structure. Change-Id: I60dde13af37d06146d7d15543311c1b5044e9e04
2013-07-29Renaming TX_SIZE_MAX_SB to TX_SIZES.Dmitry Kovalev
Change-Id: I6aa4191935aa93461a07c41b59fdae1eb5f5f107
2013-07-26Merge "General cleanups."Dmitry Kovalev
2013-07-25Add const to vp9_accum_mv_refs parameterJohann
Change-Id: I0625d8ffddf590dfecd1bb8b8d6f57ef64b8bf18
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-25Removing vp9_adapt_mode_context function.Dmitry Kovalev
Moving code from vp9_adapt_mode_context to vp9_adapt_mode_probs. Change-Id: I60829c30b28968cd813551ef3a206dfb98d323c9
2013-07-24Inlining vp9_init_mode_contexts function.Dmitry Kovalev
Change-Id: I21ee76bcae101cc9f6ef1d867622e50b7ae565fc
2013-07-23Removing vp9_is_interpolating_filter array.Dmitry Kovalev
All filters are interpolating now, so we don't need this array, all values from this array are evaluated to true. Change-Id: I9af6d8219ae0eb984063cd15e4e2296374ae4961
2013-07-20Merge "Consistent names for inter mode probabilities and encodings."Dmitry Kovalev
2013-07-19Fixing problem introduced in one of my previous commits.Dmitry Kovalev
Changing fc->tx_probs back to fc->pre_tx_probs. This change actually affects the bitstream but current test vectors work. Chrome branch is not affected at all. Broken since: cc662dd Adding struct tx_probs and struct tx_counts to cleanup the code. Change-Id: I36dd4b3678e902e10aba8dd49b0012eb558c209d
2013-07-19Consistent names for inter mode probabilities and encodings.Dmitry Kovalev
Renaming vp9_sb_mv_ref_tree to vp9_inter_mode_tree, and vp9_sb_mv_ref_encoding_array to vp9_inter_mode_encodings. Change-Id: I0e91fbf81350d3ec5a2599064c74089b5d06133a
2013-07-17Removing kf_{y, uv}_mode_prob arrays from VP9Common.Dmitry Kovalev
These arrays have constant values (no any updates). Removing two corresponding memcpy calls. Making a little cleanup in vp9_entropymode.h as well: removing redundant 'extern' keyword and moving all function declarations at the end. Change-Id: Ia16b38b46aec2e2500f5df29c40a297ae241dede
2013-07-16Moving vp9_kf_default_bmode_probs to vp9_entropymode.c.Dmitry Kovalev
Removing vp9_modelcontext.c. Change-Id: If2316c58dead2708d9f95b52d9494ba4c1dd7427
2013-07-12Adding struct tx_probs and struct tx_counts to cleanup the code.Dmitry Kovalev
Also removing unused declarations from vp9_entropymode.h file. Change-Id: Ib9c5826db3584a32f6bb3297a76c522b99d83402
2013-06-10New probs for filters/tx_size and a few othersDeb Mukherjee
* New probs for subpel filters/tx_count * Makes a change to not reset to defaults for the tx_size probs if an intermediate frame reverts to using a fixed tx_size. * A few updates to the parameters for backward adaptation for mode/mv * some cosmetic cleanups derf300: +0.06% Change-Id: I22994d659bc31ca7a4fc8820fde24001e64a2920
2013-06-08TX_SIZE contexts simplification.Deb Mukherjee
Reduces TX_SIZE contexts to 2 for each kind. The code is cleaner and there is hardly any performance difference with more than two contexts. Results: almost neutral Change-Id: I17656bd6db76224ae2856adf882504560e7dbaa4
2013-06-07Coding tx-size selection by use of spatial contextDeb Mukherjee
Adds coding of transform size within a frame by use of context of transform sizes selected in left and above blocks. Also incorporates code for generating stats. TODO: generate and incorporate new default stats Change-Id: I6a7af099f6ad61d448521d9a51167aedaf638ed6
2013-06-07Coding updates for tx-size selectionDeb Mukherjee
Changes to the coding of transform sizes, along with forward and backward probability updates. Results: derf300: +0.241% Context based coding of transform sizes will be in a separate patch. Change-Id: I97241d60a926f014fee2de21fa4446ca56495756
2013-06-06New intra mode and partitioning probabilities.Ronald S. Bultje
Split partition probabilities between keyframes and non-keyframes, since they are fairly different. Also have per-blocksize interframe y intramode probabilities, since these vary heavily between different blocksizes. Lastly, replace default probabilities for partitioning and intra modes with new ones generated from current codec. Replace counts with actual probabilities also. Change-Id: I77ca996e25e4a28e03bdbc542f27a3e64ca1234f
2013-06-05Cosmetic renaming VP9_MVREFS to VP9_INTER_MODESDeb Mukherjee
NO bitstream change Change-Id: I79f6146dac5fdd157051b6f8dc611c0b7b5e5f7f
2013-05-30Merge VP9_YMODES, VP9_UV_MODES, INTRA_MODE_COUNT and cousins.Ronald S. Bultje
These are now merged in a new define called VP9_INTRA_MODES. Change-Id: I0890f895756a7395d84c92f98f43e43f4cf9050d
2013-05-30Merge all intra mode coding trees into a single one.Ronald S. Bultje
Also merge all counters. This removes a few unused probability updates from the bitstream. Change-Id: I20f58853e9dac84d8c0d9703ae012c55917516eb
2013-05-29Remove some unused code related to macroblock/splitmv coding.Ronald S. Bultje
Change-Id: Ic40d56fb162f4e201547dfae33e62ccd9e865889
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-26Remove splitmv.Ronald S. Bultje
Also do per-partition motion vector referencing in <sb8x8 partitions, and adjust mvref finding for sub8x8 partitions. Change-Id: Id3ed1ed4d2a8910d11d327db6cc63b8eb79f941f
2013-05-17Replace default counts with default probs.Paul Wilkins
Replace vp9_kf_default_bmode_counts structure with direct default probabilities. The probability structure is smaller and it removes the need to specify in the bitstream how to convert the counts to probabilities. Note that I have concerns still about the size and value of the large intra mode context. This may cause problems for HW but it also means we rely heavily on reverse update as forwards update of a structure this size is problematic. I intend to review this more generally in the next few days to see if we can come up with a competitive solution that does not rely on such a large context. Change-Id: I0a36071079d5d26a57ab0e9fbf91af4199aa7984
2013-05-07Deprecate comp_interintra_pred experiment.Paul Wilkins
Delete code under the CONFIG_COMP_INTERINTRA_PRED flag. Change-Id: I3d1079cf46305c08f7e11d738596ea112e7b547f
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-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-16Recursive partition syntax codingJingning Han
Enable recursive partition information coding from SB64X64 down to MB16X16. The bit-stream syntax is now supporting rectangular block sizes. It starts from SB64X64 and recursively describes the partition type of the current block. If the partition type is PARTITION_NONE, the block is coded as a single unit; if it is PARTITION_HORZ or PARTITION_VERT, the block is segmented into two independently coded rectangular units, with no further partition needed; otherwise, the block is segmented into 4 square blocks. i.e., PARTITION_SPLIT case, each can be potentially further partitioned. Forward adaptive probability modeling is used for the partition information coding, conditioned on the current block size. Change-Id: I499365fb547839d555498e3bcc0387d8a3587d87
2013-04-11Renaming vp9_token_struct to vp9_token and removing previous typedef.Dmitry Kovalev
Change-Id: If69c3d795f87af5cc7bfdfe70ef733c41b4d55c8
2013-03-26remove code not in useYaowu Xu
Change-Id: I4fa46f10e82aca36c563f7ea829e5a3177a0c740
2013-02-20Refactoring of switchable filter search for speedDeb Mukherjee
Refactors the switchable filter search in the rd loop to improve encode speed. Uses a piecewise approximation to a closed form expression to estimate rd cost for a Laplacian source with a given variance and quantization step-size. About 40% encode time reduction is achieved. Results (on a feb 12 baseline) show a slight drop: derf: -0.019% yt: +0.010% std-hd: -0.162% hd: -0.050% Change-Id: Ie861badf5bba1e3b1052e29a0ef1b7e256edbcd0
2013-01-23Adds an error-resilient mode with testDeb Mukherjee
Adds an error-resilient mode where frames can be continued to be decoded even when there are errors (due to network losses) on a prior frame. Specifically, backward updates are turned off and probabilities of various symbols are reset to defaults at the beginning of each frame. Further, the last frame's mvs are not used for the mv reference list, and the sorting of the initial list based on search on previous frames is turned off as well. Also adds a test where an arbitrary set of frames are skipped from decoding to simulate errors. The test verifies (1) that if the error frames are droppable - i.e. frame buffer updates have been turned off - there are no mismatch errors for the remaining frames after the error frames; and (2) if the error-frames are non droppable, there are not only no decoding errors but the mismatch PSNR between the decoder's version of the post-error frames and the encoder's version is at least 20 dB. Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
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
2013-01-14Merge prediction filterAdrian Grange
Removed the experimental flag from around the prediction filter. Change-Id: Ic1dd2db8fe8ac17ed5129f83094d4c5cdd5527d2
2013-01-09New prediction filterAdrian Grange
This patch removes the old pred-filter experiment and replaces it with one that is implemented using the switchable filter framework. If the pred-filter experiment is enabled, three interopolation filters are tested during mode selection; the standard 8-tap interpolation filter, a sharp 8-tap filter and a (new) 8-tap smoothing filter. The 6-tap filter code has been preserved for now and if the enable-6tap experiment is enabled (in addition to the pred-filter experiment) the original 6-tap filter replaces the new 8-tap smooth filter in the switchable mode. The new experiment applies the prediction filter in cases of a fractional-pel motion vector. Future patches will apply the filter where the mv is pel-aligned and also to intra predicted blocks. Change-Id: I08e8cba978f2bbf3019f8413f376b8e2cd85eba4
2012-12-18Use standard integer types for pixel values and coefficients.Ronald S. Bultje
For coefficients, use int16_t (instead of short); for pixel values in 16-bit intermediates, use uint16_t (instead of unsigned short); for all others, use uint8_t (instead of unsigned char). Change-Id: I3619cd9abf106c3742eccc2e2f5e89a62774f7da