2001-08-13 23:38:25 +02:00
|
|
|
/*
|
2006-10-07 17:30:46 +02:00
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg 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-08-13 23:38:25 +02:00
|
|
|
*
|
2006-10-07 17:30:46 +02:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2001-08-13 23:38:25 +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-08-13 23:38:25 +02:00
|
|
|
*
|
2002-05-26 00:45:33 +02:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2006-10-07 17:30:46 +02:00
|
|
|
* License along with FFmpeg; 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-08-13 23:38:25 +02:00
|
|
|
*/
|
|
|
|
|
2014-02-12 21:28:44 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2013-02-01 10:31:59 +01:00
|
|
|
#include "libavutil/attributes.h"
|
2014-02-12 21:28:44 +01:00
|
|
|
#include "libavutil/cpu.h"
|
2012-04-21 16:31:10 +02:00
|
|
|
#include "libavutil/arm/cpu.h"
|
2014-02-12 21:28:44 +01:00
|
|
|
#include "libavcodec/avcodec.h"
|
2014-02-08 02:59:58 +01:00
|
|
|
#include "libavcodec/me_cmp.h"
|
2014-07-08 17:47:52 +02:00
|
|
|
#include "libavcodec/mpegvideo.h"
|
|
|
|
|
|
|
|
int ff_pix_abs16_armv6(MpegEncContext *s, uint8_t *blk1, uint8_t *blk2,
|
|
|
|
int line_size, int h);
|
|
|
|
int ff_pix_abs16_x2_armv6(MpegEncContext *s, uint8_t *blk1, uint8_t *blk2,
|
|
|
|
int line_size, int h);
|
|
|
|
int ff_pix_abs16_y2_armv6(MpegEncContext *s, uint8_t *blk1, uint8_t *blk2,
|
|
|
|
int line_size, int h);
|
|
|
|
|
|
|
|
int ff_pix_abs8_armv6(MpegEncContext *s, uint8_t *blk1, uint8_t *blk2,
|
|
|
|
int line_size, int h);
|
|
|
|
|
|
|
|
int ff_sse16_armv6(MpegEncContext *s, uint8_t *blk1, uint8_t *blk2,
|
|
|
|
int line_size, int h);
|
|
|
|
|
2014-02-08 02:59:58 +01:00
|
|
|
av_cold void ff_me_cmp_init_arm(MECmpContext *c, AVCodecContext *avctx)
|
2001-08-13 23:38:25 +02:00
|
|
|
{
|
2012-04-21 16:31:10 +02:00
|
|
|
int cpu_flags = av_get_cpu_flags();
|
2011-03-29 17:48:59 +02:00
|
|
|
|
2014-07-08 17:47:52 +02:00
|
|
|
if (have_armv6(cpu_flags)) {
|
|
|
|
c->pix_abs[0][0] = ff_pix_abs16_armv6;
|
|
|
|
c->pix_abs[0][1] = ff_pix_abs16_x2_armv6;
|
|
|
|
c->pix_abs[0][2] = ff_pix_abs16_y2_armv6;
|
|
|
|
|
|
|
|
c->pix_abs[1][0] = ff_pix_abs8_armv6;
|
|
|
|
|
|
|
|
c->sad[0] = ff_pix_abs16_armv6;
|
|
|
|
c->sad[1] = ff_pix_abs8_armv6;
|
|
|
|
|
|
|
|
c->sse[0] = ff_sse16_armv6;
|
|
|
|
}
|
2001-08-13 23:38:25 +02:00
|
|
|
}
|