Commit 58e4b706 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Change variable types from int to enum PixelFormat.

Fixes icc warning #188: enumerated type mixed with another type

Originally committed as revision 27727 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent 4e92dabf
...@@ -1710,8 +1710,8 @@ static int YUV422PToUyvyWrapper(SwsContext *c, uint8_t* src[], int srcStride[], ...@@ -1710,8 +1710,8 @@ static int YUV422PToUyvyWrapper(SwsContext *c, uint8_t* src[], int srcStride[],
/* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ /* {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, static int rgb2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]){ int srcSliceH, uint8_t* dst[], int dstStride[]){
const int srcFormat= c->srcFormat; const enum PixelFormat srcFormat= c->srcFormat;
const int dstFormat= c->dstFormat; const enum PixelFormat dstFormat= c->dstFormat;
const int srcBpp= (fmt_depth(srcFormat) + 7) >> 3; const int srcBpp= (fmt_depth(srcFormat) + 7) >> 3;
const int dstBpp= (fmt_depth(dstFormat) + 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 */ 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 @@ static int handle_jpeg(int *format) ...@@ -2116,7 +2116,7 @@ static int handle_jpeg(int *format)
} }
} }
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){ SwsFilter *srcFilter, SwsFilter *dstFilter, double *param){
SwsContext *c; SwsContext *c;
...@@ -3082,8 +3082,8 @@ void sws_freeContext(SwsContext *c){ ...@@ -3082,8 +3082,8 @@ void sws_freeContext(SwsContext *c){
* asumed to remain valid. * asumed to remain valid.
*/ */
struct SwsContext *sws_getCachedContext(struct SwsContext *context, struct SwsContext *sws_getCachedContext(struct SwsContext *context,
int srcW, int srcH, int srcFormat, int srcW, int srcH, enum PixelFormat srcFormat,
int dstW, int dstH, int dstFormat, int flags, int dstW, int dstH, enum PixelFormat dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter, double *param) SwsFilter *srcFilter, SwsFilter *dstFilter, double *param)
{ {
static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT}; static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT};
......
...@@ -71,7 +71,7 @@ typedef struct SwsContext{ ...@@ -71,7 +71,7 @@ typedef struct SwsContext{
int chrSrcW, chrSrcH, chrDstW, chrDstH; int chrSrcW, chrSrcH, chrDstW, chrDstH;
int lumXInc, chrXInc; int lumXInc, chrXInc;
int lumYInc, chrYInc; 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 origDstFormat, origSrcFormat; ///< format
int chrSrcHSubSample, chrSrcVSubSample; int chrSrcHSubSample, chrSrcVSubSample;
int chrIntHSubSample, chrIntVSubSample; int chrIntHSubSample, chrIntVSubSample;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment