media/libvpx/vp9/common/vp9_entropymode.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libvpx/vp9/common/vp9_entropymode.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,72 @@
     1.4 +/*
     1.5 + *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
     1.6 + *
     1.7 + *  Use of this source code is governed by a BSD-style license
     1.8 + *  that can be found in the LICENSE file in the root of the source
     1.9 + *  tree. An additional intellectual property rights grant can be found
    1.10 + *  in the file PATENTS.  All contributing project authors may
    1.11 + *  be found in the AUTHORS file in the root of the source tree.
    1.12 + */
    1.13 +
    1.14 +#ifndef VP9_COMMON_VP9_ENTROPYMODE_H_
    1.15 +#define VP9_COMMON_VP9_ENTROPYMODE_H_
    1.16 +
    1.17 +#include "vp9/common/vp9_blockd.h"
    1.18 +#include "vp9/common/vp9_treecoder.h"
    1.19 +
    1.20 +#define TX_SIZE_CONTEXTS 2
    1.21 +#define SWITCHABLE_FILTERS 3   // number of switchable filters
    1.22 +#define SWITCHABLE_FILTER_CONTEXTS (SWITCHABLE_FILTERS + 1)
    1.23 +
    1.24 +// #define MODE_STATS
    1.25 +
    1.26 +struct VP9Common;
    1.27 +
    1.28 +struct tx_probs {
    1.29 +  vp9_prob p32x32[TX_SIZE_CONTEXTS][TX_SIZES - 1];
    1.30 +  vp9_prob p16x16[TX_SIZE_CONTEXTS][TX_SIZES - 2];
    1.31 +  vp9_prob p8x8[TX_SIZE_CONTEXTS][TX_SIZES - 3];
    1.32 +};
    1.33 +
    1.34 +struct tx_counts {
    1.35 +  unsigned int p32x32[TX_SIZE_CONTEXTS][TX_SIZES];
    1.36 +  unsigned int p16x16[TX_SIZE_CONTEXTS][TX_SIZES - 1];
    1.37 +  unsigned int p8x8[TX_SIZE_CONTEXTS][TX_SIZES - 2];
    1.38 +};
    1.39 +
    1.40 +extern const vp9_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
    1.41 +extern const vp9_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
    1.42 +                                        [INTRA_MODES - 1];
    1.43 +
    1.44 +extern const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS]
    1.45 +                                            [PARTITION_TYPES - 1];
    1.46 +
    1.47 +extern const vp9_tree_index vp9_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
    1.48 +extern struct vp9_token vp9_intra_mode_encodings[INTRA_MODES];
    1.49 +
    1.50 +extern const vp9_tree_index vp9_inter_mode_tree[TREE_SIZE(INTER_MODES)];
    1.51 +extern struct vp9_token vp9_inter_mode_encodings[INTER_MODES];
    1.52 +
    1.53 +extern const vp9_tree_index vp9_partition_tree[TREE_SIZE(PARTITION_TYPES)];
    1.54 +extern struct vp9_token vp9_partition_encodings[PARTITION_TYPES];
    1.55 +
    1.56 +extern const vp9_tree_index vp9_switchable_interp_tree
    1.57 +                                [TREE_SIZE(SWITCHABLE_FILTERS)];
    1.58 +extern struct vp9_token vp9_switchable_interp_encodings[SWITCHABLE_FILTERS];
    1.59 +
    1.60 +void vp9_entropy_mode_init();
    1.61 +
    1.62 +void vp9_setup_past_independence(struct VP9Common *cm);
    1.63 +
    1.64 +void vp9_init_mbmode_probs(struct VP9Common *cm);
    1.65 +
    1.66 +void vp9_adapt_mode_probs(struct VP9Common *cm);
    1.67 +
    1.68 +void tx_counts_to_branch_counts_32x32(const unsigned int *tx_count_32x32p,
    1.69 +                                      unsigned int (*ct_32x32p)[2]);
    1.70 +void tx_counts_to_branch_counts_16x16(const unsigned int *tx_count_16x16p,
    1.71 +                                      unsigned int (*ct_16x16p)[2]);
    1.72 +void tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p,
    1.73 +                                    unsigned int (*ct_8x8p)[2]);
    1.74 +
    1.75 +#endif  // VP9_COMMON_VP9_ENTROPYMODE_H_

mercurial