1 /* 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 12 #ifndef __INC_ENTROPYMODE_H 13 #define __INC_ENTROPYMODE_H 14 15 #include "onyxc_int.h" 16 #include "treecoder.h" 17 18 typedef const int vp8_mbsplit[16]; 19 20 #define VP8_NUMMBSPLITS 4 21 22 extern vp8_mbsplit vp8_mbsplits [VP8_NUMMBSPLITS]; 23 24 extern const int vp8_mbsplit_count [VP8_NUMMBSPLITS]; /* # of subsets */ 25 26 extern const vp8_prob vp8_mbsplit_probs [VP8_NUMMBSPLITS-1]; 27 28 extern int vp8_mv_cont(const MV *l, const MV *a); 29 #define SUBMVREF_COUNT 5 30 extern const vp8_prob vp8_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP8_SUBMVREFS-1]; 31 32 33 extern const unsigned int vp8_kf_default_bmode_counts [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES]; 34 35 36 extern const vp8_tree_index vp8_bmode_tree[]; 37 38 extern const vp8_tree_index vp8_ymode_tree[]; 39 extern const vp8_tree_index vp8_kf_ymode_tree[]; 40 extern const vp8_tree_index vp8_uv_mode_tree[]; 41 42 extern const vp8_tree_index vp8_mbsplit_tree[]; 43 extern const vp8_tree_index vp8_mv_ref_tree[]; 44 extern const vp8_tree_index vp8_sub_mv_ref_tree[]; 45 46 extern struct vp8_token_struct vp8_bmode_encodings [VP8_BINTRAMODES]; 47 extern struct vp8_token_struct vp8_ymode_encodings [VP8_YMODES]; 48 extern struct vp8_token_struct vp8_kf_ymode_encodings [VP8_YMODES]; 49 extern struct vp8_token_struct vp8_uv_mode_encodings [VP8_UV_MODES]; 50 extern struct vp8_token_struct vp8_mbsplit_encodings [VP8_NUMMBSPLITS]; 51 52 /* Inter mode values do not start at zero */ 53 54 extern struct vp8_token_struct vp8_mv_ref_encoding_array [VP8_MVREFS]; 55 extern struct vp8_token_struct vp8_sub_mv_ref_encoding_array [VP8_SUBMVREFS]; 56 57 extern const vp8_tree_index vp8_small_mvtree[]; 58 59 extern struct vp8_token_struct vp8_small_mvencodings [8]; 60 61 void vp8_entropy_mode_init(void); 62 63 void vp8_init_mbmode_probs(VP8_COMMON *x); 64 65 void vp8_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES-1]); 66 void vp8_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1]); 67 68 #endif 69