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

Side by Side Diff: source/libvpx/vp8/encoder/tokenize.c

Issue 3417017: Update libvpx sources to v0.9.2-35-ga8a38bc. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 10 years, 2 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/vp8/encoder/tokenize.h ('k') | source/libvpx/vp8/encoder/treewriter.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 VP8 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 11
12 #include <math.h> 12 #include <math.h>
13 #include <stdio.h> 13 #include <stdio.h>
14 #include <string.h> 14 #include <string.h>
15 #include <assert.h> 15 #include <assert.h>
16 #include "onyx_int.h" 16 #include "onyx_int.h"
17 #include "tokenize.h" 17 #include "tokenize.h"
18 #include "vpx_mem/vpx_mem.h" 18 #include "vpx_mem/vpx_mem.h"
19 19
20 /* Global event counters used for accumulating statistics across several 20 /* Global event counters used for accumulating statistics across several
21 compressions, then generating context.c = initial stats. */ 21 compressions, then generating context.c = initial stats. */
22 22
23 #ifdef ENTROPY_STATS 23 #ifdef ENTROPY_STATS
24 _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [vp8_coef _tokens]; 24 _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [vp8_coef _tokens];
25 #endif 25 #endif
26 void vp8_stuff_mb(VP8_COMP *cpi, MACROBLOCKD *x, TOKENEXTRA **t) ; 26 void vp8_stuff_mb(VP8_COMP *cpi, MACROBLOCKD *x, TOKENEXTRA **t) ;
27 void vp8_fix_contexts(MACROBLOCKD *x); 27 void vp8_fix_contexts(MACROBLOCKD *x);
28 28
29 TOKENEXTRA vp8_dct_value_tokens[DCT_MAX_VALUE*2]; 29 TOKENVALUE vp8_dct_value_tokens[DCT_MAX_VALUE*2];
30 const TOKENEXTRA *vp8_dct_value_tokens_ptr; 30 const TOKENVALUE *vp8_dct_value_tokens_ptr;
31 int vp8_dct_value_cost[DCT_MAX_VALUE*2]; 31 int vp8_dct_value_cost[DCT_MAX_VALUE*2];
32 const int *vp8_dct_value_cost_ptr; 32 const int *vp8_dct_value_cost_ptr;
33 #if 0 33 #if 0
34 int skip_true_count = 0; 34 int skip_true_count = 0;
35 int skip_false_count = 0; 35 int skip_false_count = 0;
36 #endif 36 #endif
37 static void fill_value_tokens() 37 static void fill_value_tokens()
38 { 38 {
39 39
40 TOKENEXTRA *const t = vp8_dct_value_tokens + DCT_MAX_VALUE; 40 TOKENVALUE *const t = vp8_dct_value_tokens + DCT_MAX_VALUE;
41 vp8_extra_bit_struct *const e = vp8_extra_bits; 41 vp8_extra_bit_struct *const e = vp8_extra_bits;
42 42
43 int i = -DCT_MAX_VALUE; 43 int i = -DCT_MAX_VALUE;
44 int sign = 1; 44 int sign = 1;
45 45
46 do 46 do
47 { 47 {
48 if (!i) 48 if (!i)
49 sign = 0; 49 sign = 0;
50 50
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); 548 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
549 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); 549 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
550 } 550 }
551 else 551 else
552 { 552 {
553 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); 553 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
554 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); 554 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
555 } 555 }
556 556
557 } 557 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/tokenize.h ('k') | source/libvpx/vp8/encoder/treewriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698