2001-07-22 17:18:56 +03:00
|
|
|
/*
|
2012-07-08 20:16:20 +03:00
|
|
|
* DSP utils : average functions are compiled twice for 3dnow/mmxext
|
2009-01-19 17:46:40 +02:00
|
|
|
* Copyright (c) 2000, 2001 Fabrice Bellard
|
2004-01-10 18:04:55 +02:00
|
|
|
* Copyright (c) 2002-2004 Michael Niedermayer
|
2001-07-22 17:18:56 +03:00
|
|
|
*
|
2007-07-05 13:37:29 +03:00
|
|
|
* MMX optimization by Nick Kurshev <nickols_k@mail.ru>
|
|
|
|
* mostly rewritten by Michael Niedermayer <michaelni@gmx.at>
|
|
|
|
* and improved by Zdenek Kabelac <kabi@users.sf.net>
|
|
|
|
*
|
2006-10-07 18:30:46 +03:00
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2002-05-26 01:45:33 +03:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2006-10-07 18:30:46 +03:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2001-07-22 17:18:56 +03:00
|
|
|
*
|
2006-10-07 18:30:46 +03:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2001-07-22 17:18:56 +03:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-05-26 01:45:33 +03:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-07-22 17:18:56 +03:00
|
|
|
*
|
2002-05-26 01:45:33 +03:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2006-10-07 18:30:46 +03:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2006-01-13 00:43:26 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-07-22 17:18:56 +03:00
|
|
|
*/
|
2005-12-17 20:14:38 +02:00
|
|
|
|
2013-01-27 06:45:43 +03:00
|
|
|
//FIXME the following could be optimized too ...
|
|
|
|
static void DEF(ff_put_no_rnd_pixels16_x2)(uint8_t *block,
|
|
|
|
const uint8_t *pixels,
|
2013-01-30 00:13:55 +03:00
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2013-01-27 06:45:43 +03:00
|
|
|
DEF(ff_put_no_rnd_pixels8_x2)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_put_no_rnd_pixels8_x2)(block + 8, pixels + 8, line_size, h);
|
2002-05-17 04:04:14 +03:00
|
|
|
}
|
|
|
|
|
2013-01-27 06:45:43 +03:00
|
|
|
static void DEF(ff_put_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
|
2013-01-30 00:13:55 +03:00
|
|
|
ptrdiff_t line_size, int h)
|
2002-05-17 04:04:14 +03:00
|
|
|
{
|
2013-01-27 06:45:43 +03:00
|
|
|
DEF(ff_put_pixels8_y2)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_put_pixels8_y2)(block + 8, pixels + 8, line_size, h);
|
2001-07-22 17:18:56 +03:00
|
|
|
}
|
|
|
|
|
2013-01-27 06:45:43 +03:00
|
|
|
static void DEF(ff_put_no_rnd_pixels16_y2)(uint8_t *block,
|
|
|
|
const uint8_t *pixels,
|
2013-01-30 00:13:55 +03:00
|
|
|
ptrdiff_t line_size, int h)
|
2010-06-04 07:46:26 +03:00
|
|
|
{
|
2013-01-27 06:45:43 +03:00
|
|
|
DEF(ff_put_no_rnd_pixels8_y2)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_put_no_rnd_pixels8_y2)(block + 8, pixels + 8, line_size, h);
|
2010-06-04 07:46:26 +03:00
|
|
|
}
|
|
|
|
|
2013-01-27 06:45:43 +03:00
|
|
|
static void DEF(ff_avg_pixels16)(uint8_t *block, const uint8_t *pixels,
|
2013-01-30 00:13:55 +03:00
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2013-01-27 06:45:43 +03:00
|
|
|
DEF(ff_avg_pixels8)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_avg_pixels8)(block + 8, pixels + 8, line_size, h);
|
2001-07-22 17:18:56 +03:00
|
|
|
}
|
|
|
|
|
2013-01-27 06:45:43 +03:00
|
|
|
static void DEF(ff_avg_pixels16_x2)(uint8_t *block, const uint8_t *pixels,
|
2013-01-30 00:13:55 +03:00
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2013-01-27 06:45:43 +03:00
|
|
|
DEF(ff_avg_pixels8_x2)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_avg_pixels8_x2)(block + 8, pixels + 8, line_size, h);
|
2001-07-22 17:18:56 +03:00
|
|
|
}
|
|
|
|
|
2013-01-27 06:45:43 +03:00
|
|
|
static void DEF(ff_avg_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
|
2013-01-30 00:13:55 +03:00
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2013-01-27 06:45:43 +03:00
|
|
|
DEF(ff_avg_pixels8_y2)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_avg_pixels8_y2)(block + 8, pixels + 8, line_size, h);
|
2001-07-22 17:18:56 +03:00
|
|
|
}
|
|
|
|
|
2013-01-27 06:45:43 +03:00
|
|
|
static void DEF(ff_avg_pixels16_xy2)(uint8_t *block, const uint8_t *pixels,
|
2013-01-30 00:13:55 +03:00
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2013-01-27 06:45:43 +03:00
|
|
|
DEF(ff_avg_pixels8_xy2)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_avg_pixels8_xy2)(block + 8, pixels + 8, line_size, h);
|
2002-09-11 15:39:53 +03:00
|
|
|
}
|