swscale: remove unused COMPILE_TEMPLATE_ALTIVEC.
[ffmpeg.git] / libswscale / ppc / swscale_template.c
1 /*
2  * Copyright (C) 2001-2003 Michael Niedermayer <michaelni@gmx.at>
3  *
4  * This file is part of Libav.
5  *
6  * Libav is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * Libav is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with Libav; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20
21
22 #include "swscale_altivec_template.c"
23
24 static inline void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter,
25                                     const int16_t **lumSrc, int lumFilterSize,
26                                     const int16_t *chrFilter, const int16_t **chrUSrc,
27                                     const int16_t **chrVSrc, int chrFilterSize,
28                                     const int16_t **alpSrc,
29                                     uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
30                                     uint8_t *aDest, int dstW, int chrDstW)
31 {
32     yuv2yuvX_altivec_real(lumFilter, lumSrc, lumFilterSize,
33                           chrFilter, chrUSrc, chrVSrc, chrFilterSize,
34                           dest, uDest, vDest, dstW, chrDstW);
35 }
36
37 /**
38  * vertical scale YV12 to RGB
39  */
40 static inline void RENAME(yuv2packedX)(SwsContext *c, const int16_t *lumFilter,
41                                        const int16_t **lumSrc, int lumFilterSize,
42                                        const int16_t *chrFilter, const int16_t **chrUSrc,
43                                        const int16_t **chrVSrc, int chrFilterSize,
44                                        const int16_t **alpSrc, uint8_t *dest,
45                                        int dstW, int dstY)
46 {
47     /* The following list of supported dstFormat values should
48        match what's found in the body of ff_yuv2packedX_altivec() */
49     if (!(c->flags & SWS_BITEXACT) && !c->alpPixBuf &&
50          (c->dstFormat==PIX_FMT_ABGR  || c->dstFormat==PIX_FMT_BGRA  ||
51           c->dstFormat==PIX_FMT_BGR24 || c->dstFormat==PIX_FMT_RGB24 ||
52           c->dstFormat==PIX_FMT_RGBA  || c->dstFormat==PIX_FMT_ARGB))
53             ff_yuv2packedX_altivec(c, lumFilter, lumSrc, lumFilterSize,
54                                    chrFilter, chrUSrc, chrVSrc, chrFilterSize,
55                                    dest, dstW, dstY);
56     else
57         yuv2packedXinC(c, lumFilter, lumSrc, lumFilterSize,
58                        chrFilter, chrUSrc, chrVSrc, chrFilterSize,
59                        alpSrc, dest, dstW, dstY);
60 }
61
62 static void RENAME(sws_init_swScale)(SwsContext *c)
63 {
64     c->yuv2yuvX     = RENAME(yuv2yuvX    );
65     c->yuv2packedX  = RENAME(yuv2packedX );
66 }