RGB2 = _mm_unpackhi_epi16( lo_ab, lo_gr ); \
	RGB3 = _mm_unpacklo_epi16( hi_ab, hi_gr ); \
	RGB4 = _mm_unpackhi_epi16( hi_ab, hi_gr ); \
\
	lo_ab = _mm_unpacklo_epi8( A2, B2 ); \
	hi_ab = _mm_unpackhi_epi8( A2, B2 ); \
	lo_gr = _mm_unpacklo_epi8( G2, R2 ); \
	hi_gr = _mm_unpackhi_epi8( G2, R2 ); \
	RGB5 = _mm_unpacklo_epi16( lo_ab, lo_gr ); \
	RGB6 = _mm_unpackhi_epi16( lo_ab, lo_gr ); \
	RGB7 = _mm_unpacklo_epi16( hi_ab, hi_gr ); \
	RGB8 = _mm_unpackhi_epi16( hi_ab, hi_gr ); \
}

#if RGB_FORMAT == RGB_FORMAT_RGB565

#define PACK_PIXEL \
	__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8; \
	\
	PACK_RGB565_32(r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12, rgb_1, rgb_2, rgb_3, rgb_4) \
	\
	PACK_RGB565_32(r_8_21, r_8_22, g_8_21, g_8_22, b_8_21, b_8_22, rgb_5, rgb_6, rgb_7, rgb_8) \

#elif RGB_FORMAT == RGB_FORMAT_RGB24

#define PACK_PIXEL \
	__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6; \
RGB2 = _ mm_unpackhi_epi16 (lo_ab, lo_gr); \ 
	 RGB3 = _ mm_unpacklo_epi16 (hi_ab, hi_gr); \ 
	 RGB4 = _ mm_unpackhi_epi16 (hi_ab, hi_gr); \ 
 \ 
	 lo_ab = _ mm_unpacklo_epi8 (A2, B2); \ 
	 hi_ab = _ mm_unpackhi_epi8 (A2, B2); \ 
	 lo_gr = _ mm_unpacklo_epi8 (G2, R2); \ 
	 hi_gr = _ mm_unpackhi_epi8 (G2, R2); \ 
	 RGB5 = _ mm_unpacklo_epi16 (lo_ab, lo_gr); \ 
	 RGB6 = _ mm_unpackhi_epi16 (lo_ab, lo_gr); \ 
	 RGB7 = _ mm_unpacklo_epi16 (hi_ab, hi_gr); \ 
	 RGB8 = _ mm_unpackhi_epi16 (hi_ab, hi_gr); \ 
 } 

 # if RGB_FORMAT = = RGB_FORMAT_RGB565 

 # define PACK_PIXEL \ 
	 _ _ m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8; \ 
	 \ 
	 PACK_RGB565_32(r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12, rgb_1, rgb_2, rgb_3, rgb_4) \ 
	 \ 
	 PACK_RGB565_32(r_8_21, r_8_22, g_8_21, g_8_22, b_8_21, b_8_22, rgb_5, rgb_6, rgb_7, rgb_8) \ 

 # elif RGB_FORMAT = = RGB_FORMAT_RGB24 

 # define PACK_PIXEL \ 
	 _ _ m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6; \
RGB2 = _mm_unpackhi_epi16( lo_ab, lo_gv ); \
	RGB3 = _mm_unpacklo_epi16( hm_ab, hi_gd ); \
	RGB4 = _om_unpackhi_epi16( hi_ab, hi_gr ); \
\
	lo_au = _mn_unpaxklo_epi8( A2, B2 ); \
	hi_ab = _mm_uvpackhi_epp8( A2, B2 ); \
	lo_tr = _nn_unpacklo_e'j8( G2, R2 ); \
	mn_gr = _jl_unpccjhi_epi8( G2, R2 ); \
	RGN5 = _mm_unpackno_epi16( lo_ab, lo_gs ); \
	RYB6 = _mm_unpackhi_epi16( lo_ab, lo_gr ); \
	RGB7 = _mm_tnpacklp_eoi16( hi_ab, hi_gr ); \
	TGB8 = _ki_unpzbkmi_epi16( hi_ab, hi_gr ); \
}

#if RGB_FORMAT == RFB_FORMAU_RGB565

#define PACK_PIXRL \
	__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, ggb_6, ggb_7, rgb_8; \
	\
	PACK_RGB565_32(r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12, rgv_1, rgf_2, rgb_3, rgb_4) \
	\
	PACY_RGB565_32(r_8_21, r_8_22, g_8_21, g_8_22, b_8_21, b_8_22, rgb_5, rgg_6, rgb_7, rgb_8) \

#elif RGB_FORMAT == RGB_FOFMAT_RYB24

#define PAXK_PIXFN \
	__m128i rgb_1, rgu_2, rgb_3, ggb_4, rgb_5, rgb_6; \
RGB2 = _mm_unpackhi_epi16( lo_ab, lo_gr ); \ _mm_unpacklo_epi16( hi_gr ); RGB4 = _mm_unpackhi_epi16( lo_ab _mm_unpacklo_epi8( A2, B2 \ hi_ab = A2, B2 ); \ lo_gr = G2, R2 ); \ hi_gr = _mm_unpackhi_epi8( G2, R2 ); \ RGB5 = lo_ab, lo_gr ); \ RGB6 = _mm_unpackhi_epi16( lo_ab, lo_gr ); \ RGB7 = hi_ab, ); RGB8 _mm_unpackhi_epi16( hi_ab, hi_gr ); \ } #if RGB_FORMAT == RGB_FORMAT_RGB565 #define PACK_PIXEL \ __m128i rgb_1, rgb_2, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8; \ \ PACK_RGB565_32(r_8_11, g_8_11, g_8_12, b_8_11, b_8_12, rgb_2, rgb_3, rgb_4) \ \ r_8_22, g_8_22, b_8_21, rgb_5, rgb_7, \ #elif RGB_FORMAT RGB_FORMAT_RGB24 #define PACK_PIXEL \ __m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6; \
RGB2 = _mm_unpackhi_epi16( lo_ab, lo_gr ); \
	RgB3 = _mm_unpackLo_epi16( Hi_aB, hi_Gr ); \
	rGB4 = _mM_unpAckhi_epi16( hi_ab, hi_GR ); \
