Commit b586de83 authored by Wei-Ting Lin's avatar Wei-Ting Lin Committed by Wei-ting Lin
Browse files

ncobmc-adapt-weight: update the interpolation kernel type

Change-Id: I862c4b5a22c3f5b3d923cc3feecd194d03b4b892
parent c5563a4d
......@@ -118,12 +118,7 @@ typedef struct superblock_mi_boundaries {
int mi_col_end;
} SB_MI_BD;
typedef struct {
int KERNEL_TL[MAX_SB_SIZE][MAX_SB_SIZE];
int KERNEL_TR[MAX_SB_SIZE][MAX_SB_SIZE];
int KERNEL_BL[MAX_SB_SIZE][MAX_SB_SIZE];
int KERNEL_BR[MAX_SB_SIZE][MAX_SB_SIZE];
} NCOBMC_KERNELS;
typedef struct { int16_t KERNEL[4][MAX_SB_SIZE][MAX_SB_SIZE]; } NCOBMC_KERNELS;
#endif
typedef struct {
......
......@@ -3577,19 +3577,18 @@ void build_ncobmc_intrpl_pred(const AV1_COMMON *const cm, MACROBLOCKD *xd,
int i;
for (i = 0; i < 4; ++i) tmp_p[i] = preds[i][plane];
tmp = (int64_t)knls->KERNEL_TL[k_r][k_c] * tmp_p[0][pos] +
(int64_t)knls->KERNEL_TR[k_r][k_c] * tmp_p[1][pos] +
(int64_t)knls->KERNEL_BL[k_r][k_c] * tmp_p[2][pos] +
(int64_t)knls->KERNEL_BR[k_r][k_c] * tmp_p[3][pos];
tmp = 0;
for (i = 0; i < 4; ++i)
tmp += knls->KERNEL[i][k_r][k_c] * tmp_p[i][pos];
} else {
uint16_t *tmp_p[4];
int i;
for (i = 0; i < 4; ++i) tmp_p[i] = CONVERT_TO_SHORTPTR(preds[i][plane]);
tmp = (int64_t)knls->KERNEL_TL[k_r][k_c] * tmp_p[0][pos] +
(int64_t)knls->KERNEL_TR[k_r][k_c] * tmp_p[1][pos] +
(int64_t)knls->KERNEL_BL[k_r][k_c] * tmp_p[2][pos] +
(int64_t)knls->KERNEL_BR[k_r][k_c] * tmp_p[3][pos];
tmp = 0;
for (i = 0; i < 4; ++i)
tmp += knls->KERNEL[i][k_r][k_c] * tmp_p[i][pos];
}
q_tmp = (tmp <= 0) ? 0 : ROUND_POWER_OF_TWO(tmp, KERNEL_SCALE_LOG);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment