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