Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__H264__App
comparison libavcodec/ppc/dsputil_ppc.c @ 9:ea1ba68cf0ed
update to match api changes + add sscc produced source
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 05 Jun 2013 14:43:26 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4897d1d9b338 |
|---|---|
| 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 */ | |
| 22 | |
| 23 #include "libavcodec/dsputil.h" | |
| 24 #include "dsputil_ppc.h" | |
| 25 #include "dsputil_altivec.h" | |
| 26 | |
| 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 } | |
| 35 | |
| 36 void dsputil_init_ppc(DSPContext* c) | |
| 37 { | |
| 38 c->prefetch = prefetch_ppc; | |
| 39 | |
| 40 #if HAVE_ALTIVEC | |
| 41 dsputil_h264_init_ppc(c); | |
| 42 dsputil_init_altivec(c); | |
| 43 | |
| 44 c->idct_put = idct_put_altivec; | |
| 45 c->idct_add = idct_add_altivec; | |
| 46 | |
| 47 #endif /* HAVE_ALTIVEC */ | |
| 48 } |
