/media/libvpx/vp8/encoder/encodemb.h

http://github.com/zpao/v8monkey · C Header · 106 lines · 73 code · 24 blank · 9 comment · 1 complexity · 2b58e822217ba9568c1bc78e016dda9d 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. #ifndef __INC_ENCODEMB_H
  11. #define __INC_ENCODEMB_H
  12. #include "vpx_ports/config.h"
  13. #include "block.h"
  14. #define prototype_mberr(sym) \
  15. int (sym)(MACROBLOCK *mb, int dc)
  16. #define prototype_berr(sym) \
  17. int (sym)(short *coeff, short *dqcoeff)
  18. #define prototype_mbuverr(sym) \
  19. int (sym)(MACROBLOCK *mb)
  20. #define prototype_subb(sym) \
  21. void (sym)(BLOCK *be,BLOCKD *bd, int pitch)
  22. #define prototype_submby(sym) \
  23. void (sym)(short *diff, unsigned char *src, unsigned char *pred, int stride)
  24. #define prototype_submbuv(sym) \
  25. void (sym)(short *diff, unsigned char *usrc, unsigned char *vsrc,\
  26. unsigned char *pred, int stride)
  27. #if ARCH_X86 || ARCH_X86_64
  28. #include "x86/encodemb_x86.h"
  29. #endif
  30. #if ARCH_ARM
  31. #include "arm/encodemb_arm.h"
  32. #endif
  33. #ifndef vp8_encodemb_berr
  34. #define vp8_encodemb_berr vp8_block_error_c
  35. #endif
  36. extern prototype_berr(vp8_encodemb_berr);
  37. #ifndef vp8_encodemb_mberr
  38. #define vp8_encodemb_mberr vp8_mbblock_error_c
  39. #endif
  40. extern prototype_mberr(vp8_encodemb_mberr);
  41. #ifndef vp8_encodemb_mbuverr
  42. #define vp8_encodemb_mbuverr vp8_mbuverror_c
  43. #endif
  44. extern prototype_mbuverr(vp8_encodemb_mbuverr);
  45. #ifndef vp8_encodemb_subb
  46. #define vp8_encodemb_subb vp8_subtract_b_c
  47. #endif
  48. extern prototype_subb(vp8_encodemb_subb);
  49. #ifndef vp8_encodemb_submby
  50. #define vp8_encodemb_submby vp8_subtract_mby_c
  51. #endif
  52. extern prototype_submby(vp8_encodemb_submby);
  53. #ifndef vp8_encodemb_submbuv
  54. #define vp8_encodemb_submbuv vp8_subtract_mbuv_c
  55. #endif
  56. extern prototype_submbuv(vp8_encodemb_submbuv);
  57. typedef struct
  58. {
  59. prototype_berr(*berr);
  60. prototype_mberr(*mberr);
  61. prototype_mbuverr(*mbuverr);
  62. prototype_subb(*subb);
  63. prototype_submby(*submby);
  64. prototype_submbuv(*submbuv);
  65. } vp8_encodemb_rtcd_vtable_t;
  66. #if CONFIG_RUNTIME_CPU_DETECT
  67. #define ENCODEMB_INVOKE(ctx,fn) (ctx)->fn
  68. #else
  69. #define ENCODEMB_INVOKE(ctx,fn) vp8_encodemb_##fn
  70. #endif
  71. #include "onyx_int.h"
  72. struct VP8_ENCODER_RTCD;
  73. void vp8_encode_inter16x16(const struct VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x);
  74. void vp8_build_dcblock(MACROBLOCK *b);
  75. void vp8_transform_mb(MACROBLOCK *mb);
  76. void vp8_transform_mbuv(MACROBLOCK *x);
  77. void vp8_transform_intra_mby(MACROBLOCK *x);
  78. void vp8_encode_inter16x16uvrd(const struct VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x);
  79. void vp8_optimize_mby(MACROBLOCK *x, const struct VP8_ENCODER_RTCD *rtcd);
  80. void vp8_optimize_mbuv(MACROBLOCK *x, const struct VP8_ENCODER_RTCD *rtcd);
  81. void vp8_encode_inter16x16y(const struct VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x);
  82. #endif