1 /* 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 12 #ifndef __INC_QUANTIZE_H 13 #define __INC_QUANTIZE_H 14 15 #include "block.h" 16 17 #define prototype_quantize_block(sym) \ 18 void (sym)(BLOCK *b,BLOCKD *d) 19 20 #if ARCH_X86 || ARCH_X86_64 21 #include "x86/quantize_x86.h" 22 #endif 23 24 #if ARCH_ARM 25 #include "arm/quantize_arm.h" 26 #endif 27 28 #ifndef vp8_quantize_quantb 29 #define vp8_quantize_quantb vp8_regular_quantize_b 30 #endif 31 extern prototype_quantize_block(vp8_quantize_quantb); 32 33 #ifndef vp8_quantize_fastquantb 34 #define vp8_quantize_fastquantb vp8_fast_quantize_b_c 35 #endif 36 extern prototype_quantize_block(vp8_quantize_fastquantb); 37 38 typedef struct 39 { 40 prototype_quantize_block(*quantb); 41 prototype_quantize_block(*fastquantb); 42 } vp8_quantize_rtcd_vtable_t; 43 44 #if CONFIG_RUNTIME_CPU_DETECT 45 #define QUANTIZE_INVOKE(ctx,fn) (ctx)->fn 46 #else 47 #define QUANTIZE_INVOKE(ctx,fn) vp8_quantize_##fn 48 #endif 49 50 extern void vp8_strict_quantize_b(BLOCK *b,BLOCKD *d); 51 52 extern void vp8_quantize_mb(MACROBLOCK *x); 53 extern void vp8_quantize_mbuv(MACROBLOCK *x); 54 extern void vp8_quantize_mby(MACROBLOCK *x); 55 56 #endif 57