view libavcodec/ppc/dsputil_ppc.c @ 2:897f711a7157

rearrange to work with autoconf
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 25 Sep 2012 15:55:33 +0200
parents
children
line source
1 /*
2 * Copyright (c) 2002 Brian Foley
3 * Copyright (c) 2002 Dieter Shirley
4 * Copyright (c) 2003-2004 Romain Dolbeau <romain@dolbeau.org>
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
23 #include "libavcodec/dsputil.h"
24 #include "dsputil_ppc.h"
25 #include "dsputil_altivec.h"
27 static void prefetch_ppc(void *mem, int stride, int h)
28 {
29 register const uint8_t *p = mem;
30 do {
31 __asm__ volatile ("dcbt 0,%0" : : "r" (p));
32 p+= stride;
33 } while(--h);
34 }
36 void dsputil_init_ppc(DSPContext* c)
37 {
38 c->prefetch = prefetch_ppc;
40 #if HAVE_ALTIVEC
41 dsputil_h264_init_ppc(c);
42 dsputil_init_altivec(c);
44 c->idct_put = idct_put_altivec;
45 c->idct_add = idct_add_altivec;
47 #endif /* HAVE_ALTIVEC */
48 }