2016-12-19 15:21

# 小白求助大佬，x265编码算法中数组名O[],EO[],EEO[],EEE[]等名字的意义或者来源

/** 函数功能 ：对残差块进行16x16DCT变换并对其转置

• \参数 block ：残差数据
• \参数 coeff ：存储行变换后的数据
• \参数 shift ：行变换移位个数
• \返回 ：null
**/

static void partialButterfly16(const int16_t* src, int16_t* dst, int shift, int line)

{

//功能：行变换 X*DCT’

int j, k;

int E[8], O[8];

int EE[4], EO[4];

int EEE[2], EEO[2];

int add = 1 << (shift - 1);

for (j = 0; j < line; j++)

{

/* E and O */

for (k = 0; k < 8; k++)

{

E[k] = src[k] + src[15 - k];

O[k] = src[k] - src[15 - k];

}

``````/* EE and EO */
for (k = 0; k < 4; k++)
{
EE[k] = E[k] + E[7 - k];
EO[k] = E[k] - E[7 - k];
}

/* EEE and EEO */
EEE[0] = EE[0] + EE[3];
EEO[0] = EE[0] - EE[3];
EEE[1] = EE[1] + EE[2];
EEO[1] = EE[1] - EE[2];

dst[0] = (int16_t)((g_t16[0][0] * EEE[0] + g_t16[0][1] * EEE[1] + add) >> shift);
dst[8 * line] = (int16_t)((g_t16[8][0] * EEE[0] + g_t16[8][1] * EEE[1] + add) >> shift);
dst[4 * line] = (int16_t)((g_t16[4][0] * EEO[0] + g_t16[4][1] * EEO[1] + add) >> shift);
dst[12 * line] = (int16_t)((g_t16[12][0] * EEO[0] + g_t16[12][1] * EEO[1] + add) >> shift);

for (k = 2; k < 16; k += 4)
{
dst[k * line] = (int16_t)((g_t16[k][0] * EO[0] + g_t16[k][1] * EO[1] + g_t16[k][2] * EO[2] +
g_t16[k][3] * EO[3] + add) >> shift);
}

for (k = 1; k < 16; k += 2)
{
dst[k * line] =  (int16_t)((g_t16[k][0] * O[0] + g_t16[k][1] * O[1] + g_t16[k][2] * O[2] + g_t16[k][3] * O[3] +
g_t16[k][4] * O[4] + g_t16[k][5] * O[5] + g_t16[k][6] * O[6] + g_t16[k][7] * O[7] +
}

src += 16;
dst++;
``````

}

}

O[16], EO[8], EE[4], EEEO[2], EEEE[2], EEE[8],E[16].

• 点赞
• 写回答
• 关注问题
• 收藏
• 邀请回答