hpeldsp_avg_template.c
Go to the documentation of this file.
1 /*
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
5  *
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>
9  *
10  * This file is part of FFmpeg.
11  *
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.
16  *
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.
21  *
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
25  */
26 
27 //FIXME the following could be optimized too ...
29  const uint8_t *pixels,
30  ptrdiff_t line_size, int h)
31 {
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);
34 }
35 
36 static void DEF(ff_put_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
37  ptrdiff_t line_size, int h)
38 {
39  DEF(ff_put_pixels8_y2)(block, pixels, line_size, h);
40  DEF(ff_put_pixels8_y2)(block + 8, pixels + 8, line_size, h);
41 }
42 
44  const uint8_t *pixels,
45  ptrdiff_t line_size, int h)
46 {
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);
49 }
50 
51 static void DEF(ff_avg_pixels16)(uint8_t *block, const uint8_t *pixels,
52  ptrdiff_t line_size, int h)
53 {
54  DEF(ff_avg_pixels8)(block, pixels, line_size, h);
55  DEF(ff_avg_pixels8)(block + 8, pixels + 8, line_size, h);
56 }
57 
58 static void DEF(ff_avg_pixels16_x2)(uint8_t *block, const uint8_t *pixels,
59  ptrdiff_t line_size, int h)
60 {
61  DEF(ff_avg_pixels8_x2)(block, pixels, line_size, h);
62  DEF(ff_avg_pixels8_x2)(block + 8, pixels + 8, line_size, h);
63 }
64 
65 static void DEF(ff_avg_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
66  ptrdiff_t line_size, int h)
67 {
68  DEF(ff_avg_pixels8_y2)(block, pixels, line_size, h);
69  DEF(ff_avg_pixels8_y2)(block + 8, pixels + 8, line_size, h);
70 }
71 
72 static void DEF(ff_avg_pixels16_xy2)(uint8_t *block, const uint8_t *pixels,
73  ptrdiff_t line_size, int h)
74 {
75  DEF(ff_avg_pixels8_xy2)(block, pixels, line_size, h);
76  DEF(ff_avg_pixels8_xy2)(block + 8, pixels + 8, line_size, h);
77 }
static void DEF() ff_put_no_rnd_pixels16_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
uint8_t
#define DEF(type, name, bytes, read, write)
Definition: bytestream.h:41
static void DEF() ff_put_pixels16_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
static void DEF() ff_avg_pixels16(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
static void DEF() ff_put_no_rnd_pixels16_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
static void DEF() ff_avg_pixels16_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
static void DEF() ff_avg_pixels16_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
static void DEF() ff_avg_pixels16_xy2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)