Mercurial > mplayer.hg
comparison postproc/rgb2rgb_template.c @ 9987:988c2ffc5bc1
remove remaining cpudetect dependancy
author | michael |
---|---|
date | Fri, 25 Apr 2003 17:16:55 +0000 |
parents | 50ef22bcc0c3 |
children | a32fb6812221 |
comparison
equal
deleted
inserted
replaced
9986:4bdd248d372e | 9987:988c2ffc5bc1 |
---|---|
237 if(s < end) | 237 if(s < end) |
238 { | 238 { |
239 register unsigned short x= *((uint16_t *)s); | 239 register unsigned short x= *((uint16_t *)s); |
240 *((uint16_t *)d) = (x&0x7FFF) + (x&0x7FE0); | 240 *((uint16_t *)d) = (x&0x7FFF) + (x&0x7FE0); |
241 } | 241 } |
242 } | |
243 | |
244 static inline void RENAME(bgr24torgb24)(const uint8_t *src, uint8_t *dst, unsigned src_size) | |
245 { | |
246 unsigned j,i,num_pixels=src_size/3; | |
247 for(i=0,j=0; j<num_pixels; i+=3,j+=3) | |
248 { | |
249 dst[j+0] = src[i+2]; | |
250 dst[j+1] = src[i+1]; | |
251 dst[j+2] = src[i+0]; | |
252 } | |
253 } | 242 } |
254 | 243 |
255 static inline void RENAME(rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned src_size) | 244 static inline void RENAME(rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned src_size) |
256 { | 245 { |
257 register const uint8_t* s=src; | 246 register const uint8_t* s=src; |