OLD | NEW |
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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 } | 414 } |
415 | 415 |
416 tokenize1st_order_b(x, t, plane_type, cpi); | 416 tokenize1st_order_b(x, t, plane_type, cpi); |
417 } | 417 } |
418 | 418 |
419 | 419 |
420 #ifdef VP8_ENTROPY_STATS | 420 #ifdef VP8_ENTROPY_STATS |
421 | 421 |
422 void init_context_counters(void) | 422 void init_context_counters(void) |
423 { | 423 { |
424 vpx_memset(context_counters, 0, sizeof(context_counters)); | 424 memset(context_counters, 0, sizeof(context_counters)); |
425 } | 425 } |
426 | 426 |
427 void print_context_counters() | 427 void print_context_counters() |
428 { | 428 { |
429 | 429 |
430 int type, band, pt, t; | 430 int type, band, pt, t; |
431 | 431 |
432 FILE *const f = fopen("context.c", "w"); | 432 FILE *const f = fopen("context.c", "w"); |
433 | 433 |
434 fprintf(f, "#include \"entropy.h\"\n"); | 434 fprintf(f, "#include \"entropy.h\"\n"); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 stuff1st_order_buv(t, | 589 stuff1st_order_buv(t, |
590 A + vp8_block2above[b], | 590 A + vp8_block2above[b], |
591 L + vp8_block2left[b], cpi, x); | 591 L + vp8_block2left[b], cpi, x); |
592 | 592 |
593 } | 593 } |
594 void vp8_fix_contexts(MACROBLOCKD *x) | 594 void vp8_fix_contexts(MACROBLOCKD *x) |
595 { | 595 { |
596 /* Clear entropy contexts for Y2 blocks */ | 596 /* Clear entropy contexts for Y2 blocks */ |
597 if (x->mode_info_context->mbmi.mode != B_PRED && x->mode_info_context->mbmi.
mode != SPLITMV) | 597 if (x->mode_info_context->mbmi.mode != B_PRED && x->mode_info_context->mbmi.
mode != SPLITMV) |
598 { | 598 { |
599 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); | 599 memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); |
600 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); | 600 memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); |
601 } | 601 } |
602 else | 602 else |
603 { | 603 { |
604 vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); | 604 memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); |
605 vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); | 605 memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1); |
606 } | 606 } |
607 | 607 |
608 } | 608 } |
OLD | NEW |