# HG changeset patch # User cehoyos # Date 1223408679 0 # Node ID 9cf6c7c5c7cdf0acdb7a17981e72e51751873984 # Parent 1b7eb875ce1197e982d314850e975c5b1df1cf0e Change variable types from int to enum PixelFormat. Fixes icc warning #188: enumerated type mixed with another type diff -r 1b7eb875ce11 -r 9cf6c7c5c7cd libswscale/swscale.c --- a/libswscale/swscale.c Tue Oct 07 08:25:47 2008 +0000 +++ b/libswscale/swscale.c Tue Oct 07 19:44:39 2008 +0000 @@ -1710,8 +1710,8 @@ /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ - const int srcFormat= c->srcFormat; - const int dstFormat= c->dstFormat; + const enum PixelFormat srcFormat= c->srcFormat; + const enum PixelFormat dstFormat= c->dstFormat; const int srcBpp= (fmt_depth(srcFormat) + 7) >> 3; const int dstBpp= (fmt_depth(dstFormat) + 7) >> 3; const int srcId= fmt_depth(srcFormat) >> 2; /* 1:0, 4:1, 8:2, 15:3, 16:4, 24:6, 32:8 */ @@ -2116,7 +2116,7 @@ } } -SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, +SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param){ SwsContext *c; @@ -3082,8 +3082,8 @@ * asumed to remain valid. */ struct SwsContext *sws_getCachedContext(struct SwsContext *context, - int srcW, int srcH, int srcFormat, - int dstW, int dstH, int dstFormat, int flags, + int srcW, int srcH, enum PixelFormat srcFormat, + int dstW, int dstH, enum PixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param) { static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT}; diff -r 1b7eb875ce11 -r 9cf6c7c5c7cd libswscale/swscale_internal.h --- a/libswscale/swscale_internal.h Tue Oct 07 08:25:47 2008 +0000 +++ b/libswscale/swscale_internal.h Tue Oct 07 19:44:39 2008 +0000 @@ -71,7 +71,7 @@ int chrSrcW, chrSrcH, chrDstW, chrDstH; int lumXInc, chrXInc; int lumYInc, chrYInc; - int dstFormat, srcFormat; ///< format 4:2:0 type is always YV12 + enum PixelFormat dstFormat, srcFormat; ///< format 4:2:0 type is always YV12 int origDstFormat, origSrcFormat; ///< format int chrSrcHSubSample, chrSrcVSubSample; int chrIntHSubSample, chrIntVSubSample;