armint.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
  5. * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  6. * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  7. * *
  8. * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
  9. * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function:
  13. last mod: $Id: x86int.h 17344 2010-07-21 01:42:18Z tterribe $
  14. ********************************************************************/
  15. #if !defined(_arm_armint_H)
  16. # define _arm_armint_H (1)
  17. # include "../internal.h"
  18. # if defined(OC_ARM_ASM)
  19. # if defined(__ARMEB__)
  20. # error "Big-endian configurations are not supported by the ARM asm. " \
  21. "Reconfigure with --disable-asm or undefine OC_ARM_ASM."
  22. # endif
  23. # define oc_state_accel_init oc_state_accel_init_arm
  24. /*This function is implemented entirely in asm, so it's helpful to pull out all
  25. of the things that depend on structure offsets.
  26. We reuse the function pointer with the wrong prototype, though.*/
  27. # define oc_state_loop_filter_frag_rows(_state,_bv,_refi,_pli, \
  28. _fragy0,_fragy_end) \
  29. ((oc_loop_filter_frag_rows_arm_func) \
  30. (_state)->opt_vtable.state_loop_filter_frag_rows)( \
  31. (_state)->ref_frame_data[(_refi)],(_state)->ref_ystride[(_pli)], \
  32. (_bv), \
  33. (_state)->frags, \
  34. (_state)->fplanes[(_pli)].froffset \
  35. +(_fragy0)*(ptrdiff_t)(_state)->fplanes[(_pli)].nhfrags, \
  36. (_state)->fplanes[(_pli)].froffset \
  37. +(_fragy_end)*(ptrdiff_t)(_state)->fplanes[(_pli)].nhfrags, \
  38. (_state)->fplanes[(_pli)].froffset, \
  39. (_state)->fplanes[(_pli)].froffset+(_state)->fplanes[(_pli)].nfrags, \
  40. (_state)->frag_buf_offs, \
  41. (_state)->fplanes[(_pli)].nhfrags)
  42. /*For everything else the default vtable macros are fine.*/
  43. # define OC_STATE_USE_VTABLE (1)
  44. # endif
  45. # include "../state.h"
  46. # include "armcpu.h"
  47. # if defined(OC_ARM_ASM)
  48. typedef void (*oc_loop_filter_frag_rows_arm_func)(
  49. unsigned char *_ref_frame_data,int _ystride,signed char _bv[256],
  50. const oc_fragment *_frags,ptrdiff_t _fragi0,ptrdiff_t _fragi0_end,
  51. ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot,
  52. const ptrdiff_t *_frag_buf_offs,int _nhfrags);
  53. void oc_state_accel_init_arm(oc_theora_state *_state);
  54. void oc_frag_copy_list_arm(unsigned char *_dst_frame,
  55. const unsigned char *_src_frame,int _ystride,
  56. const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs);
  57. void oc_frag_recon_intra_arm(unsigned char *_dst,int _ystride,
  58. const ogg_int16_t *_residue);
  59. void oc_frag_recon_inter_arm(unsigned char *_dst,const unsigned char *_src,
  60. int _ystride,const ogg_int16_t *_residue);
  61. void oc_frag_recon_inter2_arm(unsigned char *_dst,const unsigned char *_src1,
  62. const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue);
  63. void oc_idct8x8_1_arm(ogg_int16_t _y[64],ogg_uint16_t _dc);
  64. void oc_idct8x8_arm(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi);
  65. void oc_state_frag_recon_arm(const oc_theora_state *_state,ptrdiff_t _fragi,
  66. int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant);
  67. void oc_loop_filter_frag_rows_arm(unsigned char *_ref_frame_data,
  68. int _ystride,signed char *_bv,const oc_fragment *_frags,ptrdiff_t _fragi0,
  69. ptrdiff_t _fragi0_end,ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot,
  70. const ptrdiff_t *_frag_buf_offs,int _nhfrags);
  71. # if defined(OC_ARM_ASM_EDSP)
  72. void oc_frag_copy_list_edsp(unsigned char *_dst_frame,
  73. const unsigned char *_src_frame,int _ystride,
  74. const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs);
  75. # if defined(OC_ARM_ASM_MEDIA)
  76. void oc_frag_recon_intra_v6(unsigned char *_dst,int _ystride,
  77. const ogg_int16_t *_residue);
  78. void oc_frag_recon_inter_v6(unsigned char *_dst,const unsigned char *_src,
  79. int _ystride,const ogg_int16_t *_residue);
  80. void oc_frag_recon_inter2_v6(unsigned char *_dst,const unsigned char *_src1,
  81. const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue);
  82. void oc_idct8x8_1_v6(ogg_int16_t _y[64],ogg_uint16_t _dc);
  83. void oc_idct8x8_v6(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi);
  84. void oc_state_frag_recon_v6(const oc_theora_state *_state,ptrdiff_t _fragi,
  85. int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant);
  86. void oc_loop_filter_init_v6(signed char *_bv,int _flimit);
  87. void oc_loop_filter_frag_rows_v6(unsigned char *_ref_frame_data,
  88. int _ystride,signed char *_bv,const oc_fragment *_frags,ptrdiff_t _fragi0,
  89. ptrdiff_t _fragi0_end,ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot,
  90. const ptrdiff_t *_frag_buf_offs,int _nhfrags);
  91. # if defined(OC_ARM_ASM_NEON)
  92. void oc_frag_copy_list_neon(unsigned char *_dst_frame,
  93. const unsigned char *_src_frame,int _ystride,
  94. const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs);
  95. void oc_frag_recon_intra_neon(unsigned char *_dst,int _ystride,
  96. const ogg_int16_t *_residue);
  97. void oc_frag_recon_inter_neon(unsigned char *_dst,const unsigned char *_src,
  98. int _ystride,const ogg_int16_t *_residue);
  99. void oc_frag_recon_inter2_neon(unsigned char *_dst,const unsigned char *_src1,
  100. const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue);
  101. void oc_idct8x8_1_neon(ogg_int16_t _y[64],ogg_uint16_t _dc);
  102. void oc_idct8x8_neon(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi);
  103. void oc_state_frag_recon_neon(const oc_theora_state *_state,ptrdiff_t _fragi,
  104. int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant);
  105. void oc_loop_filter_init_neon(signed char *_bv,int _flimit);
  106. void oc_loop_filter_frag_rows_neon(unsigned char *_ref_frame_data,
  107. int _ystride,signed char *_bv,const oc_fragment *_frags,ptrdiff_t _fragi0,
  108. ptrdiff_t _fragi0_end,ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot,
  109. const ptrdiff_t *_frag_buf_offs,int _nhfrags);
  110. # endif
  111. # endif
  112. # endif
  113. # endif
  114. #endif