Mercurial > mplayer.hg
comparison postproc/rgb2rgb_template.c @ 7891:4d6369c408b5
fixing RGB32->RGB16 on big endian patch by (Colin Leroy <colin at colino dot net>)
author | michael |
---|---|
date | Wed, 23 Oct 2002 23:52:57 +0000 |
parents | 0684cad9b204 |
children | 93e8d1655797 |
comparison
equal
deleted
inserted
replaced
7890:d35f7bafc007 | 7891:4d6369c408b5 |
---|---|
362 __asm __volatile(SFENCE:::"memory"); | 362 __asm __volatile(SFENCE:::"memory"); |
363 __asm __volatile(EMMS:::"memory"); | 363 __asm __volatile(EMMS:::"memory"); |
364 #endif | 364 #endif |
365 while(s < end) | 365 while(s < end) |
366 { | 366 { |
367 #ifndef WORDS_BIGENDIAN | |
367 const int b= *s++; | 368 const int b= *s++; |
368 const int g= *s++; | 369 const int g= *s++; |
369 const int r= *s++; | 370 const int r= *s++; |
371 #else | |
372 const int a= *s++; /*skip*/ | |
373 const int r= *s++; | |
374 const int g= *s++; | |
375 const int b= *s++; | |
376 #endif | |
370 *d++ = (b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8); | 377 *d++ = (b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8); |
378 #ifndef WORDS_BIGENDIAN | |
371 s++; | 379 s++; |
380 #endif | |
372 } | 381 } |
373 } | 382 } |
374 | 383 |
375 static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned int src_size) | 384 static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
376 { | 385 { |