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.
12 #include "vpx_ports/config.h"
13 #include "vpx_ports/x86.h"
14 #include "vp8/decoder/onyxd_int.h"
18 void vp8_dequantize_b_impl_mmx(short *sq
, short *dq
, short *q
);
20 void vp8_dequantize_b_mmx(BLOCKD
*d
)
22 short *sq
= (short *) d
->qcoeff
;
23 short *dq
= (short *) d
->dqcoeff
;
24 short *q
= (short *) d
->dequant
;
25 vp8_dequantize_b_impl_mmx(sq
, dq
, q
);
29 void vp8_arch_x86_decode_init(VP8D_COMP
*pbi
)
31 #if CONFIG_RUNTIME_CPU_DETECT
32 int flags
= x86_simd_caps();
36 * This platform can be built without runtime CPU detection as well. If
37 * you modify any of the function mappings present in this file, be sure
38 * to also update them in static mapings (<arch>/filename_<arch>.h)
40 /* Override default functions with fastest ones for this CPU. */
44 pbi
->dequant
.block
= vp8_dequantize_b_mmx
;
45 pbi
->dequant
.idct_add
= vp8_dequant_idct_add_mmx
;
46 pbi
->dequant
.dc_idct_add
= vp8_dequant_dc_idct_add_mmx
;
47 pbi
->dequant
.dc_idct_add_y_block
= vp8_dequant_dc_idct_add_y_block_mmx
;
48 pbi
->dequant
.idct_add_y_block
= vp8_dequant_idct_add_y_block_mmx
;
49 pbi
->dequant
.idct_add_uv_block
= vp8_dequant_idct_add_uv_block_mmx
;
55 pbi
->dequant
.dc_idct_add_y_block
= vp8_dequant_dc_idct_add_y_block_sse2
;
56 pbi
->dequant
.idct_add_y_block
= vp8_dequant_idct_add_y_block_sse2
;
57 pbi
->dequant
.idct_add_uv_block
= vp8_dequant_idct_add_uv_block_sse2
;