summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropymode.c
AgeCommit message (Collapse)Author
2013-12-06Merge "Renaming constants."Dmitry Kovalev
2013-12-05Renaming constants.Dmitry Kovalev
NUM_YV12_BUFFERS => FRAME_BUFFERS ALLOWED_REFS_PER_FRAME => REFS_PER_FRAME NUM_REF_FRAMES_LOG2 => REF_FRAMES_LOG2 NUM_REF_FRAMES => REF_FRAMES NUM_FRAME_CONTEXTS_LOG2 => FRAME_CONTEXTS_LOG2 NUM_FRAME_CONTEXTS => FRAME_CONTEXTS Change-Id: I4e1ada08f25d8fa30fdf03aebe1b1c9df0f87e63
2013-12-05Remove redundant calls to vp9_update_mode_info_borderAdrian Grange
Removed calls to vp9_update_mode_info_border since they immediately followed code that initialized the entire buffer to 0. Change-Id: Ife06794daa20439a0b607a83a87f88df59afac40
2013-11-26Moving mode encodings from common to encoder + cleanup.Dmitry Kovalev
Change-Id: I248ccb1532e2cd95314d0b95108f2c2e71cf084f
2013-11-20Removing redundant call of vp9_init_mbmode_probs().Dmitry Kovalev
This function is called from vp9_setup_past_independence() which is called before the modified piece of code. Moving reset of inter_mode_probs into vp9_init_mbmode_probs() for consistency. Change-Id: Ib188e8798e1fbe15407fd501406761b746fdda95
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-04Unified approach for backward probability update.Dmitry Kovalev
Replacing update_mode_probs() and adapt_probs() with tree_merge_probs(). Change-Id: I50b2c968d67c9265f5216c700cbeba25fb014654
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-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-30Replacing (SWITCHABLE_FILTERS + 1) with SWITCHABLE_FILTER_CONTEXTS.Dmitry Kovalev
Change-Id: I9781a62bc1a4cd9176554d1271d87dbcafda9cb0
2013-10-23Merge "Reordering probability tables for consistency."Dmitry Kovalev
2013-10-22Reordering probability tables for consistency.Dmitry Kovalev
Putting vp9_kf_y_mode_prob[] before vp9_kf_uv_mode_prob[]. Change-Id: I2404910e35de1ee24ce46337e00c07eb1446e50f
2013-10-18Removing NUM_ prefix from constant names.Dmitry Kovalev
Renames for consistency with other constants: NUM_FRAME_TYPES -> FRAME_TYPES NUM_PARTITION_CONTEXTS -> PARTITION_CONTEXTS Change-Id: I3db30acb2868eb0a424237c831087b2e264ec47f
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-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-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-27Merge "Renaming D27 to D207."Dmitry Kovalev
2013-08-23cosmetics: strip 'VP9_' from defines in vp9 only codeJames Zern
Change-Id: I481d9bb2fa3ec72b6a83d5f04d545ad8013f295c
2013-08-23Renaming D27 to D207.Dmitry Kovalev
I've already renamed d27_predictor to d207_predictor but forgot about the corresponding constant. Change-Id: Id312aa80fc5b5a1ab8a709a33418a029552a6857
2013-08-16Merge "Renaming d27 predictor to d207."Dmitry Kovalev
2013-08-15Renaming d27 predictor to d207.Dmitry Kovalev
27 degrees intra predictor is actually 207 degrees, so renaming it. Change-Id: Ife96a910437eb80ccdc0b7a5b7a62c77542ae5be
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-09Moving loopfilter struct to VP9_COMMON.Dmitry Kovalev
Loop filter configuration doesn't belong to macroblock, so moving it from MACROBLOCKD to VP9_COMMON. Also moving the declaration of loopfilter struct from vp9_blockd.h to vp9_loopfilter.h. Change-Id: I4b3e34be9623b47cda35f9b1f9951f8c5b1d5d28
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-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-08-01Cleanup: replacing xd->seg with seg, and xd->lf with lf.Dmitry Kovalev
Change-Id: I73b59d7699a8e7e7acd3bf8041cb6c98ce9ba4bf
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-25Merge "Removing duplicated code for merging two probabilities."Dmitry Kovalev
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-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-24Inlining vp9_init_mode_contexts function.Dmitry Kovalev
Change-Id: I21ee76bcae101cc9f6ef1d867622e50b7ae565fc
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-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-23Removing MODE_COUNT_TESTING from vp9_entropymode.c.Dmitry Kovalev
Change-Id: I5367bc1d9e660d86879d285a6f146d8a47e62464
2013-07-22Using update_ct and update_ct2 functions for probability update.Dmitry Kovalev
Update logic for both mode and mvref was the same, so using MODE_COUNT_SAT, MODE_MAX_UPDATE_FACTOR, update_ct, update_ct2 for both cases. Removing function update_tx_ct because it was identical to update_mode_ct2. Change-Id: Iff566be27dbd6cde4c2ec04e8d988f207046b8f0
2013-07-20Merge "Removing pre probabilities from FRAME_CONTEXT."Dmitry Kovalev
2013-07-20Merge "Moving all loop filter related variables into new struct."Dmitry Kovalev
2013-07-20Merge "Consistent names for inter mode probabilities and encodings."Dmitry Kovalev
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-19Moving all loop filter related variables into new struct.Dmitry Kovalev
Adding loopfilter struct with fields from MACROBLOCKD and VP9Common. Eventually it will be moved to vp9_loopfilter.h for better code structure. Change-Id: Iaf5fb71c33719cdfa1b991f671caf071be9ea035
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-19Renaming TXFM_MODE to TX_MODE (like TX_SIZE, TX_TYPE).Dmitry Kovalev
Moving TX_MODE enum to vp9_enums.h. Renaming txfm_mode variables to tx_mode. Change-Id: I459d1af6dd928ce7fccdf8ce30b6f1ca057bef92
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-12Using vp9_copy and vp9_zero instead of custom code.Dmitry Kovalev
Change-Id: Id9b6ceeddca3f9b34bfada5c499b1e7a2f42c30b
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