prettyprinting cosmetics

Originally committed as revision 11941 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Diego Biurrun 17 years ago
parent ad40b15394
commit 27af15dc5c
  1. 18
      libavutil/bswap.h
  2. 13
      libavutil/common.h

@ -61,31 +61,29 @@ static av_always_inline uint32_t bswap_32(uint32_t x)
"=r" (x) : "=r" (x) :
#else #else
__asm("xchgb %b0,%h0\n" __asm("xchgb %b0,%h0\n"
" rorl $16,%0\n" "rorl $16,%0 \n"
" xchgb %b0,%h0": "xchgb %b0,%h0":
LEGACY_REGS (x) : LEGACY_REGS (x) :
#endif #endif
"0" (x)); "0" (x));
#elif defined(ARCH_SH4) #elif defined(ARCH_SH4)
__asm__( __asm__("swap.b %0,%0\n"
"swap.b %0,%0\n"
"swap.w %0,%0\n" "swap.w %0,%0\n"
"swap.b %0,%0\n" "swap.b %0,%0\n"
:"=r"(x):"0"(x)); :"=r"(x):"0"(x));
#elif defined(ARCH_ARM) #elif defined(ARCH_ARM)
uint32_t t; uint32_t t;
__asm__ ( __asm__ ("eor %1, %0, %0, ror #16 \n\t"
"eor %1, %0, %0, ror #16 \n\t"
"bic %1, %1, #0xFF0000 \n\t" "bic %1, %1, #0xFF0000 \n\t"
"mov %0, %0, ror #8 \n\t" "mov %0, %0, ror #8 \n\t"
"eor %0, %0, %1, lsr #8 \n\t" "eor %0, %0, %1, lsr #8 \n\t"
: "+r"(x), "+r"(t)); : "+r"(x), "+r"(t));
#elif defined(ARCH_BFIN) #elif defined(ARCH_BFIN)
unsigned tmp; unsigned tmp;
asm("%1 = %0 >> 8 (V);\n\t" asm("%1 = %0 >> 8 (V); \n\t"
"%0 = %0 << 8 (V);\n\t" "%0 = %0 << 8 (V); \n\t"
"%0 = %0 | %1;\n\t" "%0 = %0 | %1; \n\t"
"%0 = PACK(%0.L, %0.H);\n\t" "%0 = PACK(%0.L, %0.H); \n\t"
: "+d"(x), "=&d"(tmp)); : "+d"(x), "=&d"(tmp));
#else #else
x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF); x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);

@ -286,18 +286,16 @@ static inline int ff_get_fourcc(const char *s){
static inline uint64_t read_time(void) static inline uint64_t read_time(void)
{ {
uint64_t a, d; uint64_t a, d;
asm volatile( "rdtsc\n\t" asm volatile("rdtsc\n\t"
: "=a" (a), "=d" (d) : "=a" (a), "=d" (d));
);
return (d << 32) | (a & 0xffffffff); return (d << 32) | (a & 0xffffffff);
} }
#elif defined(ARCH_X86_32) #elif defined(ARCH_X86_32)
static inline long long read_time(void) static inline long long read_time(void)
{ {
long long l; long long l;
asm volatile( "rdtsc\n\t" asm volatile("rdtsc\n\t"
: "=A" (l) : "=A" (l));
);
return l; return l;
} }
#elif ARCH_BFIN #elif ARCH_BFIN
@ -354,7 +352,8 @@ tend= AV_READ_TIME();\
}else\ }else\
tskip_count++;\ tskip_count++;\
if(((tcount+tskip_count)&(tcount+tskip_count-1))==0){\ if(((tcount+tskip_count)&(tcount+tskip_count-1))==0){\
av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\ av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n",\
tsum*10/tcount, id, tcount, tskip_count);\
}\ }\
} }
#else #else

Loading…
Cancel
Save