Commit Graph

67 Commits

Author SHA1 Message Date
Yaowu Xu
70ad668056 vpx_dsp/prob.h: vp9_ -> vpx_
change prefix vp9_ to vpx_ for non codec specific functions and data
structures.

Change-Id: I97c7e6422eceea99212b93f4942bc2187763a07c
2015-07-20 18:13:04 -07:00
Yaowu Xu
bf82514b54 vpx_dsp/bitreader.h: vp9_->vpx_
Replace vp9_ in names to vpx_ as they are not codec specific.

Change-Id: I2e583aa63dee769353ada4b42417aa15c4074ebb
2015-07-20 18:06:31 -07:00
James Zern
53b7f33f2d vp9_entropymode: make vp9_init_mode_probs private
rename to init_mode_probs

Change-Id: Id451d7763b784ed37e43f2c35073a778078d3d0f
2015-06-12 18:25:23 -07:00
Scott LaVarnway
b962646fc5 Re-worked header files
Various header/test files had to be re-worked in order to
build "Remove cm parameter from vp9_decode_block_tokens()".

This patch reverts the "Remove cm" part and only contains
the re-worked header files.

Change-Id: I520958a88d1991fee988a3c784d0eac40e117a32
2015-05-22 11:19:51 -07:00
Yunqing Wang
4ae092c660 Make encoder and decoder share common thread function
Moved vp9_accumulate_frame_counts to vp9_thread_common.c to
eliminate the duplicate code.

Change-Id: I9cf506d729603c8bf1494b4c86a3b7d47af1917a
2015-02-06 11:45:51 -08:00
Yaowu Xu
45971abd1d Optimize coef update
1. move the check of search method of USE_TX_8X8 up one level to
avoid operations of build_tree_distributions()
2. count tx used and avoid computaton for coef udpate when one size
is not used at all.

Change-Id: Ia3e54a2588aa531c41377a1bfaa64385d04a592c
2015-01-30 10:16:40 -08:00
Alexander Voronov
6c6a97814f Prevent decoder from using uninitialized entropy context.
If decoding starts with intra-only frame, there is a possibility
of using uninitialized entropy context, what leads to undefined
behavior.

Change-Id: Icbb64b5b1bd1e5de2a4bfa2884e56bc0a20840af
2014-12-11 20:44:19 +03:00
Jingning Han
5d9cdac087 Move inter filter defs to vp9_filter.h
Add comments on the use case of these definitions. Further reduce
the scope of header file in vp9_context_tree.h.

Change-Id: Ic4a7638e838d0ac441b64abfc56e57354c059d75
2014-10-07 12:16:37 -07:00
Dmitry Kovalev
e608418899 Renaming MB_PREDICTION_MODE to PREDICTION_MODE.
Actually, it would be great to have two separate enums INTRA_MODES and
INTER_MODES in future.

Change-Id: I6c4147cf0002853da9c1e03fe9514eab876f01c8
2014-04-22 17:48:31 -07:00
Dmitry Kovalev
f8f8c6d44c Adding reusable get_y_mode_prob() function.
Change-Id: Iebd182d7aeebc0f8964b6fd35057449bb25b00c1
2014-03-10 10:50:16 -07:00
Dmitry Kovalev
e68cc30bb5 Moving FRAME_CONTEXT & FRAME_COUNTS to vp9_entropymode.h.
Change-Id: I1fe71e35b1e44da693b43d26607abb33efd56820
2014-02-28 13:56:43 -08:00
Dmitry Kovalev
03eb63c114 Merge "Removing MODE_STATS." 2014-01-24 15:53:12 -08:00
James Zern
0940c9cfde vp9/common: add extern "C" to headers
Change-Id: Ic334da9aee968e33762c2b25d9fbad24c844b411
2014-01-23 16:21:24 -08:00
Dmitry Kovalev
a001016996 Removing MODE_STATS.
Change-Id: I7520e1cc82b749187c9445356dd7b54f3f3826cc
2014-01-17 17:30:22 -08:00
Dmitry Kovalev
b5c9261832 Converting vp9_treecoder.h to vp9_prob.{h, c}
Moving vp9_norm probability table from vp9_entropy.c to vp9_prob.c

Change-Id: Ie757b73860c6f43130790c332b292e2a1a81b788
2013-12-16 12:53:09 -08:00
Dmitry Kovalev
f4bf712fbb Moving mode encodings from common to encoder + cleanup.
Change-Id: I248ccb1532e2cd95314d0b95108f2c2e71cf084f
2013-11-26 14:53:17 -08:00
Dmitry Kovalev
dde8069e57 Splitting partition_probs array into two arrays.
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-04 14:26:16 -08:00
Dmitry Kovalev
6761872e49 Replacing (SWITCHABLE_FILTERS + 1) with SWITCHABLE_FILTER_CONTEXTS.
Change-Id: I9781a62bc1a4cd9176554d1271d87dbcafda9cb0
2013-10-30 14:40:34 -07:00
Dmitry Kovalev
860e467643 Adding TREE_SIZE macro + cleanup.
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-11 16:25:50 -07:00
Dmitry Kovalev
4a0f9478ef Replacing {VP9_COEF, MODE}_UPDATE_PROB with DIFF_UPDATE_PROB.
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-10-11 10:47:22 -07:00
Dmitry Kovalev
c64e23832f Adding const to function arguments.
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-30 14:50:15 -07:00
Dmitry Kovalev
49f5efa8d8 Removing unused SUBMVREF_COUNT constant.
Change-Id: I302ab4603553352a84b57bc89bc9e3d037978d29
2013-09-25 15:33:05 -07:00
James Zern
d765df2796 consistently name VP9_COMMON variables #3
stragglers

Change-Id: Ib1e853f9a331b7b66639dc34d79568d84d1930f1
2013-08-29 13:27:41 -07:00
James Zern
c8ba8c513c cosmetics: strip 'VP9_' from defines in vp9 only code
Change-Id: I481d9bb2fa3ec72b6a83d5f04d545ad8013f295c
2013-08-23 19:16:49 -07:00
Dmitry Kovalev
b7616e387e Moving segmentation struct from MACROBLOCKD to VP9_COMMON.
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-15 10:47:48 -07:00
Dmitry Kovalev
3f611555d7 Changing the order switchable filter enum constants.
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-05 12:26:15 -07:00
Dmitry Kovalev
8701bc11df Consistent update for inter_mode probabilities.
Using inter-mode counts instead of inter-mode-tree branch counts inside
FRAME_COUNTS structure.

Change-Id: I60dde13af37d06146d7d15543311c1b5044e9e04
2013-07-30 18:06:34 -07:00
Dmitry Kovalev
23391ea835 Renaming TX_SIZE_MAX_SB to TX_SIZES.
Change-Id: I6aa4191935aa93461a07c41b59fdae1eb5f5f107
2013-07-29 12:25:34 -07:00
Dmitry Kovalev
c09b81719f Merge "General cleanups." 2013-07-26 13:59:39 -07:00
Johann
6c8ef8d957 Add const to vp9_accum_mv_refs parameter
Change-Id: I0625d8ffddf590dfecd1bb8b8d6f57ef64b8bf18
2013-07-25 14:25:33 -07:00
Dmitry Kovalev
7131cb0e3d General cleanups.
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-25 14:13:48 -07:00
Dmitry Kovalev
47d61f008f Removing vp9_adapt_mode_context function.
Moving code from vp9_adapt_mode_context to vp9_adapt_mode_probs.

Change-Id: I60829c30b28968cd813551ef3a206dfb98d323c9
2013-07-25 10:48:45 -07:00
Dmitry Kovalev
4450fa4cd9 Inlining vp9_init_mode_contexts function.
Change-Id: I21ee76bcae101cc9f6ef1d867622e50b7ae565fc
2013-07-24 17:03:03 -07:00
Dmitry Kovalev
db7f5d28b9 Removing vp9_is_interpolating_filter array.
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-23 14:24:39 -07:00
Dmitry Kovalev
39342db138 Merge "Consistent names for inter mode probabilities and encodings." 2013-07-20 22:40:51 -07:00
Dmitry Kovalev
2fc927c66a Fixing problem introduced in one of my previous commits.
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-19 15:18:43 -07:00
Dmitry Kovalev
bc7acb134b Consistent names for inter mode probabilities and encodings.
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-19 10:40:04 -07:00
Dmitry Kovalev
f9f453ec8d Removing kf_{y, uv}_mode_prob arrays from VP9Common.
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-17 16:50:52 -07:00
Dmitry Kovalev
baf0c959c7 Moving vp9_kf_default_bmode_probs to vp9_entropymode.c.
Removing vp9_modelcontext.c.

Change-Id: If2316c58dead2708d9f95b52d9494ba4c1dd7427
2013-07-16 10:54:34 -07:00
Dmitry Kovalev
cc662dd768 Adding struct tx_probs and struct tx_counts to cleanup the code.
Also removing unused declarations from vp9_entropymode.h file.

Change-Id: Ib9c5826db3584a32f6bb3297a76c522b99d83402
2013-07-12 15:22:38 -07:00
Deb Mukherjee
a43ff15399 New probs for filters/tx_size and a few others
* 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-10 16:38:47 -07:00
Deb Mukherjee
17da2cab78 TX_SIZE contexts simplification.
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-08 12:32:26 -07:00
Deb Mukherjee
21401942b0 Coding tx-size selection by use of spatial context
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-07 16:07:58 -07:00
Deb Mukherjee
3ee1a21a42 Coding updates for tx-size selection
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-07 08:54:00 -07:00
Ronald S. Bultje
ad34368786 New intra mode and partitioning probabilities.
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-06 10:45:30 -07:00
Deb Mukherjee
30226a658f Cosmetic renaming VP9_MVREFS to VP9_INTER_MODES
NO bitstream change

Change-Id: I79f6146dac5fdd157051b6f8dc611c0b7b5e5f7f
2013-06-05 11:24:01 -07:00
Ronald S. Bultje
a433abbcad Merge VP9_YMODES, VP9_UV_MODES, INTRA_MODE_COUNT and cousins.
These are now merged in a new define called VP9_INTRA_MODES.

Change-Id: I0890f895756a7395d84c92f98f43e43f4cf9050d
2013-05-30 17:21:06 -07:00
Ronald S. Bultje
98c192ae83 Merge all intra mode coding trees into a single one.
Also merge all counters. This removes a few unused probability updates
from the bitstream.

Change-Id: I20f58853e9dac84d8c0d9703ae012c55917516eb
2013-05-30 09:58:53 -07:00
Ronald S. Bultje
4487f5a690 Remove some unused code related to macroblock/splitmv coding.
Change-Id: Ic40d56fb162f4e201547dfae33e62ccd9e865889
2013-05-29 06:29:56 -07:00
Yaowu Xu
2b96ffe025 a few clean-ups
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-27 13:53:56 -07:00