|
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 |
|
13 function: |
|
14 last mod: $Id: x86int.h 17344 2010-07-21 01:42:18Z tterribe $ |
|
15 |
|
16 ********************************************************************/ |
|
17 #if !defined(_arm_armint_H) |
|
18 # define _arm_armint_H (1) |
|
19 # include "../internal.h" |
|
20 |
|
21 # if defined(OC_ARM_ASM) |
|
22 |
|
23 # if defined(__ARMEB__) |
|
24 # error "Big-endian configurations are not supported by the ARM asm. " \ |
|
25 "Reconfigure with --disable-asm or undefine OC_ARM_ASM." |
|
26 # endif |
|
27 |
|
28 # define oc_state_accel_init oc_state_accel_init_arm |
|
29 /*This function is implemented entirely in asm, so it's helpful to pull out all |
|
30 of the things that depend on structure offsets. |
|
31 We reuse the function pointer with the wrong prototype, though.*/ |
|
32 # define oc_state_loop_filter_frag_rows(_state,_bv,_refi,_pli, \ |
|
33 _fragy0,_fragy_end) \ |
|
34 ((oc_loop_filter_frag_rows_arm_func) \ |
|
35 (_state)->opt_vtable.state_loop_filter_frag_rows)( \ |
|
36 (_state)->ref_frame_data[(_refi)],(_state)->ref_ystride[(_pli)], \ |
|
37 (_bv), \ |
|
38 (_state)->frags, \ |
|
39 (_state)->fplanes[(_pli)].froffset \ |
|
40 +(_fragy0)*(ptrdiff_t)(_state)->fplanes[(_pli)].nhfrags, \ |
|
41 (_state)->fplanes[(_pli)].froffset \ |
|
42 +(_fragy_end)*(ptrdiff_t)(_state)->fplanes[(_pli)].nhfrags, \ |
|
43 (_state)->fplanes[(_pli)].froffset, \ |
|
44 (_state)->fplanes[(_pli)].froffset+(_state)->fplanes[(_pli)].nfrags, \ |
|
45 (_state)->frag_buf_offs, \ |
|
46 (_state)->fplanes[(_pli)].nhfrags) |
|
47 /*For everything else the default vtable macros are fine.*/ |
|
48 # define OC_STATE_USE_VTABLE (1) |
|
49 # endif |
|
50 |
|
51 # include "../state.h" |
|
52 # include "armcpu.h" |
|
53 |
|
54 # if defined(OC_ARM_ASM) |
|
55 typedef void (*oc_loop_filter_frag_rows_arm_func)( |
|
56 unsigned char *_ref_frame_data,int _ystride,signed char _bv[256], |
|
57 const oc_fragment *_frags,ptrdiff_t _fragi0,ptrdiff_t _fragi0_end, |
|
58 ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot, |
|
59 const ptrdiff_t *_frag_buf_offs,int _nhfrags); |
|
60 |
|
61 void oc_state_accel_init_arm(oc_theora_state *_state); |
|
62 void oc_frag_copy_list_arm(unsigned char *_dst_frame, |
|
63 const unsigned char *_src_frame,int _ystride, |
|
64 const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs); |
|
65 void oc_frag_recon_intra_arm(unsigned char *_dst,int _ystride, |
|
66 const ogg_int16_t *_residue); |
|
67 void oc_frag_recon_inter_arm(unsigned char *_dst,const unsigned char *_src, |
|
68 int _ystride,const ogg_int16_t *_residue); |
|
69 void oc_frag_recon_inter2_arm(unsigned char *_dst,const unsigned char *_src1, |
|
70 const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue); |
|
71 void oc_idct8x8_1_arm(ogg_int16_t _y[64],ogg_uint16_t _dc); |
|
72 void oc_idct8x8_arm(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi); |
|
73 void oc_state_frag_recon_arm(const oc_theora_state *_state,ptrdiff_t _fragi, |
|
74 int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant); |
|
75 void oc_loop_filter_frag_rows_arm(unsigned char *_ref_frame_data, |
|
76 int _ystride,signed char *_bv,const oc_fragment *_frags,ptrdiff_t _fragi0, |
|
77 ptrdiff_t _fragi0_end,ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot, |
|
78 const ptrdiff_t *_frag_buf_offs,int _nhfrags); |
|
79 |
|
80 # if defined(OC_ARM_ASM_EDSP) |
|
81 void oc_frag_copy_list_edsp(unsigned char *_dst_frame, |
|
82 const unsigned char *_src_frame,int _ystride, |
|
83 const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs); |
|
84 |
|
85 # if defined(OC_ARM_ASM_MEDIA) |
|
86 void oc_frag_recon_intra_v6(unsigned char *_dst,int _ystride, |
|
87 const ogg_int16_t *_residue); |
|
88 void oc_frag_recon_inter_v6(unsigned char *_dst,const unsigned char *_src, |
|
89 int _ystride,const ogg_int16_t *_residue); |
|
90 void oc_frag_recon_inter2_v6(unsigned char *_dst,const unsigned char *_src1, |
|
91 const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue); |
|
92 void oc_idct8x8_1_v6(ogg_int16_t _y[64],ogg_uint16_t _dc); |
|
93 void oc_idct8x8_v6(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi); |
|
94 void oc_state_frag_recon_v6(const oc_theora_state *_state,ptrdiff_t _fragi, |
|
95 int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant); |
|
96 void oc_loop_filter_init_v6(signed char *_bv,int _flimit); |
|
97 void oc_loop_filter_frag_rows_v6(unsigned char *_ref_frame_data, |
|
98 int _ystride,signed char *_bv,const oc_fragment *_frags,ptrdiff_t _fragi0, |
|
99 ptrdiff_t _fragi0_end,ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot, |
|
100 const ptrdiff_t *_frag_buf_offs,int _nhfrags); |
|
101 |
|
102 # if defined(OC_ARM_ASM_NEON) |
|
103 void oc_frag_copy_list_neon(unsigned char *_dst_frame, |
|
104 const unsigned char *_src_frame,int _ystride, |
|
105 const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs); |
|
106 void oc_frag_recon_intra_neon(unsigned char *_dst,int _ystride, |
|
107 const ogg_int16_t *_residue); |
|
108 void oc_frag_recon_inter_neon(unsigned char *_dst,const unsigned char *_src, |
|
109 int _ystride,const ogg_int16_t *_residue); |
|
110 void oc_frag_recon_inter2_neon(unsigned char *_dst,const unsigned char *_src1, |
|
111 const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue); |
|
112 void oc_idct8x8_1_neon(ogg_int16_t _y[64],ogg_uint16_t _dc); |
|
113 void oc_idct8x8_neon(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi); |
|
114 void oc_state_frag_recon_neon(const oc_theora_state *_state,ptrdiff_t _fragi, |
|
115 int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant); |
|
116 void oc_loop_filter_init_neon(signed char *_bv,int _flimit); |
|
117 void oc_loop_filter_frag_rows_neon(unsigned char *_ref_frame_data, |
|
118 int _ystride,signed char *_bv,const oc_fragment *_frags,ptrdiff_t _fragi0, |
|
119 ptrdiff_t _fragi0_end,ptrdiff_t _fragi_top,ptrdiff_t _fragi_bot, |
|
120 const ptrdiff_t *_frag_buf_offs,int _nhfrags); |
|
121 # endif |
|
122 # endif |
|
123 # endif |
|
124 # endif |
|
125 |
|
126 #endif |