[cvs] / xvidcore / src / portab.h Repository:
ViewVC logotype

Diff of /xvidcore/src/portab.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.46.2.9, Wed Oct 1 23:23:00 2003 UTC revision 1.48, Fri Mar 28 07:28:23 2003 UTC
# Line 4  Line 4 
4   *  - Portable macros, types and inlined assembly -   *  - Portable macros, types and inlined assembly -
5   *   *
6   *  Copyright(C) 2002      Michael Militzer <isibaar@xvid.org>   *  Copyright(C) 2002      Michael Militzer <isibaar@xvid.org>
7   *               2002-2003 Peter Ross <pross@xvid.org>   *               2002 Peter Ross <pross@xvid.org>
8   *               2002-2003 Edouard Gomez <ed.gomez@free.fr>   *               2002 Edouard Gomez <ed.gomez@free.fr>
9   *   *
10   *  This program is free software ; you can redistribute it and/or modify   *  This file is part of XviD, a free MPEG-4 video encoder/decoder
11   *  it under the terms of the GNU General Public License as published by   *
12     *  XviD is free software; you can redistribute it and/or modify it
13     *  under the terms of the GNU General Public License as published by
14   *  the Free Software Foundation ; either version 2 of the License, or   *  the Free Software Foundation ; either version 2 of the License, or
15   *  (at your option) any later version.   *  (at your option) any later version.
16   *   *
# Line 32  Line 34 
34   *  Common things   *  Common things
35   ****************************************************************************/   ****************************************************************************/
36    
37    /* Debug level masks */
38    #define DPRINTF_ERROR       0x00000001
39    #define DPRINTF_STARTCODE   0x00000002
40    #define DPRINTF_HEADER      0x00000004
41    #define DPRINTF_TIMECODE    0x00000008
42    #define DPRINTF_MB          0x00000010
43    #define DPRINTF_COEFF       0x00000020
44    #define DPRINTF_MV          0x00000040
45    #define DPRINTF_RC          0x00000080
46    #define DPRINTF_DEBUG       0x80000000
47    
48    /* debug level for this library */
49    #ifdef _DEBUG
50    #define DPRINTF_LEVEL       0x000000ff
51    #else
52    #define DPRINTF_LEVEL       0
53    #endif
54    
55  /* Buffer size for msvc implementation because it outputs to DebugOutput */  /* Buffer size for msvc implementation because it outputs to DebugOutput */
 #if defined(_DEBUG)  
 extern unsigned int xvid_debug;  
56  #define DPRINTF_BUF_SZ  1024  #define DPRINTF_BUF_SZ  1024
 #endif  
57    
58  /*****************************************************************************  /*****************************************************************************
59   *  Types used in XviD sources   *  Types used in XviD sources
# Line 124  Line 141 
141  #   ifdef _DEBUG  #   ifdef _DEBUG
142      static __inline void DPRINTF(int level, char *fmt, ...)      static __inline void DPRINTF(int level, char *fmt, ...)
143      {      {
144          if (xvid_debug & level) {          if (DPRINTF_LEVEL & level) {
145              va_list args;              va_list args;
146              char buf[DPRINTF_BUF_SZ];              char buf[DPRINTF_BUF_SZ];
147              va_start(args, fmt);              va_start(args, fmt);
148              vsprintf(buf, fmt, args);              vsprintf(buf, fmt, args);
149              OutputDebugString(buf);              OutputDebugString(buf);
150              fprintf(stderr, "%s", buf);              fprintf(stderr, "%s\n", buf);
151           }           }
152       }       }
153  #    else  #    else
# Line 215  Line 232 
232          {          {
233              va_list args;              va_list args;
234              va_start(args, format);              va_start(args, format);
235              if(xvid_debug & level) {              if(DPRINTF_LEVEL & level) {
236                     vfprintf(stderr, format, args);                     vfprintf(stderr, format, args);
237                       fprintf(stderr, "\n");
238              }              }
239          }          }
240    
# Line 327  Line 345 
345  #    ifdef _DEBUG  #    ifdef _DEBUG
346       static __inline void DPRINTF(int level, char *fmt, ...)       static __inline void DPRINTF(int level, char *fmt, ...)
347       {       {
348           if (xvid_debug & level) {           if (DPRINTF_LEVEL & level) {
349               va_list args;               va_list args;
350               char buf[DPRINTF_BUF_SZ];               char buf[DPRINTF_BUF_SZ];
351               va_start(args, fmt);               va_start(args, fmt);
352               vsprintf(buf, fmt, args);               vsprintf(buf, fmt, args);
353               fprintf(stderr, "%s", buf);               fprintf(stderr, "%s\n", buf);
354           }           }
355       }       }
356  #    else /* _DEBUG */  #    else /* _DEBUG */
# Line 407  Line 425 
425          {          {
426              va_list args;              va_list args;
427              va_start(args, format);              va_start(args, format);
428              if(xvid_debug & level) {              if(DPRINTF_LEVEL & level) {
429                     vfprintf(stderr, format, args);                     vfprintf(stderr, format, args);
430                       fprintf(stderr, "\n");
431              }              }
432          }          }
433    

Legend:
Removed from v.1.46.2.9  
changed lines
  Added in v.1.48

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4