Commit aefeda1a authored by rfelker's avatar rfelker

this isn't actually stupid, but it's not valid C and gcc 3.5 rejects it as such


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@12386 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 00addb64
...@@ -388,7 +388,7 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned ...@@ -388,7 +388,7 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned
#endif #endif
while(s < end) while(s < end)
{ {
const int src= *((uint32_t*)s)++; const int src= *s; s += 4;
*d++ = ((src&0xFF)>>3) + ((src&0xFC00)>>5) + ((src&0xF80000)>>8); *d++ = ((src&0xFF)>>3) + ((src&0xFC00)>>5) + ((src&0xF80000)>>8);
// *d++ = ((src>>3)&0x1F) + ((src>>5)&0x7E0) + ((src>>8)&0xF800); // *d++ = ((src>>3)&0x1F) + ((src>>5)&0x7E0) + ((src>>8)&0xF800);
} }
...@@ -450,7 +450,7 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsign ...@@ -450,7 +450,7 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsign
#endif #endif
while(s < end) while(s < end)
{ {
const int src= *((uint32_t*)s)++; const int src= *s; s += 4;
*d++ = ((src&0xF8)<<8) + ((src&0xFC00)>>5) + ((src&0xF80000)>>19); *d++ = ((src&0xF8)<<8) + ((src&0xFC00)>>5) + ((src&0xF80000)>>19);
} }
} }
...@@ -546,7 +546,7 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned ...@@ -546,7 +546,7 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned
#endif #endif
while(s < end) while(s < end)
{ {
const int src= *((uint32_t*)s)++; const int src= *s; s += 4;
*d++ = ((src&0xFF)>>3) + ((src&0xF800)>>6) + ((src&0xF80000)>>9); *d++ = ((src&0xFF)>>3) + ((src&0xF800)>>6) + ((src&0xF80000)>>9);
} }
} }
...@@ -607,7 +607,7 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsign ...@@ -607,7 +607,7 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsign
#endif #endif
while(s < end) while(s < end)
{ {
const int src= *((uint32_t*)s)++; const int src= *s; s += 4;
*d++ = ((src&0xF8)<<7) + ((src&0xF800)>>6) + ((src&0xF80000)>>19); *d++ = ((src&0xF8)<<7) + ((src&0xF800)>>6) + ((src&0xF80000)>>19);
} }
} }
......
...@@ -356,7 +356,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt ...@@ -356,7 +356,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt
((uint8_t*)dest)[3]= r[Y2];\ ((uint8_t*)dest)[3]= r[Y2];\
((uint8_t*)dest)[4]= g[Y2];\ ((uint8_t*)dest)[4]= g[Y2];\
((uint8_t*)dest)[5]= b[Y2];\ ((uint8_t*)dest)[5]= b[Y2];\
((uint8_t*)dest)+=6;\ dest+=6;\
}\ }\
break;\ break;\
case IMGFMT_BGR24:\ case IMGFMT_BGR24:\
...@@ -367,7 +367,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt ...@@ -367,7 +367,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt
((uint8_t*)dest)[3]= b[Y2];\ ((uint8_t*)dest)[3]= b[Y2];\
((uint8_t*)dest)[4]= g[Y2];\ ((uint8_t*)dest)[4]= g[Y2];\
((uint8_t*)dest)[5]= r[Y2];\ ((uint8_t*)dest)[5]= r[Y2];\
((uint8_t*)dest)+=6;\ dest+=6;\
}\ }\
break;\ break;\
case IMGFMT_RGB16:\ case IMGFMT_RGB16:\
...@@ -449,7 +449,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt ...@@ -449,7 +449,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt
acc+= acc + g[((buf0[i+6]*yalpha1+buf1[i+6]*yalpha)>>19) + d128[6]];\ acc+= acc + g[((buf0[i+6]*yalpha1+buf1[i+6]*yalpha)>>19) + d128[6]];\
acc+= acc + g[((buf0[i+7]*yalpha1+buf1[i+7]*yalpha)>>19) + d128[7]];\ acc+= acc + g[((buf0[i+7]*yalpha1+buf1[i+7]*yalpha)>>19) + d128[7]];\
((uint8_t*)dest)[0]= acc;\ ((uint8_t*)dest)[0]= acc;\
((uint8_t*)dest)++;\ dest++;\
}\ }\
\ \
/*\ /*\
...@@ -539,7 +539,7 @@ static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **l ...@@ -539,7 +539,7 @@ static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **l
((uint8_t*)dest)[3]= r[Y2]; ((uint8_t*)dest)[3]= r[Y2];
((uint8_t*)dest)[4]= g[Y2]; ((uint8_t*)dest)[4]= g[Y2];
((uint8_t*)dest)[5]= b[Y2]; ((uint8_t*)dest)[5]= b[Y2];
((uint8_t*)dest)+=6; dest+=6;
} }
break; break;
case IMGFMT_BGR24: case IMGFMT_BGR24:
...@@ -550,7 +550,7 @@ static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **l ...@@ -550,7 +550,7 @@ static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **l
((uint8_t*)dest)[3]= b[Y2]; ((uint8_t*)dest)[3]= b[Y2];
((uint8_t*)dest)[4]= g[Y2]; ((uint8_t*)dest)[4]= g[Y2];
((uint8_t*)dest)[5]= r[Y2]; ((uint8_t*)dest)[5]= r[Y2];
((uint8_t*)dest)+=6; dest+=6;
} }
break; break;
case IMGFMT_RGB16: case IMGFMT_RGB16:
...@@ -645,7 +645,7 @@ static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **l ...@@ -645,7 +645,7 @@ static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **l
acc+= acc + g[Y2+d128[(i+1)&7]]; acc+= acc + g[Y2+d128[(i+1)&7]];
if((i&7)==6){ if((i&7)==6){
((uint8_t*)dest)[0]= acc; ((uint8_t*)dest)[0]= acc;
((uint8_t*)dest)++; dest++;
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment