<code>
代码原型,不是我写的。只是拿来copy。
static LA_bool xxx(unsigned char *src, int Width, int Height, short *table1, short *table2,
int dstWidth, int dstHeight, int nchanner, unsigned char *dst, Rect_S stRect)
{
int sx, sy;
int i, j;
int stepSrc = Width * nchanner;
int stepDstMapxy = dstWidth;
int stepDstMapCoef = dstWidth * 2;
short cof00, cof01, cof10, cof11;
int offset1, offset2;
//int r, g, b;
int dstoff = 0;
int coflinestart;
int dstlinestart;
int *xy_tab = (int *)table1;
int *cof_tab = (int *)table2;
int xyval = 0;
int xyoff, coff;
int cofval1, cofval2;
unsigned char r00, g00, b00, r01, g01, b01, r10, g10, b10, r11, g11, b11;
char *p1, *p2;
int rgb0, rgb1, rgb2, rgb3;
unsigned char *pDtmp;
<code>
static int ImgIn_w = 800;
static int ImgIn_h = 600;
static int Img_w = 600;
static int Img_h = 800;
static int PixelSize = 2;
static void Load_Dot16_YUV422(int stRect_left, int stRect_right, int stRect_top, int stRect_bottom, int ImageIndex, int ImageOutIndex)
{
unsigned int src0 = pImgS1In;
unsigned int dst0 = pImgS1Out;
unsigned int xy_tab0 = pParam_Loadx4XY;
unsigned int cof_tab0 = pParam_Dot16Cof;
int Index_i, Index_j;
unsigned char* src;
unsigned char * src1;
register tu32 XY_tab_Addr;
unsigned long long *pXY_tab;
int i_LoopNum;
int j_offset;
unsigned long long offset_12;
int offset_load_1;
int offset_load_1_is;
unsigned long long data_load_A_1;
unsigned long long data_load_B_1;
int offset_load_2;
int offset_load_2_is;
unsigned long long data_load_A_2;
unsigned long long data_load_B_2;
unsigned long long *pCof_tab;
unsigned long long *pCof_tab1;
unsigned long long Cof_ABCD_1;
unsigned long long Cof_ABCD_2;
unsigned long long Data64_AND_00FF = 0x00FF00FF00FF00FF;
unsigned int Data32_7654_A_1;
unsigned int Data32_7654_B_1;
unsigned int Data32_3210_A_2;
unsigned int Data32_3210_B_2;
unsigned long long Data64_DP2_76765454_1;
unsigned long long Data64_DP2_32321010_2;
unsigned long long Data64_DPH4_75753131_1;
unsigned long long Data64_DPH4_75753131_2;
unsigned long long Data64_MV55_75753131_1;
unsigned long long Data64_MV33_75753131_2;
unsigned long long Data64_SHFU_75753131_1;
unsigned long long Data64_SHFU_75753131_2;
unsigned int Data32_7575_1;
unsigned int Data32_3131_1;
unsigned int Data32_7575_2;
unsigned int Data32_3131_2;
int Shift_Num_1;
int Shift_Num_2;
//AB
//CD
unsigned long long Data64_Y0_0B0D0A0C;
unsigned long long Data64_Y1_0B0D0A0C;
unsigned long long Data64_U0_0B0D0A0C;
unsigned long long Data64_V1_0B0D0A0C;
__x128_t D128_Y1Y0_0B0D0A0C;
__x128_t D128_V1U0_0B0D0A0C;
__x128_t D128_C1C0_0B0D0A0C;
unsigned long long D64_Y1Y0_Dot16;
unsigned long long D64_V1U0_Dot16;
unsigned long long D64_Y1Y0_SHRU;
unsigned long long D64_V1U0_SHRU;
unsigned long long D64_V1_Y1_U0_Y0;
unsigned int D32_V1_Y1;
unsigned int D32_U0_Y0;
unsigned int D32_V1Y1U0Y0;