2008-07-30 06:38:23 +00:00
|
|
|
/********************************************************************
|
|
|
|
* *
|
|
|
|
* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
|
|
|
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
|
|
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
|
|
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
|
|
|
* *
|
2009-09-27 22:14:21 +00:00
|
|
|
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
2009-01-22 00:00:49 +00:00
|
|
|
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
2008-07-30 06:38:23 +00:00
|
|
|
* *
|
|
|
|
********************************************************************
|
|
|
|
|
|
|
|
function:
|
2010-11-08 07:47:34 +00:00
|
|
|
last mod: $Id: x86state.c 17410 2010-09-21 21:53:48Z tterribe $
|
2008-07-30 06:38:23 +00:00
|
|
|
|
|
|
|
********************************************************************/
|
|
|
|
|
|
|
|
#include "x86int.h"
|
|
|
|
|
2009-09-27 22:14:21 +00:00
|
|
|
#if defined(OC_X86_ASM)
|
2008-07-30 06:38:23 +00:00
|
|
|
|
2009-09-27 22:14:21 +00:00
|
|
|
/*This table has been modified from OC_FZIG_ZAG by baking a 4x4 transpose into
|
|
|
|
each quadrant of the destination.*/
|
|
|
|
static const unsigned char OC_FZIG_ZAG_MMX[128]={
|
|
|
|
0, 8, 1, 2, 9,16,24,17,
|
|
|
|
10, 3,32,11,18,25, 4,12,
|
|
|
|
5,26,19,40,33,34,41,48,
|
|
|
|
27, 6,13,20,28,21,14, 7,
|
|
|
|
56,49,42,35,43,50,57,36,
|
|
|
|
15,22,29,30,23,44,37,58,
|
|
|
|
51,59,38,45,52,31,60,53,
|
|
|
|
46,39,47,54,61,62,55,63,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
64,64,64,64,64,64,64,64,
|
|
|
|
};
|
2008-07-30 06:38:23 +00:00
|
|
|
|
2010-11-08 07:47:34 +00:00
|
|
|
void oc_state_accel_init_x86(oc_theora_state *_state){
|
2008-07-30 06:38:23 +00:00
|
|
|
_state->cpu_flags=oc_cpu_flags_get();
|
|
|
|
if(_state->cpu_flags&OC_CPU_X86_MMX){
|
2009-09-27 22:14:21 +00:00
|
|
|
_state->opt_vtable.frag_copy=oc_frag_copy_mmx;
|
2010-11-08 07:47:34 +00:00
|
|
|
_state->opt_vtable.frag_copy_list=oc_frag_copy_list_mmx;
|
2008-07-30 06:38:23 +00:00
|
|
|
_state->opt_vtable.frag_recon_intra=oc_frag_recon_intra_mmx;
|
|
|
|
_state->opt_vtable.frag_recon_inter=oc_frag_recon_inter_mmx;
|
|
|
|
_state->opt_vtable.frag_recon_inter2=oc_frag_recon_inter2_mmx;
|
2009-09-27 22:14:21 +00:00
|
|
|
_state->opt_vtable.idct8x8=oc_idct8x8_mmx;
|
2008-07-30 06:38:23 +00:00
|
|
|
_state->opt_vtable.state_frag_recon=oc_state_frag_recon_mmx;
|
2010-11-08 07:47:34 +00:00
|
|
|
_state->opt_vtable.loop_filter_init=oc_loop_filter_init_mmx;
|
2008-07-30 06:38:23 +00:00
|
|
|
_state->opt_vtable.state_loop_filter_frag_rows=
|
|
|
|
oc_state_loop_filter_frag_rows_mmx;
|
|
|
|
_state->opt_vtable.restore_fpu=oc_restore_fpu_mmx;
|
2009-09-27 22:14:21 +00:00
|
|
|
_state->opt_data.dct_fzig_zag=OC_FZIG_ZAG_MMX;
|
2008-07-30 06:38:23 +00:00
|
|
|
}
|
2010-11-08 07:47:34 +00:00
|
|
|
else oc_state_accel_init_c(_state);
|
2008-07-30 06:38:23 +00:00
|
|
|
}
|
|
|
|
#endif
|