michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #ifndef __INC_ENTROPYMODE_H michael@0: #define __INC_ENTROPYMODE_H michael@0: michael@0: #include "onyxc_int.h" michael@0: #include "treecoder.h" michael@0: michael@0: typedef enum michael@0: { michael@0: SUBMVREF_NORMAL, michael@0: SUBMVREF_LEFT_ZED, michael@0: SUBMVREF_ABOVE_ZED, michael@0: SUBMVREF_LEFT_ABOVE_SAME, michael@0: SUBMVREF_LEFT_ABOVE_ZED michael@0: } sumvfref_t; michael@0: michael@0: typedef int vp8_mbsplit[16]; michael@0: michael@0: #define VP8_NUMMBSPLITS 4 michael@0: michael@0: extern const vp8_mbsplit vp8_mbsplits [VP8_NUMMBSPLITS]; michael@0: michael@0: extern const int vp8_mbsplit_count [VP8_NUMMBSPLITS]; /* # of subsets */ michael@0: michael@0: extern const vp8_prob vp8_mbsplit_probs [VP8_NUMMBSPLITS-1]; michael@0: michael@0: extern int vp8_mv_cont(const int_mv *l, const int_mv *a); michael@0: #define SUBMVREF_COUNT 5 michael@0: extern const vp8_prob vp8_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP8_SUBMVREFS-1]; michael@0: michael@0: michael@0: extern const unsigned int vp8_kf_default_bmode_counts [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES]; michael@0: michael@0: michael@0: extern const vp8_tree_index vp8_bmode_tree[]; michael@0: michael@0: extern const vp8_tree_index vp8_ymode_tree[]; michael@0: extern const vp8_tree_index vp8_kf_ymode_tree[]; michael@0: extern const vp8_tree_index vp8_uv_mode_tree[]; michael@0: michael@0: extern const vp8_tree_index vp8_mbsplit_tree[]; michael@0: extern const vp8_tree_index vp8_mv_ref_tree[]; michael@0: extern const vp8_tree_index vp8_sub_mv_ref_tree[]; michael@0: michael@0: extern const struct vp8_token_struct vp8_bmode_encodings[VP8_BINTRAMODES]; michael@0: extern const struct vp8_token_struct vp8_ymode_encodings[VP8_YMODES]; michael@0: extern const struct vp8_token_struct vp8_kf_ymode_encodings[VP8_YMODES]; michael@0: extern const struct vp8_token_struct vp8_uv_mode_encodings[VP8_UV_MODES]; michael@0: extern const struct vp8_token_struct vp8_mbsplit_encodings[VP8_NUMMBSPLITS]; michael@0: michael@0: /* Inter mode values do not start at zero */ michael@0: michael@0: extern const struct vp8_token_struct vp8_mv_ref_encoding_array[VP8_MVREFS]; michael@0: extern const struct vp8_token_struct vp8_sub_mv_ref_encoding_array[VP8_SUBMVREFS]; michael@0: michael@0: extern const vp8_tree_index vp8_small_mvtree[]; michael@0: michael@0: extern const struct vp8_token_struct vp8_small_mvencodings[8]; michael@0: michael@0: /* Key frame default mode probs */ michael@0: extern const vp8_prob vp8_kf_bmode_prob[VP8_BINTRAMODES][VP8_BINTRAMODES] michael@0: [VP8_BINTRAMODES-1]; michael@0: extern const vp8_prob vp8_kf_uv_mode_prob[VP8_UV_MODES-1]; michael@0: extern const vp8_prob vp8_kf_ymode_prob[VP8_YMODES-1]; michael@0: michael@0: void vp8_init_mbmode_probs(VP8_COMMON *x); michael@0: void vp8_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES-1]); michael@0: void vp8_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1]); michael@0: michael@0: #endif