00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifdef MODULE_NAME_IS_i422_yuy2_mmx
00025
00026 #define MMX_YUV422_YUYV " \n\
00027 movq (%1), %%mm0 # Load 8 Y y7 y6 y5 y4 y3 y2 y1 y0 \n\
00028 movd (%2), %%mm1 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
00029 movd (%3), %%mm2 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
00030 punpcklbw %%mm2, %%mm1 # v3 u3 v2 u2 v1 u1 v0 u0 \n\
00031 movq %%mm0, %%mm2 # y7 y6 y5 y4 y3 y2 y1 y0 \n\
00032 punpcklbw %%mm1, %%mm2 # v1 y3 u1 y2 v0 y1 u0 y0 \n\
00033 movq %%mm2, (%0) # Store low YUYV \n\
00034 punpckhbw %%mm1, %%mm0 # v3 y7 u3 y6 v2 y5 u2 y4 \n\
00035 movq %%mm0, 8(%0) # Store high YUYV \n\
00036 "
00037
00038 #define MMX_YUV422_YVYU " \n\
00039 movq (%1), %%mm0 # Load 8 Y y7 y6 y5 y4 y3 y2 y1 y0 \n\
00040 movd (%2), %%mm2 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
00041 movd (%3), %%mm1 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
00042 punpcklbw %%mm2, %%mm1 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
00043 movq %%mm0, %%mm2 # y7 y6 y5 y4 y3 y2 y1 y0 \n\
00044 punpcklbw %%mm1, %%mm2 # u1 y3 v1 y2 u0 y1 v0 y0 \n\
00045 movq %%mm2, (%0) # Store low YUYV \n\
00046 punpckhbw %%mm1, %%mm0 # u3 y7 v3 y6 u2 y5 v2 y4 \n\
00047 movq %%mm0, 8(%0) # Store high YUYV \n\
00048 "
00049
00050 #define MMX_YUV422_UYVY " \n\
00051 movq (%1), %%mm0 # Load 8 Y y7 y6 y5 y4 y3 y2 y1 y0 \n\
00052 movd (%2), %%mm2 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
00053 movd (%3), %%mm1 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
00054 punpcklbw %%mm2, %%mm1 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
00055 movq %%mm1, %%mm2 # u3 v3 u2 v2 u1 v1 u0 v0 \n\
00056 punpcklbw %%mm0, %%mm2 # y3 v1 y2 u1 y1 v0 y0 u0 \n\
00057 movq %%mm2, (%0) # Store low UYVY \n\
00058 punpckhbw %%mm0, %%mm1 # y7 v3 y6 u3 y5 v2 y4 u2 \n\
00059 movq %%mm1, 8(%0) # Store high UYVY \n\
00060 "
00061
00062 #define MMX_YUV422_Y211 " \n\
00063 "
00064
00065 #else
00066
00067 #define C_YUV422_YUYV( p_line, p_y, p_u, p_v ) \
00068 *(p_line)++ = *(p_y)++; \
00069 *(p_line)++ = *(p_u)++; \
00070 *(p_line)++ = *(p_y)++; \
00071 *(p_line)++ = *(p_v)++; \
00072
00073 #define C_YUV422_YVYU( p_line, p_y, p_u, p_v ) \
00074 *(p_line)++ = *(p_y)++; \
00075 *(p_line)++ = *(p_v)++; \
00076 *(p_line)++ = *(p_y)++; \
00077 *(p_line)++ = *(p_u)++; \
00078
00079 #define C_YUV422_UYVY( p_line, p_y, p_u, p_v ) \
00080 *(p_line)++ = *(p_u)++; \
00081 *(p_line)++ = *(p_y)++; \
00082 *(p_line)++ = *(p_v)++; \
00083 *(p_line)++ = *(p_y)++; \
00084
00085 #define C_YUV422_Y211( p_line, p_y, p_u, p_v ) \
00086 *(p_line)++ = *(p_y); p_y += 2; \
00087 *(p_line)++ = *(p_u) - 0x80; p_u += 2; \
00088 *(p_line)++ = *(p_y); p_y += 2; \
00089 *(p_line)++ = *(p_v) - 0x80; p_v += 2; \
00090
00091 #endif
00092