[FFmpeg-devel] [PATCH 4/5] j2kenc: fix compiler warning for uninitialized variables
Jean First
jeanfirst at gmail.com
Tue Jan 3 00:28:07 CET 2012
Signed-off-by: Jean First <jeanfirst at gmail.com>
---
libavcodec/j2kenc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 37e31a9..b77ce52 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -438,7 +438,8 @@ static void init_quantization(J2kEncoderContext *s)
int nbands, lev = codsty->nreslevels - reslevelno - 1;
nbands = reslevelno ? 3 : 1;
for (bandno = 0; bandno < nbands; bandno++, gbandno++){
- int expn, mant;
+ int expn;
+ int mant = 0;
if (codsty->transform == FF_DWT97){
int bandpos = bandno + (reslevelno>0),
@@ -456,7 +457,7 @@ static void init_quantization(J2kEncoderContext *s)
}
}
-static void init_luts()
+static void init_luts(void)
{
int i, a,
mask = ~((1<<NMSEDEC_FRACBITS)-1);
@@ -491,7 +492,7 @@ static int getnmsedec_ref(int x, int bpno)
static void encode_sigpass(J2kT1Context *t1, int width, int height, int bandno, int *nmsedec, int bpno)
{
int y0, x, y, mask = 1 << (bpno + NMSEDEC_FRACBITS);
- int vert_causal_ctx_csty_loc_symbol;
+ int vert_causal_ctx_csty_loc_symbol = 0;
for (y0 = 0; y0 < height; y0 += 4)
for (x = 0; x < width; x++)
for (y = y0; y < height && y < y0+4; y++){
@@ -528,7 +529,7 @@ static void encode_refpass(J2kT1Context *t1, int width, int height, int *nmsedec
static void encode_clnpass(J2kT1Context *t1, int width, int height, int bandno, int *nmsedec, int bpno)
{
int y0, x, y, mask = 1 << (bpno + NMSEDEC_FRACBITS);
- int vert_causal_ctx_csty_loc_symbol;
+ int vert_causal_ctx_csty_loc_symbol = 0;
for (y0 = 0; y0 < height; y0 += 4)
for (x = 0; x < width; x++){
if (y0 + 3 < height && !(
--
1.7.7.3
More information about the ffmpeg-devel
mailing list