Merge "vp8_rd_pick_best_mbsegmentation code restructure"
[libvpx.git] / vp8 / common / entropymode.h
blobda6ae8eada613ebf9497b81caca880baca4b10ae
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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 */
12 #ifndef __INC_ENTROPYMODE_H
13 #define __INC_ENTROPYMODE_H
15 #include "onyxc_int.h"
16 #include "treecoder.h"
18 typedef const int vp8_mbsplit[16];
20 #define VP8_NUMMBSPLITS 4
22 extern vp8_mbsplit vp8_mbsplits [VP8_NUMMBSPLITS];
24 extern const int vp8_mbsplit_count [VP8_NUMMBSPLITS]; /* # of subsets */
26 extern const vp8_prob vp8_mbsplit_probs [VP8_NUMMBSPLITS-1];
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];
33 extern const unsigned int vp8_kf_default_bmode_counts [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES];
36 extern const vp8_tree_index vp8_bmode_tree[];
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[];
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[];
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];
52 /* Inter mode values do not start at zero */
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];
57 extern const vp8_tree_index vp8_small_mvtree[];
59 extern struct vp8_token_struct vp8_small_mvencodings [8];
61 void vp8_entropy_mode_init(void);
63 void vp8_init_mbmode_probs(VP8_COMMON *x);
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]);
68 #endif