The dprintf macro is no-op when DEBUG is unset, so there is no need to
put it conditional to DEBUG.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 73a0b19ba39a4aca79a768feeacd83307a62836e)
... | ... |
@@ -76,9 +76,8 @@ static int gif_read_image(GifState *s) |
76 | 76 |
is_interleaved = flags & 0x40; |
77 | 77 |
has_local_palette = flags & 0x80; |
78 | 78 |
bits_per_pixel = (flags & 0x07) + 1; |
79 |
-#ifdef DEBUG |
|
79 |
+ |
|
80 | 80 |
dprintf(s->avctx, "gif: image x=%d y=%d w=%d h=%d\n", left, top, width, height); |
81 |
-#endif |
|
82 | 81 |
|
83 | 82 |
if (has_local_palette) { |
84 | 83 |
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 | 163 |
/* extension */ |
164 | 164 |
ext_code = bytestream_get_byte(&s->bytestream); |
165 | 165 |
ext_len = bytestream_get_byte(&s->bytestream); |
166 |
-#ifdef DEBUG |
|
166 |
+ |
|
167 | 167 |
dprintf(s->avctx, "gif: ext_code=0x%x len=%d\n", ext_code, ext_len); |
168 |
-#endif |
|
168 |
+ |
|
169 | 169 |
switch(ext_code) { |
170 | 170 |
case 0xf9: |
171 | 171 |
if (ext_len != 4) |
... | ... |
@@ -179,11 +178,11 @@ static int gif_read_extension(GifState *s) |
179 | 179 |
else |
180 | 180 |
s->transparent_color_index = -1; |
181 | 181 |
s->gce_disposal = (gce_flags >> 2) & 0x7; |
182 |
-#ifdef DEBUG |
|
182 |
+ |
|
183 | 183 |
dprintf(s->avctx, "gif: gce_flags=%x delay=%d tcolor=%d disposal=%d\n", |
184 | 184 |
gce_flags, s->gce_delay, |
185 | 185 |
s->transparent_color_index, s->gce_disposal); |
186 |
-#endif |
|
186 |
+ |
|
187 | 187 |
ext_len = bytestream_get_byte(&s->bytestream); |
188 | 188 |
break; |
189 | 189 |
} |
... | ... |
@@ -194,9 +193,8 @@ static int gif_read_extension(GifState *s) |
194 | 194 |
for (i = 0; i < ext_len; i++) |
195 | 195 |
bytestream_get_byte(&s->bytestream); |
196 | 196 |
ext_len = bytestream_get_byte(&s->bytestream); |
197 |
-#ifdef DEBUG |
|
197 |
+ |
|
198 | 198 |
dprintf(s->avctx, "gif: ext_len1=%d\n", ext_len); |
199 |
-#endif |
|
200 | 199 |
} |
201 | 200 |
return 0; |
202 | 201 |
} |
... | ... |
@@ -232,11 +230,11 @@ static int gif_read_header1(GifState *s) |
232 | 232 |
s->bits_per_pixel = (v & 0x07) + 1; |
233 | 233 |
s->background_color_index = bytestream_get_byte(&s->bytestream); |
234 | 234 |
bytestream_get_byte(&s->bytestream); /* ignored */ |
235 |
-#ifdef DEBUG |
|
235 |
+ |
|
236 | 236 |
dprintf(s->avctx, "gif: screen_w=%d screen_h=%d bpp=%d global_palette=%d\n", |
237 | 237 |
s->screen_width, s->screen_height, s->bits_per_pixel, |
238 | 238 |
has_global_palette); |
239 |
-#endif |
|
239 |
+ |
|
240 | 240 |
if (has_global_palette) { |
241 | 241 |
n = 1 << s->bits_per_pixel; |
242 | 242 |
if (s->bytestream_end < s->bytestream + n * 3) |
... | ... |
@@ -250,9 +248,9 @@ static int gif_parse_next_image(GifState *s) |
250 | 250 |
{ |
251 | 251 |
while (s->bytestream < s->bytestream_end) { |
252 | 252 |
int code = bytestream_get_byte(&s->bytestream); |
253 |
-#ifdef DEBUG |
|
253 |
+ |
|
254 | 254 |
dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code); |
255 |
-#endif |
|
255 |
+ |
|
256 | 256 |
switch (code) { |
257 | 257 |
case ',': |
258 | 258 |
return gif_read_image(s); |
... | ... |
@@ -70,11 +70,7 @@ extern const MXFPixelLayout ff_mxf_pixel_layouts[]; |
70 | 70 |
|
71 | 71 |
int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt); |
72 | 72 |
|
73 |
-#ifdef DEBUG |
|
74 | 73 |
#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, \ |
75 | 74 |
(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]) |
76 |
-#else |
|
77 |
-#define PRINT_KEY(pc, s, x) |
|
78 |
-#endif |
|
79 | 75 |
|
80 | 76 |
#endif /* AVFORMAT_MXF_H */ |