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

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

Issue 232133009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 8 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_entropymode.h » ('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
11 #ifndef VP9_COMMON_VP9_ENTROPY_H_ 11 #ifndef VP9_COMMON_VP9_ENTROPY_H_
12 #define VP9_COMMON_VP9_ENTROPY_H_ 12 #define VP9_COMMON_VP9_ENTROPY_H_
13 13
14 #include "vpx/vpx_integer.h" 14 #include "vpx/vpx_integer.h"
15 15
16 #include "vp9/common/vp9_blockd.h" 16 #include "vp9/common/vp9_blockd.h"
17 #include "vp9/common/vp9_common.h" 17 #include "vp9/common/vp9_common.h"
18 #include "vp9/common/vp9_scan.h" 18 #include "vp9/common/vp9_scan.h"
19 #include "vp9/common/vp9_entropymode.h"
20 19
21 #ifdef __cplusplus 20 #ifdef __cplusplus
22 extern "C" { 21 extern "C" {
23 #endif 22 #endif
24 23
25 #define DIFF_UPDATE_PROB 252 24 #define DIFF_UPDATE_PROB 252
26 25
27 // Coefficient token alphabet 26 // Coefficient token alphabet
28 #define ZERO_TOKEN 0 // 0 Extra Bits 0+0 27 #define ZERO_TOKEN 0 // 0 Extra Bits 0+0
29 #define ONE_TOKEN 1 // 1 Extra Bits 0+1 28 #define ONE_TOKEN 1 // 1 Extra Bits 0+1
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 break; 168 break;
170 default: 169 default:
171 assert(0 && "Invalid transform size."); 170 assert(0 && "Invalid transform size.");
172 } 171 }
173 172
174 return combine_entropy_contexts(above_ec, left_ec); 173 return combine_entropy_contexts(above_ec, left_ec);
175 } 174 }
176 175
177 static const INLINE scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size, 176 static const INLINE scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
178 PLANE_TYPE type, int block_idx) { 177 PLANE_TYPE type, int block_idx) {
179 const MODE_INFO *const mi = xd->mi_8x8[0]; 178 const MODE_INFO *const mi = xd->mi[0];
180 179
181 if (is_inter_block(&mi->mbmi) || type != PLANE_TYPE_Y || xd->lossless) { 180 if (is_inter_block(&mi->mbmi) || type != PLANE_TYPE_Y || xd->lossless) {
182 return &vp9_default_scan_orders[tx_size]; 181 return &vp9_default_scan_orders[tx_size];
183 } else { 182 } else {
184 const MB_PREDICTION_MODE mode = get_y_mode(mi, block_idx); 183 const MB_PREDICTION_MODE mode = get_y_mode(mi, block_idx);
185 return &vp9_scan_orders[tx_size][mode2txfm_map[mode]]; 184 return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
186 } 185 }
187 } 186 }
188 187
189 #ifdef __cplusplus 188 #ifdef __cplusplus
190 } // extern "C" 189 } // extern "C"
191 #endif 190 #endif
192 191
193 #endif // VP9_COMMON_VP9_ENTROPY_H_ 192 #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_entropymode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698