[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.44, Sun Feb 16 01:41:24 2003 UTC revision 1.45, Sun Feb 16 05:11:39 2003 UTC
# Line 139  Line 139 
139           }           }
140       }       }
141  #    else  #    else
142       static __inline void DPRINTF(int level, char *fmt, ...)           static __inline void DPRINTF(int level, char *fmt, ...) {}
      {  
      }  
143  #    endif  #    endif
144    
145  #    if _MSC_VER <= 1200  #    if _MSC_VER <= 1200
# Line 160  Line 158 
158  #    if defined(ARCH_IS_IA32)  #    if defined(ARCH_IS_IA32)
159  #        define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax  #        define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax
160    
 #        ifdef _PROFILING_  
161               static __inline int64_t read_counter(void)               static __inline int64_t read_counter(void)
162               {               {
163                   int64_t ts;                   int64_t ts;
# Line 173  Line 170 
170                   ts = ((uint64_t) ts2 << 32) | ((uint64_t) ts1);                   ts = ((uint64_t) ts2 << 32) | ((uint64_t) ts1);
171                   return ts;                   return ts;
172               }               }
 #        endif  
173    
174  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
175   | msvc GENERIC (plain C only) - Probably alpha or some embedded device   | msvc GENERIC (plain C only) - Probably alpha or some embedded device
# Line 183  Line 179 
179                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
180                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
181    
 #        ifdef _PROFILING_  
182  #            include <time.h>  #            include <time.h>
183               static __inline int64_t read_counter(void)               static __inline int64_t read_counter(void)
184               {               {
185                   return (int64_t)clock();                   return (int64_t)clock();
186               }               }
 #        endif  
187    
188  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
189   | msvc Not given architecture - This is probably an user who tries to build   | msvc Not given architecture - This is probably an user who tries to build
# Line 247  Line 241 
241  #    if defined(ARCH_IS_IA32)  #    if defined(ARCH_IS_IA32)
242  #        define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) );  #        define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) );
243    
 #        ifdef _PROFILING_  
244               static __inline int64_t read_counter(void)               static __inline int64_t read_counter(void)
245               {               {
246                   int64_t ts;                   int64_t ts;
# Line 256  Line 249 
249                   ts = ((uint64_t) ts2 << 32) | ((uint64_t) ts1);                   ts = ((uint64_t) ts2 << 32) | ((uint64_t) ts1);
250                   return ts;                   return ts;
251               }               }
 #        endif  
252    
253  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
254   | gcc PPC and PPC Altivec specific macros/functions   | gcc PPC and PPC Altivec specific macros/functions
# Line 265  Line 257 
257  #        define BSWAP(a) __asm__ __volatile__ \  #        define BSWAP(a) __asm__ __volatile__ \
258                  ( "lwbrx %0,0,%1; eieio" : "=r" (a) : "r" (&(a)), "m" (a));                  ( "lwbrx %0,0,%1; eieio" : "=r" (a) : "r" (&(a)), "m" (a));
259    
 #        ifdef _PROFILING_  
260               static __inline unsigned long get_tbl(void)               static __inline unsigned long get_tbl(void)
261               {               {
262                   unsigned long tbl;                   unsigned long tbl;
# Line 289  Line 280 
280                   }while (tb != get_tbl());                   }while (tb != get_tbl());
281                   return (((int64_t) tu) << 32) | (int64_t) tb;                   return (((int64_t) tu) << 32) | (int64_t) tb;
282               }               }
 #        endif  
283    
284  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
285   | gcc IA64 specific macros/functions   | gcc IA64 specific macros/functions
# Line 299  Line 289 
289                  ("mux1 %1 = %0, @rev" ";;" \                  ("mux1 %1 = %0, @rev" ";;" \
290                   "shr.u %1 = %1, 32" : "=r" (a) : "r" (a));                   "shr.u %1 = %1, 32" : "=r" (a) : "r" (a));
291    
 #        ifdef _PROFILING_  
292               static __inline int64_t read_counter(void)               static __inline int64_t read_counter(void)
293               {               {
294                   unsigned long result;                   unsigned long result;
295                   __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");                   __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");
296                   return result;                   return result;
297               }               }
 #        endif  
298    
299  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
300   | gcc GENERIC (plain C only) specific macros/functions   | gcc GENERIC (plain C only) specific macros/functions
# Line 316  Line 304 
304                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \                  ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
305                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))                         (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
306    
 #        ifdef _PROFILING_  
307  #            include <time.h>  #            include <time.h>
308               static __inline int64_t read_counter(void)               static __inline int64_t read_counter(void)
309               {               {
310                   return (int64_t)clock();                   return (int64_t)clock();
311               }               }
 #        endif  
312    
313  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
314   | gcc Not given architecture - This is probably an user who tries to build   | gcc Not given architecture - This is probably an user who tries to build
# Line 370  Line 356 
356    
357  #        define BSWAP(a)  __asm mov eax,a __asm bswap eax __asm mov a, eax  #        define BSWAP(a)  __asm mov eax,a __asm bswap eax __asm mov a, eax
358    
 #        ifdef _PROFILING_  
359           static __inline int64_t read_counter(void)           static __inline int64_t read_counter(void)
360           {           {
361               uint64_t ts;               uint64_t ts;
# Line 383  Line 368 
368               ts = ((uint64_t) ts2 << 32) | ((uint64_t) ts1);               ts = ((uint64_t) ts2 << 32) | ((uint64_t) ts1);
369               return ts;               return ts;
370           }           }
 #        endif  
371    
372  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
373   | watcom GENERIC (plain C only) specific macros/functions.   | watcom GENERIC (plain C only) specific macros/functions.
# Line 396  Line 380 
380                                  (((x) & 0x0000ff00) <<  8) | \                                  (((x) & 0x0000ff00) <<  8) | \
381                                  (((x) & 0x000000ff) << 24))                                  (((x) & 0x000000ff) << 24))
382    
 #        ifdef _PROFILING_  
383           static int64_t read_counter() { return 0; }           static int64_t read_counter() { return 0; }
 #        endif  
384    
385  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
386   | watcom Not given architecture - This is probably an user who tries to build   | watcom Not given architecture - This is probably an user who tries to build
# Line 445  Line 427 
427              ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \              ((a) = (((a) & 0xff) << 24)  | (((a) & 0xff00) << 8) | \
428                     (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))                     (((a) >> 8) & 0xff00) | (((a) >> 24) & 0xff))
429    
 #    ifdef _PROFILING_  
430  #       include <time.h>  #       include <time.h>
431          static __inline int64_t read_counter(void)          static __inline int64_t read_counter(void)
432          {          {
433              return (int64_t)clock();              return (int64_t)clock();
434          }          }
 #    endif  
435    
436  #        define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \  #        define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \
437                  type name[(sizex)*(sizey)]                  type name[(sizex)*(sizey)]

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

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