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

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

Issue 13849011: libvpx: Pull from upstream (Closed) Base URL: https://src.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 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
« no previous file with comments | « source/libvpx/vp8/encoder/tokenize.h ('k') | source/libvpx/vp8/encoder/x86/quantize_sse2.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
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 VP8_ENTROPY_STATS
24 _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTR OPY_TOKENS]; 24 _int64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTR OPY_TOKENS];
25 #endif 25 #endif
26 void vp8_stuff_mb(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t) ; 26 void vp8_stuff_mb(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t) ;
27 void vp8_fix_contexts(MACROBLOCKD *x); 27 void vp8_fix_contexts(MACROBLOCKD *x);
28 28
29 #include "dct_value_tokens.h" 29 #include "dct_value_tokens.h"
30 #include "dct_value_cost.h" 30 #include "dct_value_cost.h"
31 31
32 const TOKENVALUE *const vp8_dct_value_tokens_ptr = dct_value_tokens + 32 const TOKENVALUE *const vp8_dct_value_tokens_ptr = dct_value_tokens +
33 DCT_MAX_VALUE; 33 DCT_MAX_VALUE;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 if(has_y2_block) 406 if(has_y2_block)
407 { 407 {
408 tokenize2nd_order_b(x, t, cpi); 408 tokenize2nd_order_b(x, t, cpi);
409 plane_type = 0; 409 plane_type = 0;
410 } 410 }
411 411
412 tokenize1st_order_b(x, t, plane_type, cpi); 412 tokenize1st_order_b(x, t, plane_type, cpi);
413 } 413 }
414 414
415 415
416 #ifdef ENTROPY_STATS 416 #ifdef VP8_ENTROPY_STATS
417 417
418 void init_context_counters(void) 418 void init_context_counters(void)
419 { 419 {
420 vpx_memset(context_counters, 0, sizeof(context_counters)); 420 vpx_memset(context_counters, 0, sizeof(context_counters));
421 } 421 }
422 422
423 void print_context_counters() 423 void print_context_counters()
424 { 424 {
425 425
426 int type, band, pt, t; 426 int type, band, pt, t;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); 595 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
596 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); 596 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
597 } 597 }
598 else 598 else
599 { 599 {
600 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); 600 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
601 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); 601 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
602 } 602 }
603 603
604 } 604 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/tokenize.h ('k') | source/libvpx/vp8/encoder/x86/quantize_sse2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698