PageRenderTime 27ms CodeModel.GetById 18ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/media/libvpx/vp8/common/recon.h

http://github.com/zpao/v8monkey
C Header | 142 lines | 105 code | 28 blank | 9 comment | 1 complexity | 132b7d28d020999822606ed33ea4a0ea MD5 | raw file
  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_RECON_H
 13#define __INC_RECON_H
 14
 15#include "blockd.h"
 16
 17#define prototype_copy_block(sym) \
 18    void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch)
 19
 20#define prototype_recon_block(sym) \
 21    void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch)
 22
 23#define prototype_recon_macroblock(sym) \
 24    void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x)
 25
 26#define prototype_build_intra_predictors(sym) \
 27    void sym(MACROBLOCKD *x)
 28
 29#define prototype_intra4x4_predict(sym) \
 30    void sym(BLOCKD *x, int b_mode, unsigned char *predictor)
 31
 32struct vp8_recon_rtcd_vtable;
 33
 34#if ARCH_X86 || ARCH_X86_64
 35#include "x86/recon_x86.h"
 36#endif
 37
 38#if ARCH_ARM
 39#include "arm/recon_arm.h"
 40#endif
 41
 42#ifndef vp8_recon_copy16x16
 43#define vp8_recon_copy16x16 vp8_copy_mem16x16_c
 44#endif
 45extern prototype_copy_block(vp8_recon_copy16x16);
 46
 47#ifndef vp8_recon_copy8x8
 48#define vp8_recon_copy8x8 vp8_copy_mem8x8_c
 49#endif
 50extern prototype_copy_block(vp8_recon_copy8x8);
 51
 52#ifndef vp8_recon_copy8x4
 53#define vp8_recon_copy8x4 vp8_copy_mem8x4_c
 54#endif
 55extern prototype_copy_block(vp8_recon_copy8x4);
 56
 57#ifndef vp8_recon_recon
 58#define vp8_recon_recon vp8_recon_b_c
 59#endif
 60extern prototype_recon_block(vp8_recon_recon);
 61
 62#ifndef vp8_recon_recon2
 63#define vp8_recon_recon2 vp8_recon2b_c
 64#endif
 65extern prototype_recon_block(vp8_recon_recon2);
 66
 67#ifndef vp8_recon_recon4
 68#define vp8_recon_recon4 vp8_recon4b_c
 69#endif
 70extern prototype_recon_block(vp8_recon_recon4);
 71
 72#ifndef vp8_recon_recon_mb
 73#define vp8_recon_recon_mb vp8_recon_mb_c
 74#endif
 75extern prototype_recon_macroblock(vp8_recon_recon_mb);
 76
 77#ifndef vp8_recon_recon_mby
 78#define vp8_recon_recon_mby vp8_recon_mby_c
 79#endif
 80extern prototype_recon_macroblock(vp8_recon_recon_mby);
 81
 82#ifndef vp8_recon_build_intra_predictors_mby
 83#define vp8_recon_build_intra_predictors_mby vp8_build_intra_predictors_mby
 84#endif
 85extern prototype_build_intra_predictors\
 86    (vp8_recon_build_intra_predictors_mby);
 87
 88#ifndef vp8_recon_build_intra_predictors_mby_s
 89#define vp8_recon_build_intra_predictors_mby_s vp8_build_intra_predictors_mby_s
 90#endif
 91extern prototype_build_intra_predictors\
 92    (vp8_recon_build_intra_predictors_mby_s);
 93
 94#ifndef vp8_recon_build_intra_predictors_mbuv
 95#define vp8_recon_build_intra_predictors_mbuv vp8_build_intra_predictors_mbuv
 96#endif
 97extern prototype_build_intra_predictors\
 98    (vp8_recon_build_intra_predictors_mbuv);
 99
100#ifndef vp8_recon_build_intra_predictors_mbuv_s
101#define vp8_recon_build_intra_predictors_mbuv_s vp8_build_intra_predictors_mbuv_s
102#endif
103extern prototype_build_intra_predictors\
104    (vp8_recon_build_intra_predictors_mbuv_s);
105
106#ifndef vp8_recon_intra4x4_predict
107#define vp8_recon_intra4x4_predict vp8_intra4x4_predict
108#endif
109extern prototype_intra4x4_predict\
110    (vp8_recon_intra4x4_predict);
111
112
113typedef prototype_copy_block((*vp8_copy_block_fn_t));
114typedef prototype_recon_block((*vp8_recon_fn_t));
115typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t));
116typedef prototype_build_intra_predictors((*vp8_build_intra_pred_fn_t));
117typedef prototype_intra4x4_predict((*vp8_intra4x4_pred_fn_t));
118typedef struct vp8_recon_rtcd_vtable
119{
120    vp8_copy_block_fn_t  copy16x16;
121    vp8_copy_block_fn_t  copy8x8;
122    vp8_copy_block_fn_t  copy8x4;
123    vp8_recon_fn_t       recon;
124    vp8_recon_fn_t       recon2;
125    vp8_recon_fn_t       recon4;
126    vp8_recon_mb_fn_t    recon_mb;
127    vp8_recon_mb_fn_t    recon_mby;
128    vp8_build_intra_pred_fn_t  build_intra_predictors_mby_s;
129    vp8_build_intra_pred_fn_t  build_intra_predictors_mby;
130    vp8_build_intra_pred_fn_t  build_intra_predictors_mbuv_s;
131    vp8_build_intra_pred_fn_t  build_intra_predictors_mbuv;
132    vp8_intra4x4_pred_fn_t intra4x4_predict;
133} vp8_recon_rtcd_vtable_t;
134
135#if CONFIG_RUNTIME_CPU_DETECT
136#define RECON_INVOKE(ctx,fn) (ctx)->fn
137#else
138#define RECON_INVOKE(ctx,fn) vp8_recon_##fn
139#endif
140
141void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
142#endif