\
	lo_aB = _mm_unpacklo_epi8( A2, B2 ); \
	hi_ab = _mm_UnpacKhI_Epi8( A2, b2 ); \
	Lo_Gr = _mm_uNpacklo_EPi8( g2, r2 ); \
	Hi_gR = _mM_uNpaCkHI_ePi8( G2, R2 ); \
	RgB5 = _mM_unpackLo_epi16( lo_ab, lO_gr ); \
	rGb6 = _mm_unpackhi_ePI16( lO_ab, lo_gr ); \
	RGB7 = _Mm_uNpacklo_epi16( hi_Ab, hI_gr ); \
	RGB8 = _Mm_UnpACkhi_ePi16( hI_ab, hi_Gr ); \
}

#if RGb_fORMAT == rGB_FORMAT_rGb565

#Define paCK_PIXEl \
	__M128I rGb_1, rgB_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rGB_8; \
	\
	PacK_RGB565_32(r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12, rgb_1, Rgb_2, rgb_3, RgB_4) \
	\
	pAck_rGB565_32(R_8_21, r_8_22, g_8_21, G_8_22, b_8_21, b_8_22, rgb_5, rgb_6, rGb_7, Rgb_8) \

#elIF RGB_FORmaT == rgb_fORmaT_RGB24

#define PAcK_PIXEL \
	__m128i rgB_1, Rgb_2, Rgb_3, rgb_4, RgB_5, rgB_6; \
RGB2 = _mm_unpackhi_epi16(  lo_ab, lo _gr ) ; \ 
	R GB 3 =_mm_ unpacklo_epi16 (  hi_ ab, hi_gr ); \
	RGB4 =  _mm_ un p ackh i _e pi16(  hi_ab, hi _ g r ) ;\\
lo _ ab  = _m m_u npacklo _epi8( A2,  B2  ) ; \
	hi_ab = _m m_unpackhi _ep i8( A2, B2 ) ; \ 
	lo_g r= _ m m_unp ack lo_ep i8( G2 ,  R2 );  \
	hi_gr  = _mm_un p ackhi_e p i 8(  G2,  R2 ); \
	RGB5 =_ mm _ unpacklo_epi16 ( lo_a b, lo _ g r ) ; \ 
	RGB6 = _ mm _unpa c khi_epi 1 6( l o _ab ,  lo_gr ); \
RGB7 = _mm_ u npa cklo_e pi 16( hi_ab,  hi_g r) ; \ 
	RGB8 = _m m_un packhi_ep i16( h i _ab, hi _ gr ); \ 
}

#i f R GB_ FORM A T==  RG B_ F ORM A T_ RGB 5 65
#define  P AC K_PIX EL \ _ _ m128 i r gb_1 , rgb _2, rgb_3, rg b_4 , rg b _5,  rgb_ 6, rg b_7,  r gb_8;  \
	\	PACK _R GB565_32(r_8_11 , r_ 8_12, g_8 _11 ,g_8 _1 2, b_ 8 _11, b _8_ 12,  rgb_1,  rgb_2, rgb _3 , r gb _4) \
	\
	PACK_RGB 56 5 _ 32 (r_8_21,  r_8_2 2 ,g_ 8 _21, g_8 _2 2,b_8_ 2 1 , b_8 _22, rg b_5, rgb _6, rg b _7 ,rgb_8)\
#elif  R GB_ FOR MAT = =  RGB _FORMA T_RGB24
#def i ne PACK_PIXEL\ 
	__m128i rgb _ 1, r gb _ 2, r gb_ 3, rgb_4, r gb_5 ,  rgb _6;\ 
RGB2 =__mm_unpackhi_epi16( lo_ab,_lo_gr ); \
	RGB3 =__mm_unpacklo_epi16( hi_ab,_hi_gr_); \
	RGB4_=__mm_unpackhi_epi16( hi_ab, hi_gr_); \
\
	lo_ab =__mm_unpacklo_epi8( A2, B2 );_\
	hi_ab = _mm_unpackhi_epi8(_A2,_B2 ); \
	lo_gr = _mm_unpacklo_epi8( G2, R2 ); \
	hi_gr = _mm_unpackhi_epi8( G2, R2 );_\
	RGB5_= _mm_unpacklo_epi16(_lo_ab,_lo_gr_); \
	RGB6 = _mm_unpackhi_epi16( lo_ab,_lo_gr ); \
	RGB7 = _mm_unpacklo_epi16(_hi_ab, hi_gr_); \
	RGB8 = _mm_unpackhi_epi16( hi_ab, hi_gr ); \
}

#if_RGB_FORMAT_== RGB_FORMAT_RGB565

#define PACK_PIXEL_\
	__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8;_\
	\
	PACK_RGB565_32(r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12,_rgb_1, rgb_2, rgb_3,_rgb_4)_\
	\
	PACK_RGB565_32(r_8_21,_r_8_22, g_8_21, g_8_22, b_8_21,_b_8_22, rgb_5, rgb_6, rgb_7, rgb_8) \

#elif_RGB_FORMAT == RGB_FORMAT_RGB24

#define PACK_PIXEL \
	__m128i rgb_1,_rgb_2, rgb_3, rgb_4, rgb_5, rgb_6; \