Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: source/libvpx/vp9/common/vp9_entropy.h

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_debugmodes.c ('k') | source/libvpx/vp9/common/vp9_entropy.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #define CAT6_MIN_VAL 67 51 #define CAT6_MIN_VAL 67
52 52
53 // Extra bit probabilities. 53 // Extra bit probabilities.
54 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat1_prob[1]); 54 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat1_prob[1]);
55 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat2_prob[2]); 55 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat2_prob[2]);
56 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat3_prob[3]); 56 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat3_prob[3]);
57 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat4_prob[4]); 57 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat4_prob[4]);
58 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat5_prob[5]); 58 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat5_prob[5]);
59 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat6_prob[14]); 59 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat6_prob[14]);
60 60
61 #if CONFIG_VP9_HIGHBITDEPTH
62 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat1_prob_high10[1]);
63 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat2_prob_high10[2]);
64 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat3_prob_high10[3]);
65 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat4_prob_high10[4]);
66 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat5_prob_high10[5]);
67 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat6_prob_high10[16]);
68 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat1_prob_high12[1]);
69 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat2_prob_high12[2]);
70 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat3_prob_high12[3]);
71 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat4_prob_high12[4]);
72 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat5_prob_high12[5]);
73 DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat6_prob_high12[18]);
74 #endif // CONFIG_VP9_HIGHBITDEPTH
75
61 #define EOB_MODEL_TOKEN 3 76 #define EOB_MODEL_TOKEN 3
62 extern const vp9_tree_index vp9_coefmodel_tree[]; 77 extern const vp9_tree_index vp9_coefmodel_tree[];
63 78
64 typedef struct { 79 typedef struct {
65 const vp9_tree_index *tree; 80 const vp9_tree_index *tree;
66 const vp9_prob *prob; 81 const vp9_prob *prob;
67 int len; 82 int len;
68 int base_val; 83 int base_val;
69 } vp9_extra_bit; 84 } vp9_extra_bit;
70 85
71 // indexed by token value 86 // indexed by token value
72 extern const vp9_extra_bit vp9_extra_bits[ENTROPY_TOKENS]; 87 extern const vp9_extra_bit vp9_extra_bits[ENTROPY_TOKENS];
88 #if CONFIG_VP9_HIGHBITDEPTH
89 extern const vp9_extra_bit vp9_extra_bits_high10[ENTROPY_TOKENS];
90 extern const vp9_extra_bit vp9_extra_bits_high12[ENTROPY_TOKENS];
91 #endif // CONFIG_VP9_HIGHBITDEPTH
73 92
74 #define DCT_MAX_VALUE 16384 93 #define DCT_MAX_VALUE 16384
94 #if CONFIG_VP9_HIGHBITDEPTH
95 #define DCT_MAX_VALUE_HIGH10 65536
96 #define DCT_MAX_VALUE_HIGH12 262144
97 #endif // CONFIG_VP9_HIGHBITDEPTH
75 98
76 /* Coefficients are predicted via a 3-dimensional probability table. */ 99 /* Coefficients are predicted via a 3-dimensional probability table. */
77 100
78 #define REF_TYPES 2 // intra=0, inter=1 101 #define REF_TYPES 2 // intra=0, inter=1
79 102
80 /* Middle dimension reflects the coefficient position within the transform. */ 103 /* Middle dimension reflects the coefficient position within the transform. */
81 #define COEF_BANDS 6 104 #define COEF_BANDS 6
82 105
83 /* Inside dimension is measure of nearby complexity, that reflects the energy 106 /* Inside dimension is measure of nearby complexity, that reflects the energy
84 of nearby coefficients are nonzero. For the first coefficient (DC, unless 107 of nearby coefficients are nonzero. For the first coefficient (DC, unless
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 default: 207 default:
185 assert(0 && "Invalid transform size."); 208 assert(0 && "Invalid transform size.");
186 break; 209 break;
187 } 210 }
188 211
189 return combine_entropy_contexts(above_ec, left_ec); 212 return combine_entropy_contexts(above_ec, left_ec);
190 } 213 }
191 214
192 static INLINE const scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size, 215 static INLINE const scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
193 PLANE_TYPE type, int block_idx) { 216 PLANE_TYPE type, int block_idx) {
194 const MODE_INFO *const mi = xd->mi[0]; 217 const MODE_INFO *const mi = xd->mi[0].src_mi;
195 218
196 if (is_inter_block(&mi->mbmi) || type != PLANE_TYPE_Y || xd->lossless) { 219 if (is_inter_block(&mi->mbmi) || type != PLANE_TYPE_Y || xd->lossless) {
197 return &vp9_default_scan_orders[tx_size]; 220 return &vp9_default_scan_orders[tx_size];
198 } else { 221 } else {
199 const PREDICTION_MODE mode = get_y_mode(mi, block_idx); 222 const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
200 return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; 223 return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
201 } 224 }
202 } 225 }
203 226
204 #ifdef __cplusplus 227 #ifdef __cplusplus
205 } // extern "C" 228 } // extern "C"
206 #endif 229 #endif
207 230
208 #endif // VP9_COMMON_VP9_ENTROPY_H_ 231 #endif // VP9_COMMON_VP9_ENTROPY_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_debugmodes.c ('k') | source/libvpx/vp9/common/vp9_entropy.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698