r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / quicktime / libavcodec / ppc / dsputil_ppc.c
blobffe3ce06335e322c99a4fb79aee47307102567a4
1 /*
2 * Copyright (c) 2002 Brian Foley
3 * Copyright (c) 2002 Dieter Shirley
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.
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.
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
20 #include "../dsputil.h"
22 #ifdef HAVE_ALTIVEC
23 #include "dsputil_altivec.h"
24 #endif
26 int mm_flags = 0;
28 void dsputil_init_ppc(DSPContext* c, unsigned mask)
30 // Common optimisations whether Altivec or not
32 // ... pending ...
34 #if HAVE_ALTIVEC
35 if (has_altivec()) {
36 mm_flags |= MM_ALTIVEC;
38 // Altivec specific optimisations
39 c->pix_abs16x16_x2 = pix_abs16x16_x2_altivec;
40 c->pix_abs16x16_y2 = pix_abs16x16_y2_altivec;
41 c->pix_abs16x16_xy2 = pix_abs16x16_xy2_altivec;
42 c->pix_abs16x16 = pix_abs16x16_altivec;
43 c->pix_abs8x8 = pix_abs8x8_altivec;
44 c->pix_norm1 = pix_norm1_altivec;
45 c->pix_norm = pix_norm_altivec;
46 c->pix_sum = pix_sum_altivec;
47 c->diff_pixels = diff_pixels_altivec;
48 c->get_pixels = get_pixels_altivec;
49 } else
50 #endif
52 // Non-AltiVec PPC optimisations
54 // ... pending ...