2 * DSP utils : average functions are compiled twice for 3dnow/mmxext
3 * Copyright (c) 2000, 2001 Fabrice Bellard
4 * Copyright (c) 2002-2004 Michael Niedermayer
6 * MMX optimization by Nick Kurshev <nickols_k@mail.ru>
7 * mostly rewritten by Michael Niedermayer <michaelni@gmx.at>
8 * and improved by Zdenek Kabelac <kabi@users.sf.net>
10 * This file is part of FFmpeg.
12 * FFmpeg is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
17 * FFmpeg is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with FFmpeg; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 //FIXME the following could be optimized too ...
28 static void DEF(ff_put_no_rnd_pixels16_x2)(uint8_t *block,
29 const uint8_t *pixels,
30 ptrdiff_t line_size, int h)
32 DEF(ff_put_no_rnd_pixels8_x2)(block, pixels, line_size, h);
33 DEF(ff_put_no_rnd_pixels8_x2)(block + 8, pixels + 8, line_size, h);
36 static void DEF(ff_put_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
37 ptrdiff_t line_size, int h)
39 DEF(ff_put_pixels8_y2)(block, pixels, line_size, h);
40 DEF(ff_put_pixels8_y2)(block + 8, pixels + 8, line_size, h);
43 static void DEF(ff_put_no_rnd_pixels16_y2)(uint8_t *block,
44 const uint8_t *pixels,
45 ptrdiff_t line_size, int h)
47 DEF(ff_put_no_rnd_pixels8_y2)(block, pixels, line_size, h);
48 DEF(ff_put_no_rnd_pixels8_y2)(block + 8, pixels + 8, line_size, h);
51 static void DEF(ff_avg_pixels16)(uint8_t *block, const uint8_t *pixels,
52 ptrdiff_t line_size, int h)
54 DEF(ff_avg_pixels8)(block, pixels, line_size, h);
55 DEF(ff_avg_pixels8)(block + 8, pixels + 8, line_size, h);
58 static void DEF(ff_avg_pixels16_x2)(uint8_t *block, const uint8_t *pixels,
59 ptrdiff_t line_size, int h)
61 DEF(ff_avg_pixels8_x2)(block, pixels, line_size, h);
62 DEF(ff_avg_pixels8_x2)(block + 8, pixels + 8, line_size, h);
65 static void DEF(ff_avg_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
66 ptrdiff_t line_size, int h)
68 DEF(ff_avg_pixels8_y2)(block, pixels, line_size, h);
69 DEF(ff_avg_pixels8_y2)(block + 8, pixels + 8, line_size, h);
72 static void DEF(ff_avg_pixels16_xy2)(uint8_t *block, const uint8_t *pixels,
73 ptrdiff_t line_size, int h)
75 DEF(ff_avg_pixels8_xy2)(block, pixels, line_size, h);
76 DEF(ff_avg_pixels8_xy2)(block + 8, pixels + 8, line_size, h);