# HG changeset patch # User diego # Date 1241866597 0 # Node ID 882a1f5613e1703bbd03672ec285221b925f079b # Parent d643e4643313fec72ec5b305888b810100d3e5cc Add missing const qualifiers to AltiVec function parameters where appropriate. Fixes a couple of 'discards qualifiers from pointer target type' warnings. diff -r d643e4643313 -r 882a1f5613e1 libswscale/ppc/swscale_altivec_template.c --- a/libswscale/ppc/swscale_altivec_template.c Fri May 08 21:51:13 2009 +0000 +++ b/libswscale/ppc/swscale_altivec_template.c Sat May 09 10:56:37 2009 +0000 @@ -85,8 +85,8 @@ } static inline void -yuv2yuvX_altivec_real(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, - int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, +yuv2yuvX_altivec_real(const int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW) { const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)}; @@ -208,7 +208,11 @@ } } -static inline void hScale_altivec_real(int16_t *dst, int dstW, uint8_t *src, int srcW, int xInc, int16_t *filter, int16_t *filterPos, int filterSize) { +static inline void hScale_altivec_real(int16_t *dst, int dstW, + const uint8_t *src, int srcW, + int xInc, const int16_t *filter, + const int16_t *filterPos, int filterSize) +{ register int i; int __attribute__ ((aligned (16))) tempo[4]; diff -r d643e4643313 -r 882a1f5613e1 libswscale/ppc/yuv2rgb_altivec.c --- a/libswscale/ppc/yuv2rgb_altivec.c Fri May 08 21:51:13 2009 +0000 +++ b/libswscale/ppc/yuv2rgb_altivec.c Sat May 09 10:56:37 2009 +0000 @@ -787,8 +787,8 @@ void ff_yuv2packedX_altivec(SwsContext *c, - int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, - int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, + const int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, int dstW, int dstY) { int i,j; diff -r d643e4643313 -r 882a1f5613e1 libswscale/swscale_internal.h --- a/libswscale/swscale_internal.h Fri May 08 21:51:13 2009 +0000 +++ b/libswscale/swscale_internal.h Sat May 09 10:56:37 2009 +0000 @@ -289,8 +289,8 @@ SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c); void ff_bfin_get_unscaled_swscale(SwsContext *c); void ff_yuv2packedX_altivec(SwsContext *c, - int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, - int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, + const int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, int dstW, int dstY); const char *sws_format_name(int format);