[FFmpeg-devel] [PATCH]Silence many icc warnings in libswscale
Carl Eugen Hoyos
cehoyos
Tue Oct 7 21:27:32 CEST 2008
Hi!
Attached patch fixes the following warnings when compiling swscale.c with
icc, please comment, Carl Eugen
swscale.c(1738): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat)); break;
^
swscale.c(1738): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat)); break;
^
swscale.c(1760): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat)); break;
^
swscale.c(1760): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat)); break;
^
swscale.c(1764): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat), sws_format_name(dstFormat));
^
swscale.c(1764): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat), sws_format_name(dstFormat));
^
swscale.c(2160): warning #188: enumerated type mixed with another type
av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as
input pixel format\n", sws_format_name(srcFormat));
^
swscale.c(2165): warning #188: enumerated type mixed with another type
av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as
output pixel format\n", sws_format_name(dstFormat));
^
swscale.c(2368): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat));
^
swscale.c(2368): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat));
^
swscale.c(2556): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat), dither,
sws_format_name(dstFormat));
^
swscale.c(2556): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat), dither,
sws_format_name(dstFormat));
^
swscale.c(2559): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat));
^
swscale.c(2559): warning #188: enumerated type mixed with another type
sws_format_name(srcFormat),
sws_format_name(dstFormat));
^
-------------- next part --------------
Index: libswscale/swscale.c
===================================================================
--- libswscale/swscale.c (Revision 27726)
+++ libswscale/swscale.c (Arbeitskopie)
@@ -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};
Index: libswscale/swscale_internal.h
===================================================================
--- libswscale/swscale_internal.h (Revision 27726)
+++ libswscale/swscale_internal.h (Arbeitskopie)
@@ -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;
More information about the ffmpeg-devel
mailing list