armenc.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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: x86state.c 17344 2010-07-21 01:42:18Z tterribe $
  14. ********************************************************************/
  15. #include "armenc.h"
  16. #if defined(OC_ARM_ASM)
  17. void oc_enc_accel_init_arm(oc_enc_ctx *_enc){
  18. ogg_uint32_t cpu_flags;
  19. cpu_flags=_enc->state.cpu_flags;
  20. oc_enc_accel_init_c(_enc);
  21. # if defined(OC_ENC_USE_VTABLE)
  22. /*TODO: Add ARMv4 functions here.*/
  23. # endif
  24. # if defined(OC_ARM_ASM_EDSP)
  25. if(cpu_flags&OC_CPU_ARM_EDSP){
  26. # if defined(OC_STATE_USE_VTABLE)
  27. /*TODO: Add EDSP functions here.*/
  28. # endif
  29. }
  30. # if defined(OC_ARM_ASM_MEDIA)
  31. if(cpu_flags&OC_CPU_ARM_MEDIA){
  32. # if defined(OC_STATE_USE_VTABLE)
  33. /*TODO: Add Media functions here.*/
  34. # endif
  35. }
  36. # if defined(OC_ARM_ASM_NEON)
  37. if(cpu_flags&OC_CPU_ARM_NEON){
  38. # if defined(OC_STATE_USE_VTABLE)
  39. _enc->opt_vtable.frag_satd=oc_enc_frag_satd_neon;
  40. _enc->opt_vtable.frag_satd2=oc_enc_frag_satd2_neon;
  41. _enc->opt_vtable.frag_intra_satd=oc_enc_frag_intra_satd_neon;
  42. _enc->opt_vtable.enquant_table_init=oc_enc_enquant_table_init_neon;
  43. _enc->opt_vtable.enquant_table_fixup=oc_enc_enquant_table_fixup_neon;
  44. _enc->opt_vtable.quantize=oc_enc_quantize_neon;
  45. # endif
  46. _enc->opt_data.enquant_table_size=128*sizeof(ogg_uint16_t);
  47. _enc->opt_data.enquant_table_alignment=16;
  48. }
  49. # endif
  50. # endif
  51. # endif
  52. }
  53. #endif