Commit 73a0b19b authored by Diego Elio 'Flameeyes' Pettenò's avatar Diego Elio 'Flameeyes' Pettenò Committed by Mans Rullgard

Don't check for DEBUG before using dprintf.

The dprintf macro is no-op when DEBUG is unset, so there is no need to
put it conditional to DEBUG.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent a6d1bd05
...@@ -76,9 +76,8 @@ static int gif_read_image(GifState *s) ...@@ -76,9 +76,8 @@ static int gif_read_image(GifState *s)
is_interleaved = flags & 0x40; is_interleaved = flags & 0x40;
has_local_palette = flags & 0x80; has_local_palette = flags & 0x80;
bits_per_pixel = (flags & 0x07) + 1; bits_per_pixel = (flags & 0x07) + 1;
#ifdef DEBUG
dprintf(s->avctx, "gif: image x=%d y=%d w=%d h=%d\n", left, top, width, height); dprintf(s->avctx, "gif: image x=%d y=%d w=%d h=%d\n", left, top, width, height);
#endif
if (has_local_palette) { if (has_local_palette) {
bytestream_get_buffer(&s->bytestream, s->local_palette, 3 * (1 << bits_per_pixel)); bytestream_get_buffer(&s->bytestream, s->local_palette, 3 * (1 << bits_per_pixel));
...@@ -163,9 +162,9 @@ static int gif_read_extension(GifState *s) ...@@ -163,9 +162,9 @@ static int gif_read_extension(GifState *s)
/* extension */ /* extension */
ext_code = bytestream_get_byte(&s->bytestream); ext_code = bytestream_get_byte(&s->bytestream);
ext_len = bytestream_get_byte(&s->bytestream); ext_len = bytestream_get_byte(&s->bytestream);
#ifdef DEBUG
dprintf(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len); dprintf(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len);
#endif
switch(ext_code) { switch(ext_code) {
case 0xf9: case 0xf9:
if (ext_len != 4) if (ext_len != 4)
...@@ -179,11 +178,11 @@ static int gif_read_extension(GifState *s) ...@@ -179,11 +178,11 @@ static int gif_read_extension(GifState *s)
else else
s->transparent_color_index = -1; s->transparent_color_index = -1;
s->gce_disposal = (gce_flags >> 2) & 0x7; s->gce_disposal = (gce_flags >> 2) & 0x7;
#ifdef DEBUG
dprintf(s->avctx, "gif: gce_flags=%x delay=%d tcolor=%d disposal=%d\n", dprintf(s->avctx, "gif: gce_flags=%x delay=%d tcolor=%d disposal=%d\n",
gce_flags, s->gce_delay, gce_flags, s->gce_delay,
s->transparent_color_index, s->gce_disposal); s->transparent_color_index, s->gce_disposal);
#endif
ext_len = bytestream_get_byte(&s->bytestream); ext_len = bytestream_get_byte(&s->bytestream);
break; break;
} }
...@@ -194,9 +193,8 @@ static int gif_read_extension(GifState *s) ...@@ -194,9 +193,8 @@ static int gif_read_extension(GifState *s)
for (i = 0; i < ext_len; i++) for (i = 0; i < ext_len; i++)
bytestream_get_byte(&s->bytestream); bytestream_get_byte(&s->bytestream);
ext_len = bytestream_get_byte(&s->bytestream); ext_len = bytestream_get_byte(&s->bytestream);
#ifdef DEBUG
dprintf(s->avctx, "gif: ext_len1=%d\n", ext_len); dprintf(s->avctx, "gif: ext_len1=%d\n", ext_len);
#endif
} }
return 0; return 0;
} }
...@@ -232,11 +230,11 @@ static int gif_read_header1(GifState *s) ...@@ -232,11 +230,11 @@ static int gif_read_header1(GifState *s)
s->bits_per_pixel = (v & 0x07) + 1; s->bits_per_pixel = (v & 0x07) + 1;
s->background_color_index = bytestream_get_byte(&s->bytestream); s->background_color_index = bytestream_get_byte(&s->bytestream);
bytestream_get_byte(&s->bytestream); /* ignored */ bytestream_get_byte(&s->bytestream); /* ignored */
#ifdef DEBUG
dprintf(s->avctx, "gif: screen_w=%d screen_h=%d bpp=%d global_palette=%d\n", dprintf(s->avctx, "gif: screen_w=%d screen_h=%d bpp=%d global_palette=%d\n",
s->screen_width, s->screen_height, s->bits_per_pixel, s->screen_width, s->screen_height, s->bits_per_pixel,
has_global_palette); has_global_palette);
#endif
if (has_global_palette) { if (has_global_palette) {
n = 1 << s->bits_per_pixel; n = 1 << s->bits_per_pixel;
if (s->bytestream_end < s->bytestream + n * 3) if (s->bytestream_end < s->bytestream + n * 3)
...@@ -250,9 +248,9 @@ static int gif_parse_next_image(GifState *s) ...@@ -250,9 +248,9 @@ static int gif_parse_next_image(GifState *s)
{ {
while (s->bytestream < s->bytestream_end) { while (s->bytestream < s->bytestream_end) {
int code = bytestream_get_byte(&s->bytestream); int code = bytestream_get_byte(&s->bytestream);
#ifdef DEBUG
dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code); dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code);
#endif
switch (code) { switch (code) {
case ',': case ',':
return gif_read_image(s); return gif_read_image(s);
......
...@@ -70,11 +70,7 @@ extern const MXFPixelLayout ff_mxf_pixel_layouts[]; ...@@ -70,11 +70,7 @@ extern const MXFPixelLayout ff_mxf_pixel_layouts[];
int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt); int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt);
#ifdef DEBUG
#define PRINT_KEY(pc, s, x) dprintf(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \ #define PRINT_KEY(pc, s, x) dprintf(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \
(x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15]) (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15])
#else
#define PRINT_KEY(pc, s, x)
#endif
#endif /* AVFORMAT_MXF_H */ #endif /* AVFORMAT_MXF_H */
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