📄 rgb32torgb444.c
字号:
da_rgb = *(unsigned short *) (s);
}
else
{
register unsigned int sa_rgb;
sa_rgb = *(unsigned int *) (s);
da_rgb =((8 + 4 <8)? (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100-(1U<<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 -(1U <<(8 -4)))) >> ((8 -(8+4))&0x1F)): (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100-(1U<<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 -(1U <<(8 -4)))) << (((8+4)-8)&0x1F)))| ((4 + 4 < 8)? (((((8 + 8 <8) ? ((sa_rgb << ((8 - (8 + 8)) & 0x1F)) &(0x100 -(1U << (8 - 8)))) : ((sa_rgb >>(((8 + 8) -8) & 0x1F)) &(0x100 -(1U << (8 - 8))))))& (0x100 - (1U << (8 - 4)))) >> ((8 -(4 +4)) & 0x1F)): (((((8 + 8 <8) ? ((sa_rgb << ((8 - (8 + 8)) & 0x1F)) &(0x100 -(1U << (8 - 8)))) : ((sa_rgb >>(((8 + 8) -8) & 0x1F)) &(0x100 -(1U << (8 - 8))))))& (0x100 - (1U << (8 - 4)))) << (((4 + 4) -8) & 0x1F))) |((0 + 4 <8)? (((((0 + 8 <8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100-(1U <<(8 -8)))): ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 -(1U <<(8 -4)))) >> ((8 -(0+4))&0x1F)): (((((0 + 8 <8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100-(1U <<(8 -8)))): ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 -(1U <<(8 -4)))) << (((0+4)-8)&0x1F)));
}
s += 4;
register unsigned int sb_rgb;
sb_rgb = *(unsigned short *) (d1);
dc_rgb =(((da_rgb ^ sb_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 +4 -1)) -(1U <<0))))+ (da_rgb & sb_rgb);
}
d1 += 2;
*(unsigned short *) (d2) = da_rgb;
d2 += 2;
*(unsigned short *) (d12) = dc_rgb;
d12 += 2;
}
while (--count);
}
}
void
RGB32toRGB444_ROW2X_STRETCH2X (unsigned char *dest_ptr_1,
unsigned char *dest_ptr_12,
unsigned char *dest_ptr_2, int dest_dx,
unsigned char *src_ptr, int src_dx)
{
register unsigned char *d1 = dest_ptr_1;
register unsigned char *d12 = dest_ptr_12;
register unsigned char *d2 = dest_ptr_2;
register unsigned char *s = src_ptr;
register int count = src_dx;
if (count)
{
register unsigned int da_rgb;
register unsigned int dc_rgb;
register unsigned int sa_rgb;
sa_rgb = *(unsigned int *) (s);
da_rgb =((8 + 4 <8)? (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4)))) >>((8 -(8 +4)) & 0x1F)) : (((((16 + 8 <8) ? ((sa_rgb <<((8 -(16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 -(1U << (8 - 8)))))) & (0x100 -(1U <<(8 -4)))) <<(((8 + 4) - 8) & 0x1F))) | ((4 + 4 <8)? (((((8 + 8 <8)? ((sa_rgb << ((8 - (8 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((8 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) >> ((8 - (4 + 4)) & 0x1F)) : (((((8 + 8 < 8) ? ((sa_rgb << ((8 - (8 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((8 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((4 + 4) - 8) & 0x1F))) | ((0 + 4 < 8) ? (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) >> ((8 - (0 + 4)) & 0x1F)) : (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((0 + 4) - 8) & 0x1F)));
s += 4;
register unsigned int sb_rgb;
sb_rgb = *(unsigned short *) (d1);
dc_rgb =(((da_rgb ^ sb_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 - 1)) -(1U << 0)))) +(da_rgb & sb_rgb);
d1 += 2 * 2;
count--;
*(unsigned short *) (d2) = da_rgb;
d2 += 2;
*(unsigned short *) (d12) = dc_rgb;
d12 += 2;
while (count >= 2)
{
register unsigned int db_rgb;
register unsigned int dd_rgb;
register unsigned int sa_rgb;
sa_rgb = *(unsigned int *) (s);
db_rgb =((8 + 4 <8)? (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4))))>> ((8 - (8 + 4)) & 0x1F)): (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4))))<< (((8 + 4) - 8) & 0x1F))) | ((4 + 4 <8)? (((((8 + 8 <8) ? ((sa_rgb <<((8 -(8 +8)) &0x1F)) &(0x100 -(1U <<(8 -8)))): ((sa_rgb >>(((8 + 8) -8) & 0x1F)) &(0x100 -(1U <<(8 -8)))))) &(0x100 -(1U << (8 - 4)))) >>((8 -(4 +4)) & 0x1F)) : (((((8+8<8)?((sa_rgb << ((8 - (8 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((8 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((4 + 4) - 8) & 0x1F))) | ((0 + 4 < 8) ? (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) >> ((8 - (0 + 4)) & 0x1F)) : (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((0 + 4) - 8) & 0x1F)));
da_rgb =(((da_rgb ^ db_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U << 0))))+ (da_rgb & db_rgb);
*(unsigned short *) (d2) = da_rgb;
*(unsigned short *) (d2 + 2) = db_rgb;
register unsigned int sb_rgb;
sb_rgb = *(unsigned short *) (d1);
dd_rgb =(((db_rgb ^ sb_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U <<0)))) +(db_rgb & sb_rgb);
dc_rgb =(((dc_rgb ^ dd_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U << 0))))+ (dc_rgb & dd_rgb);
*(unsigned short *) (d12) = dc_rgb;
*(unsigned short *) (d12 + 2) = dd_rgb;
sa_rgb = *(unsigned int *) (s + 4);
da_rgb =((8 + 4 <8)? (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4))))>> ((8 - (8 + 4)) & 0x1F)): (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4))))<< (((8 + 4) - 8) & 0x1F))) | ((4 + 4 <8)? (((((8 + 8 <8) ? ((sa_rgb <<((8 -(8 +8)) &0x1F)) &(0x100 -(1U <<(8 -8)))): ((sa_rgb >>(((8 + 8) -8) & 0x1F)) &(0x100 -(1U <<(8 -8)))))) &(0x100 -(1U << (8 - 4)))) >>((8 -(4 +4)) & 0x1F)) : (((((8+8<8)?((sa_rgb << ((8 - (8 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((8 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((4 + 4) - 8) & 0x1F))) | ((0 + 4 < 8) ? (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) >> ((8 - (0 + 4)) & 0x1F)) : (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((0 + 4) - 8) & 0x1F)));
db_rgb =(((db_rgb ^ da_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U << 0))))+ (db_rgb & da_rgb);
*(unsigned short *) (d2 + 2 * 2) = db_rgb;
*(unsigned short *) (d2 + 3 * 2) = da_rgb;
sb_rgb = *(unsigned short *) (d1 + 2 * 2);
dc_rgb =(((da_rgb ^ sb_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U <<0)))) +(da_rgb & sb_rgb);
dd_rgb =(((dd_rgb ^ dc_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U << 0))))+ (dd_rgb & dc_rgb);
*(unsigned short *) (d12 + 2 * 2) = dd_rgb;
*(unsigned short *) (d12 + 3 * 2) = dc_rgb;
s += 2 * 4;
d1 += 4 * 2;
d2 += 4 * 2;
d12 += 4 * 2;
count -= 2;
}
if (count)
{
register unsigned int db_rgb;
register unsigned int dd_rgb;
register unsigned int sa_rgb;
sa_rgb = *(unsigned int *) (s);
db_rgb =((8 + 4 <8)? (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4))))>> ((8 - (8 + 4)) & 0x1F)): (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U <<(8 -8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4))))<< (((8 + 4) - 8) & 0x1F))) | ((4 + 4 <8)? (((((8 + 8 <8) ? ((sa_rgb <<((8 -(8 +8)) &0x1F)) &(0x100 -(1U <<(8 -8)))): ((sa_rgb >>(((8 + 8) -8) & 0x1F)) &(0x100 -(1U <<(8 -8)))))) &(0x100 -(1U << (8 - 4)))) >>((8 -(4 +4)) & 0x1F)) : (((((8+8<8)?((sa_rgb << ((8 - (8 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((8 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((4 + 4) - 8) & 0x1F))) | ((0 + 4 < 8) ? (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) >> ((8 - (0 + 4)) & 0x1F)) : (((((0 + 8 < 8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 - (1U << (8 - 8)))) : ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) & (0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 - 4)))) << (((0 + 4) - 8) & 0x1F)));
da_rgb =(((da_rgb ^ db_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U << 0))))+ (da_rgb & db_rgb);
*(unsigned short *) (d2) = da_rgb;
*(unsigned short *) (d2 + 2) = db_rgb;
*(unsigned short *) (d2 + 2 * 2) = db_rgb;
register unsigned int sb_rgb;
sb_rgb = *(unsigned short *) (d1);
dd_rgb =(((db_rgb ^ sb_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U <<0)))) +(db_rgb & sb_rgb);
dc_rgb =(((dc_rgb ^ dd_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U << 0))))+ (dc_rgb & dd_rgb);
*(unsigned short *) (d12) = dc_rgb;
*(unsigned short *) (d12 + 2) = dd_rgb;
*(unsigned short *) (d12 + 2 * 2) = dd_rgb;
}
else
{
*(unsigned short *) (d2) = da_rgb;
*(unsigned short *) (d12) = dc_rgb;
}
}
}
void
RGB32toRGB444_ROW2X_STRETCH2XPLUS (unsigned char *dest_ptr_1,
unsigned char *dest_ptr_12,
unsigned char *dest_ptr_2,
int dest_dx,
unsigned char *src_ptr, int src_dx)
{
register unsigned char *d1 = dest_ptr_1;
register unsigned char *d12 = dest_ptr_12;
register unsigned char *d2 = dest_ptr_2;
register unsigned char *s = src_ptr;
register int count = dest_dx;
register int limit = dest_dx >> 1;
register int step = src_dx << 1;
register int remainder = (2 * dest_dx - limit) / step;
if (count)
{
register unsigned int da_rgb;
register unsigned int db_rgb;
register unsigned int dc_rgb;
register unsigned int dd_rgb;
register unsigned int sa_rgb;
sa_rgb = *(unsigned int *) (s);
da_rgb =((8 + 4 <8)? (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U << (8 - 8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4)))) >> ((8-(8+4))&0x1F)): (((((16 + 8 <8) ? ((sa_rgb << ((8 - (16 + 8)) & 0x1F)) & (0x100 -(1U << (8 - 8)))): ((sa_rgb >> (((16 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4)))) <<(((8 + 4) - 8) & 0x1F))) | ((4 + 4 <8)? (((((8 + 8 <8) ? ((sa_rgb <<((8 -(8 +8)) & 0x1F)) & (0x100-(1U<<(8 -8)))): ((sa_rgb >>(((8 + 8) -8) & 0x1F)) & (0x100 -(1U <<(8 -8)))))) &(0x100 -(1U << (8 - 4)))) >> ((8 - (4 +4)) &0x1F)): (((((8 + 8 <8) ? ((sa_rgb <<((8 -(8 +8)) & 0x1F)) & (0x100-(1U<<(8 -8)))): ((sa_rgb >>(((8 + 8) -8) & 0x1F)) & (0x100 -(1U <<(8 -8)))))) &(0x100 -(1U << (8 - 4)))) << (((4 + 4) -8) &0x1F))) |((0 + 4 <8)? (((((0 + 8 <8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 -(1U << (8 - 8)))): ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4)))) >> ((8-(0+4))&0x1F)): (((((0 + 8 <8) ? ((sa_rgb << ((8 - (0 + 8)) & 0x1F)) & (0x100 -(1U << (8 - 8)))): ((sa_rgb >> (((0 + 8) - 8) & 0x1F)) &(0x100 - (1U << (8 - 8)))))) & (0x100 - (1U << (8 -4)))) <<(((0 + 4) - 8) & 0x1F)));
s += 4;
if (!(count -= remainder))
goto end_of_row;
while (1)
{
register unsigned int sb_rgb;
sb_rgb = *(unsigned short *) (d1);
dc_rgb =(((da_rgb ^ sb_rgb) >> 1) &(((1U << (8 + 4 - 1)) - (1U << 8)) | ((1U << (4 + 4 - 1)) -(1U << 4)) | ((1U <<(0 + 4 -1)) -(1U << 0))))+ (da_rgb & sb_rgb);
do
{
d1 += 2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -