diff options
author | Scott LaVarnway <slavarnway@google.com> | 2015-05-22 11:19:51 -0700 |
---|---|---|
committer | Scott LaVarnway <slavarnway@google.com> | 2015-05-22 11:19:51 -0700 |
commit | b962646fc588b4b0ff1e527f8aaf7c7f5eaf14cd (patch) | |
tree | e5abfb889c8467e2c0102fe3abb0df313e41a5d4 /vp9/common/vp9_entropy.h | |
parent | 37d03809bfb523910b2a07a726a0dad82980047b (diff) | |
download | libvpx-b962646fc588b4b0ff1e527f8aaf7c7f5eaf14cd.tar libvpx-b962646fc588b4b0ff1e527f8aaf7c7f5eaf14cd.tar.gz libvpx-b962646fc588b4b0ff1e527f8aaf7c7f5eaf14cd.tar.bz2 libvpx-b962646fc588b4b0ff1e527f8aaf7c7f5eaf14cd.zip |
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
Diffstat (limited to 'vp9/common/vp9_entropy.h')
-rw-r--r-- | vp9/common/vp9_entropy.h | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h index 5a9007b54..4e02630e6 100644 --- a/vp9/common/vp9_entropy.h +++ b/vp9/common/vp9_entropy.h @@ -14,8 +14,8 @@ #include "vpx/vpx_integer.h" #include "vp9/common/vp9_common.h" +#include "vp9/common/vp9_enums.h" #include "vp9/common/vp9_prob.h" -#include "vp9/common/vp9_scan.h" #ifdef __cplusplus extern "C" { @@ -137,18 +137,6 @@ struct VP9Common; void vp9_default_coef_probs(struct VP9Common *cm); void vp9_adapt_coef_probs(struct VP9Common *cm); -static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) { - int i; - for (i = 0; i < MAX_MB_PLANE; i++) { - struct macroblockd_plane *const pd = &xd->plane[i]; - const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd); - memset(pd->above_context, 0, - sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_wide_lookup[plane_bsize]); - memset(pd->left_context, 0, - sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_high_lookup[plane_bsize]); - } -} - // This is the index in the scan order beyond which all coefficients for // 8x8 transform and above are in the top band. // This macro is currently unused but may be used by certain implementations @@ -185,6 +173,13 @@ typedef unsigned int vp9_coeff_count_model[REF_TYPES][COEF_BANDS] void vp9_model_to_full_probs(const vp9_prob *model, vp9_prob *full); +typedef char ENTROPY_CONTEXT; + +static INLINE int combine_entropy_contexts(ENTROPY_CONTEXT a, + ENTROPY_CONTEXT b) { + return (a != 0) + (b != 0); +} + static INLINE int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a, const ENTROPY_CONTEXT *l) { ENTROPY_CONTEXT above_ec = 0, left_ec = 0; @@ -214,18 +209,6 @@ static INLINE int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a, return combine_entropy_contexts(above_ec, left_ec); } -static INLINE const scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size, - PLANE_TYPE type, int block_idx) { - const MODE_INFO *const mi = xd->mi[0]; - - if (is_inter_block(&mi->mbmi) || type != PLANE_TYPE_Y || xd->lossless) { - return &vp9_default_scan_orders[tx_size]; - } else { - const PREDICTION_MODE mode = get_y_mode(mi, block_idx); - return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; - } -} - #ifdef __cplusplus } // extern "C" #endif |