Merge "Removed bmi copy to/from BLOCKD"
[libvpx.git] / vpx_scale / win32 / scalesystemdependent.c
blob19e61c3a5be7534c7921d3060064a7f671787761
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 /****************************************************************************
14 * Module Title : system_dependent.c
16 * Description : Miscellaneous system dependent functions
18 ****************************************************************************/
20 /****************************************************************************
21 * Header Files
22 ****************************************************************************/
23 #include "vpx_scale/vpxscale.h"
24 #include "cpuidlib.h"
26 /****************************************************************************
27 * Imports
28 *****************************************************************************/
29 extern void register_generic_scalers(void);
30 extern void register_mmxscalers(void);
32 /****************************************************************************
34 * ROUTINE : post_proc_machine_specific_config
36 * INPUTS : UINT32 Version : Codec version number.
38 * OUTPUTS : None.
40 * RETURNS : void
42 * FUNCTION : Checks for machine specifc features such as MMX support
43 * sets appropriate flags and function pointers.
45 * SPECIAL NOTES : None.
47 ****************************************************************************/
48 void
49 vp8_scale_machine_specific_config(void)
51 // If MMX supported then set to use MMX versions of functions else
52 // use original 'C' versions.
53 int mmx_enabled;
54 int xmm_enabled;
55 int wmt_enabled;
57 vpx_get_processor_flags(&mmx_enabled, &xmm_enabled, &wmt_enabled);
59 if (mmx_enabled || xmm_enabled || wmt_enabled)
61 register_mmxscalers();
63 else
65 vp8_horizontal_line_1_2_scale = vp8cx_horizontal_line_1_2_scale_c;
66 vp8_vertical_band_1_2_scale = vp8cx_vertical_band_1_2_scale_c;
67 vp8_last_vertical_band_1_2_scale = vp8cx_last_vertical_band_1_2_scale_c;
68 vp8_horizontal_line_3_5_scale = vp8cx_horizontal_line_3_5_scale_c;
69 vp8_vertical_band_3_5_scale = vp8cx_vertical_band_3_5_scale_c;
70 vp8_last_vertical_band_3_5_scale = vp8cx_last_vertical_band_3_5_scale_c;
71 vp8_horizontal_line_3_4_scale = vp8cx_horizontal_line_3_4_scale_c;
72 vp8_vertical_band_3_4_scale = vp8cx_vertical_band_3_4_scale_c;
73 vp8_last_vertical_band_3_4_scale = vp8cx_last_vertical_band_3_4_scale_c;
74 vp8_horizontal_line_2_3_scale = vp8cx_horizontal_line_2_3_scale_c;
75 vp8_vertical_band_2_3_scale = vp8cx_vertical_band_2_3_scale_c;
76 vp8_last_vertical_band_2_3_scale = vp8cx_last_vertical_band_2_3_scale_c;
77 vp8_horizontal_line_4_5_scale = vp8cx_horizontal_line_4_5_scale_c;
78 vp8_vertical_band_4_5_scale = vp8cx_vertical_band_4_5_scale_c;
79 vp8_last_vertical_band_4_5_scale = vp8cx_last_vertical_band_4_5_scale_c;
82 vp8_vertical_band_5_4_scale = vp8cx_vertical_band_5_4_scale_c;
83 vp8_vertical_band_5_3_scale = vp8cx_vertical_band_5_3_scale_c;
84 vp8_vertical_band_2_1_scale = vp8cx_vertical_band_2_1_scale_c;
85 vp8_vertical_band_2_1_scale_i = vp8cx_vertical_band_2_1_scale_i_c;
86 vp8_horizontal_line_2_1_scale = vp8cx_horizontal_line_2_1_scale_c;
87 vp8_horizontal_line_5_3_scale = vp8cx_horizontal_line_5_3_scale_c;
88 vp8_horizontal_line_5_4_scale = vp8cx_horizontal_line_5_4_scale_c;