History

Replace custom DEBUG preprocessor trickery by the standard one.

Diego Biurrun committed 15 years ago

Commit f190f671 parent 068aa3812 files · +11 −32Browse files

Unified · Split

12 files
  1. ffserver.c +2 −2
  2. libavcodec/cook.c +2 −3
  3. libavcodec/indeo5.c +1 −1
  4. libavcodec/ivi_common.c +1 −1
  5. libavcodec/ivi_common.h +0 −2
  6. libavcodec/svq1dec.c +0 −3
  7. libavcodec/vorbis.c +3 −6
  8. libavdevice/dv1394.c +0 −3
  9. libavdevice/vfwcap.c +1 −3
  10. libavformat/ape.c +1 −3
  11. libavformat/apetag.c +0 −2
  12. libavformat/rtsp.c +0 −3
ffserver.c+2−2
@@ -1760,7 +1760,7 @@ static int http_parse_request(HTTPContext *c) · 1759 unmodified lines
17601760 }
17611761 }
17621762
1763−#ifdef DEBUG_WMP
1763+#ifdef DEBUG
17641764 http_log("\nGot request:\n%s\n", c->buffer);
17651765 #endif
17661766
@@ -1790,7 +1790,7 @@ static int http_parse_request(HTTPContext *c) · 23 unmodified lines
17901790 return 0;
17911791 }
17921792
1793−#ifdef DEBUG_WMP
1793+#ifdef DEBUG
17941794 if (strcmp(stream->filename + strlen(stream->filename) - 4, ".asf") == 0)
17951795 http_log("\nGot request:\n%s\n", c->buffer);
17961796 #endif
libavcodec/cook.c+2−3
@@ -66,7 +66,6 @@ · 65 unmodified lines
6666
6767 #define SUBBAND_SIZE 20
6868 #define MAX_SUBPACKETS 5
69−//#define COOKDEBUG
7069
7170 typedef struct {
7271 int *now;
@@ -1005,7 +1004,7 @@ static int cook_decode_frame(AVCodecContext *avctx, · 932 unmodified lines
10051004 return avctx->block_align;
10061005 }
10071006
1008−#ifdef COOKDEBUG
1007+#ifdef DEBUG
10091008 static void dump_cook_context(COOKContext *q)
10101009 {
10111010 //int i=0;
@@ -1247,7 +1246,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 235 unmodified lines
12471246 else
12481247 avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
12491248
1250−#ifdef COOKDEBUG
1249+#ifdef DEBUG
12511250 dump_cook_context(q);
12521251 #endif
12531252 return 0;
libavcodec/indeo5.c+1−1
@@ -629,7 +629,7 @@ static int decode_band(IVI5DecContext *ctx, int plane_num, · 628 unmodified lines
629629 FFSWAP(int16_t, band->rv_map->valtab[idx1], band->rv_map->valtab[idx2]);
630630 }
631631
632−#if IVI_DEBUG
632+#ifdef DEBUG
633633 if (band->checksum_present) {
634634 uint16_t chksum = ivi_calc_band_checksum(band);
635635 if (chksum != band->checksum) {
libavcodec/ivi_common.c+1−1
@@ -563,7 +563,7 @@ void ff_ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band, · 562 unmodified lines
563563 }
564564
565565
566−#if IVI_DEBUG
566+#ifdef DEBUG
567567 uint16_t ivi_calc_band_checksum (IVIBandDesc *band)
568568 {
569569 int x, y;
libavcodec/ivi_common.h+0−2
@@ -33,8 +33,6 @@ · 32 unmodified lines
3333 #include "get_bits.h"
3434 #include <stdint.h>
3535
36−#define IVI_DEBUG 0
37−
3836 #define IVI_VLC_BITS 13 ///< max number of bits of the ivi's huffman codes
3937
4038 /**
libavcodec/svq1dec.c+0−3
@@ -33,7 +33,6 @@ · 32 unmodified lines
3333 */
3434
3535
36−//#define DEBUG_SVQ1
3736 #include "avcodec.h"
3837 #include "dsputil.h"
3938 #include "mpegvideo.h"
@@ -705,9 +704,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, · 665 unmodified lines
705704 result = svq1_decode_block_intra (&s->gb, &current[x], linesize);
706705 if (result != 0)
707706 {
708−//#ifdef DEBUG_SVQ1
709707 av_log(s->avctx, AV_LOG_INFO, "Error in svq1_decode_block %i (keyframe)\n",result);
710−//#endif
711708 goto err;
712709 }
713710 }
libavcodec/vorbis.c+3−6
@@ -20,9 +20,6 @@ · 19 unmodified lines
2020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2121 */
2222
23−#undef V_DEBUG
24−//#define V_DEBUG
25−
2623 #define ALT_BITSTREAM_READER_LE
2724 #include "avcodec.h"
2825 #include "get_bits.h"
@@ -57,7 +54,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) · 28 unmodified lines
5754
5855 unsigned i, j, p, code;
5956
60−#ifdef V_DEBUG
57+#ifdef DEBUG
6158 GetBitContext gb;
6259 #endif
6360
@@ -74,7 +71,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) · 10 unmodified lines
7471 for (i = 0; i < bits[p]; ++i)
7572 exit_at_level[i+1] = 1 << i;
7673
77−#ifdef V_DEBUG
74+#ifdef DEBUG
7875 av_log(NULL, AV_LOG_INFO, " %u. of %u code len %d code %d - ", p, num, bits[p], codes[p]);
7976 init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);
8077 for (i = 0; i < bits[p]; ++i)
@@ -102,7 +99,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) · 21 unmodified lines
10299 exit_at_level[j] = code + (1 << (j - 1));
103100 codes[p] = code;
104101
105−#ifdef V_DEBUG
102+#ifdef DEBUG
106103 av_log(NULL, AV_LOG_INFO, " %d. code len %d code %d - ", p, bits[p], codes[p]);
107104 init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);
108105 for (i = 0; i < bits[p]; ++i)
libavdevice/dv1394.c+0−3
@@ -33,9 +33,6 @@ · 32 unmodified lines
3333 #include "libavutil/log.h"
3434 #include "libavutil/opt.h"
3535 #include "libavformat/avformat.h"
36−
37−#undef DV1394_DEBUG
38−
3936 #include "libavformat/dv.h"
4037 #include "dv1394.h"
4138
libavdevice/vfwcap.c+1−3
@@ -26,8 +26,6 @@ · 25 unmodified lines
2626 #include <windows.h>
2727 #include <vfw.h>
2828
29−//#define DEBUG_VFW
30−
3129 /* Defines for VFW missing from MinGW.
3230 * Remove this when MinGW incorporates them. */
3331 #define HWND_MESSAGE ((HWND)-3)
@@ -122,7 +120,7 @@ static void dump_captureparms(AVFormatContext *s, CAPTUREPARMS *cparms) · 88 unmodified lines
122120
123121 static void dump_videohdr(AVFormatContext *s, VIDEOHDR *vhdr)
124122 {
125−#ifdef DEBUG_VFW
123+#ifdef DEBUG
126124 av_log(s, AV_LOG_DEBUG, "VIDEOHDR\n");
127125 dstruct(s, vhdr, lpData, "p");
128126 dstruct(s, vhdr, dwBufferLength, "lu");
libavformat/ape.c+1−3
@@ -26,8 +26,6 @@ · 25 unmodified lines
2626 #include "avformat.h"
2727 #include "apetag.h"
2828
29−#define ENABLE_DEBUG 0
30−
3129 /* The earliest and latest file formats supported by this library */
3230 #define APE_MIN_VERSION 3950
3331 #define APE_MAX_VERSION 3990
@@ -96,7 +94,7 @@ static int ape_probe(AVProbeData * p) · 62 unmodified lines
9694
9795 static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
9896 {
99−#if ENABLE_DEBUG
97+#ifdef DEBUG
10098 int i;
10199
102100 av_log(s, AV_LOG_DEBUG, "Descriptor Block:\n\n");
libavformat/apetag.c+0−2
@@ -24,8 +24,6 @@ · 23 unmodified lines
2424 #include "avformat.h"
2525 #include "apetag.h"
2626
27−#define ENABLE_DEBUG 0
28−
2927 #define APE_TAG_VERSION 2000
3028 #define APE_TAG_FOOTER_BYTES 32
3129 #define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
libavformat/rtsp.c+0−3
@@ -45,7 +45,6 @@ · 44 unmodified lines
4545 #include "url.h"
4646
4747 //#define DEBUG
48−//#define DEBUG_RTP_TCP
4948
5049 /* Timeout values for socket poll, in ms,
5150 * and read_packet(), in seconds */
@@ -860,9 +859,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, · 808 unmodified lines
860859 q = buf;
861860 for (;;) {
862861 ret = ffurl_read_complete(rt->rtsp_hd, &ch, 1);
863−#ifdef DEBUG_RTP_TCP
864862 av_dlog(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
865−#endif
866863 if (ret != 1)
867864 return AVERROR_EOF;
868865 if (ch == '\n')

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t