[FFmpeg-cvslog] sws/output: silence warnings about uninitialized use of variables
Michael Niedermayer
git at videolan.org
Fri May 10 01:47:47 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May 10 00:48:37 2013 +0200| [8ef453ff830b40f635b94099d1debad3d809847f] | committer: Michael Niedermayer
sws/output: silence warnings about uninitialized use of variables
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ef453ff830b40f635b94099d1debad3d809847f
---
libswscale/output.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libswscale/output.c b/libswscale/output.c
index 9669b45..c6f2ff0 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1323,6 +1323,7 @@ yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter,
int i;
int step = (target == AV_PIX_FMT_RGB24 || target == AV_PIX_FMT_BGR24) ? 3 : 4;
int err[4] = {0};
+ int A = 0; //init to silence warning
if( target == AV_PIX_FMT_BGR4_BYTE || target == AV_PIX_FMT_RGB4_BYTE
|| target == AV_PIX_FMT_BGR8 || target == AV_PIX_FMT_RGB8)
@@ -1333,7 +1334,6 @@ yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter,
int Y = 1<<9;
int U = (1<<9)-(128 << 19);
int V = (1<<9)-(128 << 19);
- int A;
for (j = 0; j < lumFilterSize; j++) {
Y += lumSrc[j][i] * lumFilter[j];
@@ -1379,6 +1379,7 @@ yuv2rgb_full_2_c_template(SwsContext *c, const int16_t *buf[2],
int i;
int step = (target == AV_PIX_FMT_RGB24 || target == AV_PIX_FMT_BGR24) ? 3 : 4;
int err[4] = {0};
+ int A = 0; // init to silcene warning
if( target == AV_PIX_FMT_BGR4_BYTE || target == AV_PIX_FMT_RGB4_BYTE
|| target == AV_PIX_FMT_BGR8 || target == AV_PIX_FMT_RGB8)
@@ -1388,7 +1389,6 @@ yuv2rgb_full_2_c_template(SwsContext *c, const int16_t *buf[2],
int Y = ( buf0[i] * yalpha1 + buf1[i] * yalpha ) >> 10; //FIXME rounding
int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha-(128 << 19)) >> 10;
int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha-(128 << 19)) >> 10;
- int A;
if (hasAlpha) {
A = (abuf0[i] * yalpha1 + abuf1[i] * yalpha + (1<<18)) >> 19;
@@ -1421,11 +1421,11 @@ yuv2rgb_full_1_c_template(SwsContext *c, const int16_t *buf0,
step = 1;
if (uvalpha < 2048) {
+ int A = 0; //init to silence warning
for (i = 0; i < dstW; i++) {
int Y = buf0[i] << 2;
int U = (ubuf0[i] - (128<<7)) << 2;
int V = (vbuf0[i] - (128<<7)) << 2;
- int A;
if (hasAlpha) {
A = (abuf0[i] + 64) >> 7;
@@ -1438,11 +1438,11 @@ yuv2rgb_full_1_c_template(SwsContext *c, const int16_t *buf0,
}
} else {
const int16_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1];
+ int A = 0; //init to silence warning
for (i = 0; i < dstW; i++) {
int Y = buf0[i] << 2;
int U = (ubuf0[i] + ubuf1[i] - (128<<8)) << 1;
int V = (vbuf0[i] + vbuf1[i] - (128<<8)) << 1;
- int A;
if (hasAlpha) {
A = (abuf0[i] + 64) >> 7;
More information about the ffmpeg-cvslog
mailing list