| 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 |
| 11 | 11 |
| 12 #ifndef __INC_QUANTIZE_H | 12 #ifndef __INC_QUANTIZE_H |
| 13 #define __INC_QUANTIZE_H | 13 #define __INC_QUANTIZE_H |
| 14 | 14 |
| 15 #include "block.h" | 15 #include "block.h" |
| 16 | 16 |
| 17 #define prototype_quantize_block(sym) \ | 17 #define prototype_quantize_block(sym) \ |
| 18 void (sym)(BLOCK *b,BLOCKD *d) | 18 void (sym)(BLOCK *b,BLOCKD *d) |
| 19 | 19 |
| 20 #define prototype_quantize_block_pair(sym) \ |
| 21 void (sym)(BLOCK *b1, BLOCK *b2, BLOCKD *d1, BLOCKD *d2) |
| 22 |
| 23 #define prototype_quantize_mb(sym) \ |
| 24 void (sym)(MACROBLOCK *x) |
| 25 |
| 20 #if ARCH_X86 || ARCH_X86_64 | 26 #if ARCH_X86 || ARCH_X86_64 |
| 21 #include "x86/quantize_x86.h" | 27 #include "x86/quantize_x86.h" |
| 22 #endif | 28 #endif |
| 23 | 29 |
| 24 #if ARCH_ARM | 30 #if ARCH_ARM |
| 25 #include "arm/quantize_arm.h" | 31 #include "arm/quantize_arm.h" |
| 26 #endif | 32 #endif |
| 27 | 33 |
| 28 #ifndef vp8_quantize_quantb | 34 #ifndef vp8_quantize_quantb |
| 29 #define vp8_quantize_quantb vp8_regular_quantize_b | 35 #define vp8_quantize_quantb vp8_regular_quantize_b |
| 30 #endif | 36 #endif |
| 31 extern prototype_quantize_block(vp8_quantize_quantb); | 37 extern prototype_quantize_block(vp8_quantize_quantb); |
| 32 | 38 |
| 39 #ifndef vp8_quantize_quantb_pair |
| 40 #define vp8_quantize_quantb_pair vp8_regular_quantize_b_pair |
| 41 #endif |
| 42 extern prototype_quantize_block_pair(vp8_quantize_quantb_pair); |
| 43 |
| 33 #ifndef vp8_quantize_fastquantb | 44 #ifndef vp8_quantize_fastquantb |
| 34 #define vp8_quantize_fastquantb vp8_fast_quantize_b_c | 45 #define vp8_quantize_fastquantb vp8_fast_quantize_b_c |
| 35 #endif | 46 #endif |
| 36 extern prototype_quantize_block(vp8_quantize_fastquantb); | 47 extern prototype_quantize_block(vp8_quantize_fastquantb); |
| 37 | 48 |
| 49 #ifndef vp8_quantize_fastquantb_pair |
| 50 #define vp8_quantize_fastquantb_pair vp8_fast_quantize_b_pair_c |
| 51 #endif |
| 52 extern prototype_quantize_block_pair(vp8_quantize_fastquantb_pair); |
| 53 |
| 38 typedef struct | 54 typedef struct |
| 39 { | 55 { |
| 40 prototype_quantize_block(*quantb); | 56 prototype_quantize_block(*quantb); |
| 57 prototype_quantize_block_pair(*quantb_pair); |
| 41 prototype_quantize_block(*fastquantb); | 58 prototype_quantize_block(*fastquantb); |
| 59 prototype_quantize_block_pair(*fastquantb_pair); |
| 42 } vp8_quantize_rtcd_vtable_t; | 60 } vp8_quantize_rtcd_vtable_t; |
| 43 | 61 |
| 62 #ifndef vp8_quantize_mb |
| 63 #define vp8_quantize_mb vp8_quantize_mb_c |
| 64 #endif |
| 65 extern prototype_quantize_mb(vp8_quantize_mb); |
| 66 |
| 67 #ifndef vp8_quantize_mbuv |
| 68 #define vp8_quantize_mbuv vp8_quantize_mbuv_c |
| 69 #endif |
| 70 extern prototype_quantize_mb(vp8_quantize_mbuv); |
| 71 |
| 72 #ifndef vp8_quantize_mby |
| 73 #define vp8_quantize_mby vp8_quantize_mby_c |
| 74 #endif |
| 75 extern prototype_quantize_mb(vp8_quantize_mby); |
| 76 |
| 44 #if CONFIG_RUNTIME_CPU_DETECT | 77 #if CONFIG_RUNTIME_CPU_DETECT |
| 45 #define QUANTIZE_INVOKE(ctx,fn) (ctx)->fn | 78 #define QUANTIZE_INVOKE(ctx,fn) (ctx)->fn |
| 46 #else | 79 #else |
| 47 #define QUANTIZE_INVOKE(ctx,fn) vp8_quantize_##fn | 80 #define QUANTIZE_INVOKE(ctx,fn) vp8_quantize_##fn |
| 48 #endif | 81 #endif |
| 49 | 82 |
| 50 extern void vp8_strict_quantize_b(BLOCK *b,BLOCKD *d); | 83 extern void vp8_strict_quantize_b(BLOCK *b,BLOCKD *d); |
| 51 | 84 |
| 52 extern void vp8_quantize_mb(MACROBLOCK *x); | 85 struct VP8_COMP; |
| 53 extern void vp8_quantize_mbuv(MACROBLOCK *x); | 86 extern void vp8_set_quantizer(struct VP8_COMP *cpi, int Q); |
| 54 extern void vp8_quantize_mby(MACROBLOCK *x); | 87 extern void vp8cx_frame_init_quantizer(struct VP8_COMP *cpi); |
| 88 extern void vp8_update_zbin_extra(struct VP8_COMP *cpi, MACROBLOCK *x); |
| 89 extern void vp8cx_mb_init_quantizer(struct VP8_COMP *cpi, MACROBLOCK *x); |
| 90 extern void vp8cx_init_quantizer(struct VP8_COMP *cpi); |
| 55 | 91 |
| 56 #endif | 92 #endif |
| OLD | NEW |