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
1760 }1760 }
1761 }1761 }
1762 1762
1763#ifdef DEBUG_WMP1763#ifdef DEBUG
1764 http_log("\nGot request:\n%s\n", c->buffer);1764 http_log("\nGot request:\n%s\n", c->buffer);
1765#endif1765#endif
1766 1766
@@ -1790,7 +1790,7 @@ static int http_parse_request(HTTPContext *c) · 23 unmodified lines
1790 return 0;1790 return 0;
1791 }1791 }
1792 1792
1793#ifdef DEBUG_WMP1793#ifdef DEBUG
1794 if (strcmp(stream->filename + strlen(stream->filename) - 4, ".asf") == 0)1794 if (strcmp(stream->filename + strlen(stream->filename) - 4, ".asf") == 0)
1795 http_log("\nGot request:\n%s\n", c->buffer);1795 http_log("\nGot request:\n%s\n", c->buffer);
1796#endif1796#endif
libavcodec/cook.c+2−3
@@ -66,7 +66,6 @@ · 65 unmodified lines
66 66
67#define SUBBAND_SIZE 2067#define SUBBAND_SIZE 20
68#define MAX_SUBPACKETS 568#define MAX_SUBPACKETS 5
69//#define COOKDEBUG
70 69
71typedef struct {70typedef struct {
72 int *now;71 int *now;
@@ -1005,7 +1004,7 @@ static int cook_decode_frame(AVCodecContext *avctx, · 932 unmodified lines
1005 return avctx->block_align;1004 return avctx->block_align;
1006}1005}
1007 1006
1008#ifdef COOKDEBUG1007#ifdef DEBUG
1009static void dump_cook_context(COOKContext *q)1008static void dump_cook_context(COOKContext *q)
1010{1009{
1011 //int i=0;1010 //int i=0;
@@ -1247,7 +1246,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 235 unmodified lines
1247 else1246 else
1248 avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;1247 avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
1249 1248
1250#ifdef COOKDEBUG1249#ifdef DEBUG
1251 dump_cook_context(q);1250 dump_cook_context(q);
1252#endif1251#endif
1253 return 0;1252 return 0;
libavcodec/indeo5.c+1−1
@@ -629,7 +629,7 @@ static int decode_band(IVI5DecContext *ctx, int plane_num, · 628 unmodified lines
629 FFSWAP(int16_t, band->rv_map->valtab[idx1], band->rv_map->valtab[idx2]);629 FFSWAP(int16_t, band->rv_map->valtab[idx1], band->rv_map->valtab[idx2]);
630 }630 }
631 631
632#if IVI_DEBUG632#ifdef DEBUG
633 if (band->checksum_present) {633 if (band->checksum_present) {
634 uint16_t chksum = ivi_calc_band_checksum(band);634 uint16_t chksum = ivi_calc_band_checksum(band);
635 if (chksum != band->checksum) {635 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
563}563}
564 564
565 565
566#if IVI_DEBUG566#ifdef DEBUG
567uint16_t ivi_calc_band_checksum (IVIBandDesc *band)567uint16_t ivi_calc_band_checksum (IVIBandDesc *band)
568{568{
569 int x, y;569 int x, y;
libavcodec/ivi_common.h+0−2
@@ -33,8 +33,6 @@ · 32 unmodified lines
33#include "get_bits.h"33#include "get_bits.h"
34#include <stdint.h>34#include <stdint.h>
35 35
36#define IVI_DEBUG 0
37
38#define IVI_VLC_BITS 13 ///< max number of bits of the ivi's huffman codes36#define IVI_VLC_BITS 13 ///< max number of bits of the ivi's huffman codes
39 37
40/**38/**
libavcodec/svq1dec.c+0−3
@@ -33,7 +33,6 @@ · 32 unmodified lines
33 */33 */
34 34
35 35
36//#define DEBUG_SVQ1
37#include "avcodec.h"36#include "avcodec.h"
38#include "dsputil.h"37#include "dsputil.h"
39#include "mpegvideo.h"38#include "mpegvideo.h"
@@ -705,9 +704,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, · 665 unmodified lines
705 result = svq1_decode_block_intra (&s->gb, &current[x], linesize);704 result = svq1_decode_block_intra (&s->gb, &current[x], linesize);
706 if (result != 0)705 if (result != 0)
707 {706 {
708//#ifdef DEBUG_SVQ1
709 av_log(s->avctx, AV_LOG_INFO, "Error in svq1_decode_block %i (keyframe)\n",result);707 av_log(s->avctx, AV_LOG_INFO, "Error in svq1_decode_block %i (keyframe)\n",result);
710//#endif
711 goto err;708 goto err;
712 }709 }
713 }710 }
libavcodec/vorbis.c+3−6
@@ -20,9 +20,6 @@ · 19 unmodified lines
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */21 */
22 22
23#undef V_DEBUG
24//#define V_DEBUG
25
26#define ALT_BITSTREAM_READER_LE23#define ALT_BITSTREAM_READER_LE
27#include "avcodec.h"24#include "avcodec.h"
28#include "get_bits.h"25#include "get_bits.h"
@@ -57,7 +54,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) · 28 unmodified lines
57 54
58 unsigned i, j, p, code;55 unsigned i, j, p, code;
59 56
60#ifdef V_DEBUG57#ifdef DEBUG
61 GetBitContext gb;58 GetBitContext gb;
62#endif59#endif
63 60
@@ -74,7 +71,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num) · 10 unmodified lines
74 for (i = 0; i < bits[p]; ++i)71 for (i = 0; i < bits[p]; ++i)
75 exit_at_level[i+1] = 1 << i;72 exit_at_level[i+1] = 1 << i;
76 73
77#ifdef V_DEBUG74#ifdef DEBUG
78 av_log(NULL, AV_LOG_INFO, " %u. of %u code len %d code %d - ", p, num, bits[p], codes[p]);75 av_log(NULL, AV_LOG_INFO, " %u. of %u code len %d code %d - ", p, num, bits[p], codes[p]);
79 init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);76 init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);
80 for (i = 0; i < bits[p]; ++i)77 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
102 exit_at_level[j] = code + (1 << (j - 1));99 exit_at_level[j] = code + (1 << (j - 1));
103 codes[p] = code;100 codes[p] = code;
104 101
105#ifdef V_DEBUG102#ifdef DEBUG
106 av_log(NULL, AV_LOG_INFO, " %d. code len %d code %d - ", p, bits[p], codes[p]);103 av_log(NULL, AV_LOG_INFO, " %d. code len %d code %d - ", p, bits[p], codes[p]);
107 init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);104 init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);
108 for (i = 0; i < bits[p]; ++i)105 for (i = 0; i < bits[p]; ++i)
libavdevice/dv1394.c+0−3
@@ -33,9 +33,6 @@ · 32 unmodified lines
33#include "libavutil/log.h"33#include "libavutil/log.h"
34#include "libavutil/opt.h"34#include "libavutil/opt.h"
35#include "libavformat/avformat.h"35#include "libavformat/avformat.h"
36
37#undef DV1394_DEBUG
38
39#include "libavformat/dv.h"36#include "libavformat/dv.h"
40#include "dv1394.h"37#include "dv1394.h"
41 38
libavdevice/vfwcap.c+1−3
@@ -26,8 +26,6 @@ · 25 unmodified lines
26#include <windows.h>26#include <windows.h>
27#include <vfw.h>27#include <vfw.h>
28 28
29//#define DEBUG_VFW
30
31/* Defines for VFW missing from MinGW.29/* Defines for VFW missing from MinGW.
32 * Remove this when MinGW incorporates them. */30 * Remove this when MinGW incorporates them. */
33#define HWND_MESSAGE ((HWND)-3)31#define HWND_MESSAGE ((HWND)-3)
@@ -122,7 +120,7 @@ static void dump_captureparms(AVFormatContext *s, CAPTUREPARMS *cparms) · 88 unmodified lines
122 120
123static void dump_videohdr(AVFormatContext *s, VIDEOHDR *vhdr)121static void dump_videohdr(AVFormatContext *s, VIDEOHDR *vhdr)
124{122{
125#ifdef DEBUG_VFW123#ifdef DEBUG
126 av_log(s, AV_LOG_DEBUG, "VIDEOHDR\n");124 av_log(s, AV_LOG_DEBUG, "VIDEOHDR\n");
127 dstruct(s, vhdr, lpData, "p");125 dstruct(s, vhdr, lpData, "p");
128 dstruct(s, vhdr, dwBufferLength, "lu");126 dstruct(s, vhdr, dwBufferLength, "lu");
libavformat/ape.c+1−3
@@ -26,8 +26,6 @@ · 25 unmodified lines
26#include "avformat.h"26#include "avformat.h"
27#include "apetag.h"27#include "apetag.h"
28 28
29#define ENABLE_DEBUG 0
30
31/* The earliest and latest file formats supported by this library */29/* The earliest and latest file formats supported by this library */
32#define APE_MIN_VERSION 395030#define APE_MIN_VERSION 3950
33#define APE_MAX_VERSION 399031#define APE_MAX_VERSION 3990
@@ -96,7 +94,7 @@ static int ape_probe(AVProbeData * p) · 62 unmodified lines
96 94
97static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)95static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
98{96{
99#if ENABLE_DEBUG97#ifdef DEBUG
100 int i;98 int i;
101 99
102 av_log(s, AV_LOG_DEBUG, "Descriptor Block:\n\n");100 av_log(s, AV_LOG_DEBUG, "Descriptor Block:\n\n");
libavformat/apetag.c+0−2
@@ -24,8 +24,6 @@ · 23 unmodified lines
24#include "avformat.h"24#include "avformat.h"
25#include "apetag.h"25#include "apetag.h"
26 26
27#define ENABLE_DEBUG 0
28
29#define APE_TAG_VERSION 200027#define APE_TAG_VERSION 2000
30#define APE_TAG_FOOTER_BYTES 3228#define APE_TAG_FOOTER_BYTES 32
31#define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)29#define APE_TAG_FLAG_CONTAINS_HEADER (1 << 31)
libavformat/rtsp.c+0−3
@@ -45,7 +45,6 @@ · 44 unmodified lines
45#include "url.h"45#include "url.h"
46 46
47//#define DEBUG47//#define DEBUG
48//#define DEBUG_RTP_TCP
49 48
50/* Timeout values for socket poll, in ms,49/* Timeout values for socket poll, in ms,
51 * and read_packet(), in seconds */50 * and read_packet(), in seconds */
@@ -860,9 +859,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, · 808 unmodified lines
860 q = buf;859 q = buf;
861 for (;;) {860 for (;;) {
862 ret = ffurl_read_complete(rt->rtsp_hd, &ch, 1);861 ret = ffurl_read_complete(rt->rtsp_hd, &ch, 1);
863#ifdef DEBUG_RTP_TCP
864 av_dlog(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);862 av_dlog(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
865#endif
866 if (ret != 1)863 if (ret != 1)
867 return AVERROR_EOF;864 return AVERROR_EOF;
868 if (ch == '\n')865 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