2001-07-22 16:18:56 +02:00
|
|
|
/*
|
2012-07-08 19:16:20 +02:00
|
|
|
* DSP utils : average functions are compiled twice for 3dnow/mmxext
|
2009-01-19 16:46:40 +01:00
|
|
|
* Copyright (c) 2000, 2001 Fabrice Bellard
|
2004-01-10 17:04:55 +01:00
|
|
|
* Copyright (c) 2002-2004 Michael Niedermayer
|
2001-07-22 16:18:56 +02:00
|
|
|
*
|
2007-07-05 12:37:29 +02: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>
|
|
|
|
*
|
2011-03-18 18:35:10 +01:00
|
|
|
* This file is part of Libav.
|
2006-10-07 17:30:46 +02:00
|
|
|
*
|
2011-03-18 18:35:10 +01:00
|
|
|
* Libav is free software; you can redistribute it and/or
|
2002-05-26 00:45:33 +02:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2006-10-07 17:30:46 +02:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2001-07-22 16:18:56 +02:00
|
|
|
*
|
2011-03-18 18:35:10 +01:00
|
|
|
* Libav is distributed in the hope that it will be useful,
|
2001-07-22 16:18:56 +02:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-05-26 00:45:33 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-07-22 16:18:56 +02:00
|
|
|
*
|
2002-05-26 00:45:33 +02:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2011-03-18 18:35:10 +01:00
|
|
|
* License along with Libav; if not, write to the Free Software
|
2006-01-12 23:43:26 +01:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-07-22 16:18:56 +02:00
|
|
|
*/
|
2005-12-17 19:14:38 +01:00
|
|
|
|
2013-01-27 04:45:43 +01:00
|
|
|
//FIXME the following could be optimized too ...
|
2013-04-20 22:15:22 +02:00
|
|
|
static void DEF(put_no_rnd_pixels16_x2)(uint8_t *block,
|
|
|
|
const uint8_t *pixels,
|
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 16:18:56 +02:00
|
|
|
{
|
2013-01-27 04:45:43 +01: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 03:04:14 +02:00
|
|
|
}
|
|
|
|
|
2013-04-20 22:15:22 +02:00
|
|
|
static void DEF(put_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
|
|
|
|
ptrdiff_t line_size, int h)
|
2002-05-17 03:04:14 +02:00
|
|
|
{
|
2013-01-27 04:45:43 +01: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 16:18:56 +02:00
|
|
|
}
|
|
|
|
|
2013-04-20 22:15:22 +02:00
|
|
|
static void DEF(put_no_rnd_pixels16_y2)(uint8_t *block,
|
|
|
|
const uint8_t *pixels,
|
|
|
|
ptrdiff_t line_size, int h)
|
2010-06-04 06:46:26 +02:00
|
|
|
{
|
2013-01-27 04:45:43 +01: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 06:46:26 +02:00
|
|
|
}
|
|
|
|
|
2013-04-20 22:15:22 +02:00
|
|
|
static void DEF(avg_pixels16)(uint8_t *block, const uint8_t *pixels,
|
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 16:18:56 +02:00
|
|
|
{
|
2013-01-27 04:45:43 +01:00
|
|
|
DEF(ff_avg_pixels8)(block, pixels, line_size, h);
|
|
|
|
DEF(ff_avg_pixels8)(block + 8, pixels + 8, line_size, h);
|
2001-07-22 16:18:56 +02:00
|
|
|
}
|
|
|
|
|
2013-04-20 22:15:22 +02:00
|
|
|
static void DEF(avg_pixels16_x2)(uint8_t *block, const uint8_t *pixels,
|
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 16:18:56 +02:00
|
|
|
{
|
2013-01-27 04:45:43 +01: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 16:18:56 +02:00
|
|
|
}
|
|
|
|
|
2013-04-20 22:15:22 +02:00
|
|
|
static void DEF(avg_pixels16_y2)(uint8_t *block, const uint8_t *pixels,
|
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 16:18:56 +02:00
|
|
|
{
|
2013-01-27 04:45:43 +01: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 16:18:56 +02:00
|
|
|
}
|
|
|
|
|
2013-04-20 22:15:22 +02:00
|
|
|
static void DEF(avg_pixels16_xy2)(uint8_t *block, const uint8_t *pixels,
|
|
|
|
ptrdiff_t line_size, int h)
|
2001-07-22 16:18:56 +02:00
|
|
|
{
|
2013-01-27 04:45:43 +01: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 14:39:53 +02:00
|
|
|
}
|