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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_tokenize.h

Issue 11974002: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 11 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
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
12 #ifndef VP9_ENCODER_VP9_TOKENIZE_H_ 11 #ifndef VP9_ENCODER_VP9_TOKENIZE_H_
13 #define VP9_ENCODER_VP9_TOKENIZE_H_ 12 #define VP9_ENCODER_VP9_TOKENIZE_H_
14 13
15 #include "vp9/common/vp9_entropy.h" 14 #include "vp9/common/vp9_entropy.h"
16 #include "vp9/encoder/vp9_block.h" 15 #include "vp9/encoder/vp9_block.h"
17 16
18 void vp9_tokenize_initialize(); 17 void vp9_tokenize_initialize();
19 18
20 typedef struct { 19 typedef struct {
21 short Token; 20 int16_t Token;
22 short Extra; 21 int16_t Extra;
23 } TOKENVALUE; 22 } TOKENVALUE;
24 23
25 typedef struct { 24 typedef struct {
26 const vp9_prob *context_tree; 25 const vp9_prob *context_tree;
27 short Extra; 26 int16_t Extra;
28 unsigned char Token; 27 uint8_t Token;
29 unsigned char skip_eob_node; 28 uint8_t skip_eob_node;
30 } TOKENEXTRA; 29 } TOKENEXTRA;
31 30
31 typedef int64_t vp9_coeff_accum[COEF_BANDS][PREV_COEF_CONTEXTS]
32 [MAX_ENTROPY_TOKENS];
33
32 extern int vp9_mby_is_skippable_4x4(MACROBLOCKD *xd, int has_y2_block); 34 extern int vp9_mby_is_skippable_4x4(MACROBLOCKD *xd, int has_y2_block);
33 extern int vp9_mbuv_is_skippable_4x4(MACROBLOCKD *xd); 35 extern int vp9_mbuv_is_skippable_4x4(MACROBLOCKD *xd);
34 extern int vp9_mby_is_skippable_8x8(MACROBLOCKD *xd, int has_y2_block); 36 extern int vp9_mby_is_skippable_8x8(MACROBLOCKD *xd, int has_y2_block);
35 extern int vp9_mbuv_is_skippable_8x8(MACROBLOCKD *xd); 37 extern int vp9_mbuv_is_skippable_8x8(MACROBLOCKD *xd);
36 extern int vp9_mby_is_skippable_16x16(MACROBLOCKD *xd); 38 extern int vp9_mby_is_skippable_16x16(MACROBLOCKD *xd);
39 extern int vp9_sby_is_skippable_32x32(MACROBLOCKD *xd);
40 extern int vp9_sbuv_is_skippable_16x16(MACROBLOCKD *xd);
37 41
38 struct VP9_COMP; 42 struct VP9_COMP;
39 43
40 extern void vp9_tokenize_mb(struct VP9_COMP *cpi, MACROBLOCKD *xd, 44 extern void vp9_tokenize_mb(struct VP9_COMP *cpi, MACROBLOCKD *xd,
41 TOKENEXTRA **t, int dry_run); 45 TOKENEXTRA **t, int dry_run);
46 extern void vp9_tokenize_sb(struct VP9_COMP *cpi, MACROBLOCKD *xd,
47 TOKENEXTRA **t, int dry_run);
42 48
43 extern void vp9_stuff_mb(struct VP9_COMP *cpi, MACROBLOCKD *xd, 49 extern void vp9_stuff_mb(struct VP9_COMP *cpi, MACROBLOCKD *xd,
44 TOKENEXTRA **t, int dry_run); 50 TOKENEXTRA **t, int dry_run);
51 extern void vp9_stuff_sb(struct VP9_COMP *cpi, MACROBLOCKD *xd,
52 TOKENEXTRA **t, int dry_run);
45 53
46 extern void vp9_fix_contexts(MACROBLOCKD *xd); 54 extern void vp9_fix_contexts_sb(MACROBLOCKD *xd);
47
48 #ifdef ENTROPY_STATS 55 #ifdef ENTROPY_STATS
49 void init_context_counters(); 56 void init_context_counters();
50 void print_context_counters(); 57 void print_context_counters();
51 58
52 extern INT64 context_counters[BLOCK_TYPES][COEF_BANDS] 59 extern vp9_coeff_accum context_counters_4x4[BLOCK_TYPES_4X4];
53 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; 60 extern vp9_coeff_accum context_counters_8x8[BLOCK_TYPES_8X8];
54 extern INT64 context_counters_8x8[BLOCK_TYPES_8X8][COEF_BANDS] 61 extern vp9_coeff_accum context_counters_16x16[BLOCK_TYPES_16X16];
55 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; 62 extern vp9_coeff_accum context_counters_32x32[BLOCK_TYPES_32X32];
56 extern INT64 context_counters_16x16[BLOCK_TYPES_16X16][COEF_BANDS] 63
57 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; 64 extern vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4];
65 extern vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8];
66 extern vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16];
58 #endif 67 #endif
59 68
60 extern const int *vp9_dct_value_cost_ptr; 69 extern const int *vp9_dct_value_cost_ptr;
61 /* TODO: The Token field should be broken out into a separate char array to 70 /* TODO: The Token field should be broken out into a separate char array to
62 * improve cache locality, since it's needed for costing when the rest of the 71 * improve cache locality, since it's needed for costing when the rest of the
63 * fields are not. 72 * fields are not.
64 */ 73 */
65 extern const TOKENVALUE *vp9_dct_value_tokens_ptr; 74 extern const TOKENVALUE *vp9_dct_value_tokens_ptr;
66 75
67 #endif /* tokenize_h */ 76 #endif // VP9_ENCODER_VP9_TOKENIZE_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_temporal_filter.c ('k') | source/libvpx/vp9/encoder/vp9_tokenize.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698