Mercurial > mplayer.hg
comparison libswscale/rgb2rgb_template.c @ 26909:b7eeb3590bc9
remove useless casts
author | bcoudurier |
---|---|
date | Sun, 01 Jun 2008 03:17:42 +0000 |
parents | ba2efd11abf9 |
children | da8e02081774 |
comparison
equal
deleted
inserted
replaced
26908:13061a6174b6 | 26909:b7eeb3590bc9 |
---|---|
323 asm volatile(EMMS:::"memory"); | 323 asm volatile(EMMS:::"memory"); |
324 #endif | 324 #endif |
325 mm_end = end - 3; | 325 mm_end = end - 3; |
326 while (s < mm_end) | 326 while (s < mm_end) |
327 { | 327 { |
328 register uint32_t x= *((uint32_t *)s); | 328 register uint32_t x= *s; |
329 *((uint32_t *)d) = ((x>>1)&0x7FE07FE0) | (x&0x001F001F); | 329 *((uint32_t *)d) = ((x>>1)&0x7FE07FE0) | (x&0x001F001F); |
330 s+=4; | 330 s+=4; |
331 d+=4; | 331 d+=4; |
332 } | 332 } |
333 if (s < end) | 333 if (s < end) |
334 { | 334 { |
335 register uint16_t x= *((uint16_t *)s); | 335 register uint16_t x= *s; |
336 *((uint16_t *)d) = ((x>>1)&0x7FE0) | (x&0x001F); | 336 *((uint16_t *)d) = ((x>>1)&0x7FE0) | (x&0x001F); |
337 s+=2; | 337 s+=2; |
338 d+=2; | 338 d+=2; |
339 } | 339 } |
340 } | 340 } |
934 { | 934 { |
935 const uint16_t *end; | 935 const uint16_t *end; |
936 #ifdef HAVE_MMX | 936 #ifdef HAVE_MMX |
937 const uint16_t *mm_end; | 937 const uint16_t *mm_end; |
938 #endif | 938 #endif |
939 uint8_t *d = (uint8_t *)dst; | 939 uint8_t *d = dst; |
940 const uint16_t *s = (uint16_t *)src; | 940 const uint16_t *s = (uint16_t *)src; |
941 end = s + src_size/2; | 941 end = s + src_size/2; |
942 #ifdef HAVE_MMX | 942 #ifdef HAVE_MMX |
943 asm volatile(PREFETCH" %0"::"m"(*s):"memory"); | 943 asm volatile(PREFETCH" %0"::"m"(*s):"memory"); |
944 mm_end = end - 7; | 944 mm_end = end - 7; |
1217 { | 1217 { |
1218 const uint16_t *end; | 1218 const uint16_t *end; |
1219 #ifdef HAVE_MMX | 1219 #ifdef HAVE_MMX |
1220 const uint16_t *mm_end; | 1220 const uint16_t *mm_end; |
1221 #endif | 1221 #endif |
1222 uint8_t *d = (uint8_t *)dst; | 1222 uint8_t *d = dst; |
1223 const uint16_t *s = (const uint16_t *)src; | 1223 const uint16_t *s = (const uint16_t *)src; |
1224 end = s + src_size/2; | 1224 end = s + src_size/2; |
1225 #ifdef HAVE_MMX | 1225 #ifdef HAVE_MMX |
1226 asm volatile(PREFETCH" %0"::"m"(*s):"memory"); | 1226 asm volatile(PREFETCH" %0"::"m"(*s):"memory"); |
1227 asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory"); | 1227 asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory"); |
1295 { | 1295 { |
1296 const uint16_t *end; | 1296 const uint16_t *end; |
1297 #ifdef HAVE_MMX | 1297 #ifdef HAVE_MMX |
1298 const uint16_t *mm_end; | 1298 const uint16_t *mm_end; |
1299 #endif | 1299 #endif |
1300 uint8_t *d = (uint8_t *)dst; | 1300 uint8_t *d = dst; |
1301 const uint16_t *s = (uint16_t *)src; | 1301 const uint16_t *s = (uint16_t *)src; |
1302 end = s + src_size/2; | 1302 end = s + src_size/2; |
1303 #ifdef HAVE_MMX | 1303 #ifdef HAVE_MMX |
1304 asm volatile(PREFETCH" %0"::"m"(*s):"memory"); | 1304 asm volatile(PREFETCH" %0"::"m"(*s):"memory"); |
1305 asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory"); | 1305 asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory"); |
1364 } | 1364 } |
1365 | 1365 |
1366 static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size) | 1366 static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size) |
1367 { | 1367 { |
1368 long idx = 15 - src_size; | 1368 long idx = 15 - src_size; |
1369 uint8_t *s = (uint8_t *) src-idx, *d = dst-idx; | 1369 uint8_t *s = src-idx, *d = dst-idx; |
1370 #ifdef HAVE_MMX | 1370 #ifdef HAVE_MMX |
1371 asm volatile( | 1371 asm volatile( |
1372 "test %0, %0 \n\t" | 1372 "test %0, %0 \n\t" |
1373 "jns 2f \n\t" | 1373 "jns 2f \n\t" |
1374 PREFETCH" (%1, %0) \n\t" | 1374 PREFETCH" (%1, %0) \n\t" |