comparison ppc/dsputil_ppc.c @ 828:ace3ccd18dd2 libavcodec

Altivec Patch (Mark III) by (Dieter Shirley <dieters at schemasoft dot com>)
author michaelni
date Sat, 02 Nov 2002 11:28:08 +0000
parents 14d84a5e77a4
children 3c6df37177dd
comparison
equal deleted inserted replaced
827:770578c6c300 828:ace3ccd18dd2
1 /*
2 * Copyright (c) 2002 Brian Foley
3 * Copyright (c) 2002 Dieter Shirley
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
1 #include "../dsputil.h" 20 #include "../dsputil.h"
2 21
3 #ifdef HAVE_ALTIVEC 22 #ifdef HAVE_ALTIVEC
4 #include "dsputil_altivec.h" 23 #include "dsputil_altivec.h"
5 #endif 24 #endif
6 25
7 void dsputil_init_ppc(void) 26 void dsputil_init_ppc(void)
8 { 27 {
28 // Common optimisations whether Altivec or not
29
30 // ... pending ...
31
9 #if HAVE_ALTIVEC 32 #if HAVE_ALTIVEC
10 if (has_altivec()) { 33 if (has_altivec()) {
34 // Altivec specific optimisations
11 pix_abs16x16 = pix_abs16x16_altivec; 35 pix_abs16x16 = pix_abs16x16_altivec;
12 pix_abs8x8 = pix_abs8x8_altivec; 36 pix_abs8x8 = pix_abs8x8_altivec;
13 pix_sum = pix_sum_altivec; 37 pix_sum = pix_sum_altivec;
38 diff_pixels = diff_pixels_altivec;
39 get_pixels = get_pixels_altivec;
14 } else 40 } else
15 #endif 41 #endif
16 { 42 {
17 /* Non-AltiVec PPC optimisations here */ 43 // Non-AltiVec PPC optimisations
44
45 // ... pending ...
18 } 46 }
19 } 47 }