Home | History | Annotate | Download | only in encoder
      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_DCT_H
     13 #define __INC_DCT_H
     14 
     15 #define prototype_fdct(sym) void (sym)(short *input, short *output, int pitch)
     16 
     17 #if ARCH_X86 || ARCH_X86_64
     18 #include "x86/dct_x86.h"
     19 #endif
     20 
     21 #if ARCH_ARM
     22 #include "arm/dct_arm.h"
     23 #endif
     24 
     25 #ifndef vp8_fdct_short4x4
     26 #define vp8_fdct_short4x4  vp8_short_fdct4x4_c
     27 #endif
     28 extern prototype_fdct(vp8_fdct_short4x4);
     29 
     30 #ifndef vp8_fdct_short8x4
     31 #define vp8_fdct_short8x4  vp8_short_fdct8x4_c
     32 #endif
     33 extern prototype_fdct(vp8_fdct_short8x4);
     34 
     35 // There is no fast4x4 (for now)
     36 #ifndef vp8_fdct_fast4x4
     37 #define vp8_fdct_fast4x4  vp8_short_fdct4x4_c
     38 #endif
     39 
     40 #ifndef vp8_fdct_fast8x4
     41 #define vp8_fdct_fast8x4  vp8_short_fdct8x4_c
     42 #endif
     43 
     44 #ifndef vp8_fdct_walsh_short4x4
     45 #define vp8_fdct_walsh_short4x4  vp8_short_walsh4x4_c
     46 #endif
     47 extern prototype_fdct(vp8_fdct_walsh_short4x4);
     48 
     49 typedef prototype_fdct(*vp8_fdct_fn_t);
     50 typedef struct
     51 {
     52     vp8_fdct_fn_t    short4x4;
     53     vp8_fdct_fn_t    short8x4;
     54     vp8_fdct_fn_t    fast4x4;
     55     vp8_fdct_fn_t    fast8x4;
     56     vp8_fdct_fn_t    walsh_short4x4;
     57 } vp8_fdct_rtcd_vtable_t;
     58 
     59 #if CONFIG_RUNTIME_CPU_DETECT
     60 #define FDCT_INVOKE(ctx,fn) (ctx)->fn
     61 #else
     62 #define FDCT_INVOKE(ctx,fn) vp8_fdct_##fn
     63 #endif
     64 
     65 #endif
     66