1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/common/entropymode.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,80 @@ 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 + 1.15 +#ifndef __INC_ENTROPYMODE_H 1.16 +#define __INC_ENTROPYMODE_H 1.17 + 1.18 +#include "onyxc_int.h" 1.19 +#include "treecoder.h" 1.20 + 1.21 +typedef enum 1.22 +{ 1.23 + SUBMVREF_NORMAL, 1.24 + SUBMVREF_LEFT_ZED, 1.25 + SUBMVREF_ABOVE_ZED, 1.26 + SUBMVREF_LEFT_ABOVE_SAME, 1.27 + SUBMVREF_LEFT_ABOVE_ZED 1.28 +} sumvfref_t; 1.29 + 1.30 +typedef int vp8_mbsplit[16]; 1.31 + 1.32 +#define VP8_NUMMBSPLITS 4 1.33 + 1.34 +extern const vp8_mbsplit vp8_mbsplits [VP8_NUMMBSPLITS]; 1.35 + 1.36 +extern const int vp8_mbsplit_count [VP8_NUMMBSPLITS]; /* # of subsets */ 1.37 + 1.38 +extern const vp8_prob vp8_mbsplit_probs [VP8_NUMMBSPLITS-1]; 1.39 + 1.40 +extern int vp8_mv_cont(const int_mv *l, const int_mv *a); 1.41 +#define SUBMVREF_COUNT 5 1.42 +extern const vp8_prob vp8_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP8_SUBMVREFS-1]; 1.43 + 1.44 + 1.45 +extern const unsigned int vp8_kf_default_bmode_counts [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES]; 1.46 + 1.47 + 1.48 +extern const vp8_tree_index vp8_bmode_tree[]; 1.49 + 1.50 +extern const vp8_tree_index vp8_ymode_tree[]; 1.51 +extern const vp8_tree_index vp8_kf_ymode_tree[]; 1.52 +extern const vp8_tree_index vp8_uv_mode_tree[]; 1.53 + 1.54 +extern const vp8_tree_index vp8_mbsplit_tree[]; 1.55 +extern const vp8_tree_index vp8_mv_ref_tree[]; 1.56 +extern const vp8_tree_index vp8_sub_mv_ref_tree[]; 1.57 + 1.58 +extern const struct vp8_token_struct vp8_bmode_encodings[VP8_BINTRAMODES]; 1.59 +extern const struct vp8_token_struct vp8_ymode_encodings[VP8_YMODES]; 1.60 +extern const struct vp8_token_struct vp8_kf_ymode_encodings[VP8_YMODES]; 1.61 +extern const struct vp8_token_struct vp8_uv_mode_encodings[VP8_UV_MODES]; 1.62 +extern const struct vp8_token_struct vp8_mbsplit_encodings[VP8_NUMMBSPLITS]; 1.63 + 1.64 +/* Inter mode values do not start at zero */ 1.65 + 1.66 +extern const struct vp8_token_struct vp8_mv_ref_encoding_array[VP8_MVREFS]; 1.67 +extern const struct vp8_token_struct vp8_sub_mv_ref_encoding_array[VP8_SUBMVREFS]; 1.68 + 1.69 +extern const vp8_tree_index vp8_small_mvtree[]; 1.70 + 1.71 +extern const struct vp8_token_struct vp8_small_mvencodings[8]; 1.72 + 1.73 +/* Key frame default mode probs */ 1.74 +extern const vp8_prob vp8_kf_bmode_prob[VP8_BINTRAMODES][VP8_BINTRAMODES] 1.75 +[VP8_BINTRAMODES-1]; 1.76 +extern const vp8_prob vp8_kf_uv_mode_prob[VP8_UV_MODES-1]; 1.77 +extern const vp8_prob vp8_kf_ymode_prob[VP8_YMODES-1]; 1.78 + 1.79 +void vp8_init_mbmode_probs(VP8_COMMON *x); 1.80 +void vp8_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES-1]); 1.81 +void vp8_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1]); 1.82 + 1.83 +#endif