19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: xvid.c,v 1.56 2004-10-17 10:20:15 edgomez Exp $ |
* $Id: xvid.c,v 1.58 2004-12-09 23:02:54 edgomez Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
36 |
#include "dct/fdct.h" |
#include "dct/fdct.h" |
37 |
#include "image/colorspace.h" |
#include "image/colorspace.h" |
38 |
#include "image/interpolate8x8.h" |
#include "image/interpolate8x8.h" |
|
#include "image/reduced.h" |
|
39 |
#include "utils/mem_transfer.h" |
#include "utils/mem_transfer.h" |
40 |
#include "utils/mbfunctions.h" |
#include "utils/mbfunctions.h" |
41 |
#include "quant/quant.h" |
#include "quant/quant.h" |
243 |
/* postprocessing */ |
/* postprocessing */ |
244 |
image_brightness = image_brightness_c; |
image_brightness = image_brightness_c; |
245 |
|
|
|
/* reduced resolution */ |
|
|
copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_C; |
|
|
add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_C; |
|
|
vfilter_31 = xvid_VFilter_31_C; |
|
|
hfilter_31 = xvid_HFilter_31_C; |
|
|
filter_18x18_to_8x8 = xvid_Filter_18x18_To_8x8_C; |
|
|
filter_diff_18x18_to_8x8 = xvid_Filter_Diff_18x18_To_8x8_C; |
|
|
|
|
246 |
/* Initialize internal colorspace transformation tables */ |
/* Initialize internal colorspace transformation tables */ |
247 |
colorspace_init(); |
colorspace_init(); |
248 |
|
|
302 |
|
|
303 |
#if defined(ARCH_IS_IA32) |
#if defined(ARCH_IS_IA32) |
304 |
|
|
|
if ((cpu_flags & XVID_CPU_ASM)) { |
|
|
vfilter_31 = xvid_VFilter_31_x86; |
|
|
hfilter_31 = xvid_HFilter_31_x86; |
|
|
} |
|
|
|
|
305 |
if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) || |
if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) || |
306 |
(cpu_flags & XVID_CPU_3DNOW) || (cpu_flags & XVID_CPU_3DNOWEXT) || |
(cpu_flags & XVID_CPU_3DNOW) || (cpu_flags & XVID_CPU_3DNOWEXT) || |
307 |
(cpu_flags & XVID_CPU_SSE) || (cpu_flags & XVID_CPU_SSE2)) |
(cpu_flags & XVID_CPU_SSE) || (cpu_flags & XVID_CPU_SSE2)) |
362 |
/* postprocessing */ |
/* postprocessing */ |
363 |
image_brightness = image_brightness_mmx; |
image_brightness = image_brightness_mmx; |
364 |
|
|
|
/* reduced resolution */ |
|
|
copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_mmx; |
|
|
add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_mmx; |
|
|
hfilter_31 = xvid_HFilter_31_mmx; |
|
|
filter_18x18_to_8x8 = xvid_Filter_18x18_To_8x8_mmx; |
|
|
filter_diff_18x18_to_8x8 = xvid_Filter_Diff_18x18_To_8x8_mmx; |
|
|
|
|
365 |
/* image input xxx_to_yv12 related functions */ |
/* image input xxx_to_yv12 related functions */ |
366 |
yv12_to_yv12 = yv12_to_yv12_mmx; |
yv12_to_yv12 = yv12_to_yv12_mmx; |
367 |
bgr_to_yv12 = bgr_to_yv12_mmx; |
bgr_to_yv12 = bgr_to_yv12_mmx; |
420 |
interpolate8x8_halfpel_v_add = interpolate8x8_halfpel_v_add_xmm; |
interpolate8x8_halfpel_v_add = interpolate8x8_halfpel_v_add_xmm; |
421 |
interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm; |
interpolate8x8_halfpel_hv_add = interpolate8x8_halfpel_hv_add_xmm; |
422 |
|
|
|
/* reduced resolution */ |
|
|
copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_xmm; |
|
|
add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_xmm; |
|
|
|
|
423 |
/* Quantization */ |
/* Quantization */ |
424 |
quant_mpeg_intra = quant_mpeg_intra_xmm; |
quant_mpeg_intra = quant_mpeg_intra_xmm; |
425 |
quant_mpeg_inter = quant_mpeg_inter_xmm; |
quant_mpeg_inter = quant_mpeg_inter_xmm; |