2002-11-02 13:28:08 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2002 Brian Foley
|
|
|
|
* Copyright (c) 2002 Dieter Shirley
|
2004-04-20 20:05:12 +03:00
|
|
|
* Copyright (c) 2003-2004 Romain Dolbeau <romain@dolbeau.org>
|
2002-11-02 13:28:08 +02:00
|
|
|
*
|
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-11-02 13:28:08 +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 18:30:46 +03:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2002-11-02 13:28:08 +02:00
|
|
|
*
|
2006-10-07 18:30:46 +03:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2002-11-02 13:28:08 +02:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* 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
|
2002-11-02 13:28:08 +02:00
|
|
|
*/
|
|
|
|
|
2012-08-15 23:27:52 +03:00
|
|
|
#include <string.h>
|
|
|
|
|
2013-02-01 12:31:59 +03:00
|
|
|
#include "libavutil/attributes.h"
|
2010-09-08 18:07:14 +03:00
|
|
|
#include "libavutil/cpu.h"
|
2013-08-20 17:36:47 +03:00
|
|
|
#include "libavutil/ppc/cpu.h"
|
2014-01-17 19:38:05 +03:00
|
|
|
#include "libavcodec/avcodec.h"
|
|
|
|
#include "libavcodec/dsputil.h"
|
2002-09-02 11:48:12 +03:00
|
|
|
#include "dsputil_altivec.h"
|
|
|
|
|
2014-07-08 18:31:15 +03:00
|
|
|
av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx)
|
2002-09-02 11:48:12 +03:00
|
|
|
{
|
2011-09-30 03:43:20 +03:00
|
|
|
int mm_flags = av_get_cpu_flags();
|
2013-08-29 15:23:28 +03:00
|
|
|
if (PPC_ALTIVEC(mm_flags)) {
|
2014-07-08 18:31:15 +03:00
|
|
|
ff_dsputil_init_altivec(c, avctx);
|
2002-09-02 11:48:12 +03:00
|
|
|
}
|
|
|
|
}
|