Commit 91d9a79d authored by Jingning Han's avatar Jingning Han

Offset sub8x8 chroma component buffer pointers

Offset the buffer pointers of sub8x8 chroma components to support
the coding process at bottom right 8x8 block.

Change-Id: Ide17ee31ce064484371194cbbade88603d114a2e
parent d1b6fad2
......@@ -2198,7 +2198,7 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm,
for (mi_col = 0; mi_col < cm->mi_cols; mi_col += cm->mib_size) {
int plane;
av1_setup_dst_planes(planes, frame_buffer, mi_row, mi_col);
av1_setup_dst_planes(planes, cm->sb_size, frame_buffer, mi_row, mi_col);
for (plane = 0; plane < num_planes; ++plane) {
av1_filter_block_plane_non420_ver(cm, &planes[plane], mi + mi_col,
......
......@@ -188,7 +188,7 @@ void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
xd->plane[2].subsampling_x == xd->plane[2].subsampling_y;
nvsb = (cm->mi_rows + MAX_MIB_SIZE - 1) / MAX_MIB_SIZE;
nhsb = (cm->mi_cols + MAX_MIB_SIZE - 1) / MAX_MIB_SIZE;
av1_setup_dst_planes(xd->plane, frame, 0, 0);
av1_setup_dst_planes(xd->plane, cm->sb_size, frame, 0, 0);
row_dering = aom_malloc(sizeof(*row_dering) * (nhsb + 2) * 2);
memset(row_dering, 1, sizeof(*row_dering) * (nhsb + 2) * 2);
prev_row_dering = row_dering + 1;
......
......@@ -574,11 +574,18 @@ static INLINE void av1_init_macroblockd(AV1_COMMON *cm, MACROBLOCKD *xd,
}
static INLINE void set_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col) {
const int above_idx = mi_col * 2;
const int left_idx = (mi_row * 2) & MAX_MIB_MASK_2;
int i;
for (i = 0; i < MAX_MB_PLANE; ++i) {
struct macroblockd_plane *const pd = &xd->plane[i];
#if CONFIG_CHROMA_SUB8X8
if (xd->mi[0]->mbmi.sb_type < BLOCK_8X8) {
// Offset the buffer pointer
if (pd->subsampling_y && (mi_row & 0x01)) mi_row -= 1;
if (pd->subsampling_x && (mi_col & 0x01)) mi_col -= 1;
}
#endif
int above_idx = mi_col * 2;
int left_idx = (mi_row * 2) & MAX_MIB_MASK_2;
pd->above_context = &xd->above_context[i][above_idx >> pd->subsampling_x];
pd->left_context = &xd->left_context[i][left_idx >> pd->subsampling_y];
}
......
......@@ -1340,8 +1340,8 @@ void av1_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col,
}
void av1_setup_dst_planes(struct macroblockd_plane planes[MAX_MB_PLANE],
const YV12_BUFFER_CONFIG *src, int mi_row,
int mi_col) {
BLOCK_SIZE bsize, const YV12_BUFFER_CONFIG *src,
int mi_row, int mi_col) {
uint8_t *const buffers[MAX_MB_PLANE] = { src->y_buffer, src->u_buffer,
src->v_buffer };
const int widths[MAX_MB_PLANE] = { src->y_crop_width, src->uv_crop_width,
......@@ -1354,8 +1354,8 @@ void av1_setup_dst_planes(struct macroblockd_plane planes[MAX_MB_PLANE],
for (i = 0; i < MAX_MB_PLANE; ++i) {
struct macroblockd_plane *const pd = &planes[i];
setup_pred_plane(&pd->dst, buffers[i], widths[i], heights[i], strides[i],
mi_row, mi_col, NULL, pd->subsampling_x,
setup_pred_plane(&pd->dst, bsize, buffers[i], widths[i], heights[i],
strides[i], mi_row, mi_col, NULL, pd->subsampling_x,
pd->subsampling_y);
}
}
......@@ -1375,9 +1375,9 @@ void av1_setup_pre_planes(MACROBLOCKD *xd, int idx,
src->uv_stride };
for (i = 0; i < MAX_MB_PLANE; ++i) {
struct macroblockd_plane *const pd = &xd->plane[i];
setup_pred_plane(&pd->pre[idx], buffers[i], widths[i], heights[i],
strides[i], mi_row, mi_col, sf, pd->subsampling_x,
pd->subsampling_y);
setup_pred_plane(&pd->pre[idx], xd->mi[0]->mbmi.sb_type, buffers[i],
widths[i], heights[i], strides[i], mi_row, mi_col, sf,
pd->subsampling_x, pd->subsampling_y);
}
}
}
......@@ -1923,9 +1923,9 @@ void av1_build_prediction_by_above_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
for (j = 0; j < MAX_MB_PLANE; ++j) {
struct macroblockd_plane *const pd = &xd->plane[j];
setup_pred_plane(&pd->dst, tmp_buf[j], tmp_width[j], tmp_height[j],
tmp_stride[j], 0, i, NULL, pd->subsampling_x,
pd->subsampling_y);
setup_pred_plane(&pd->dst, AOMMAX(a_bsize, BLOCK_8X8), tmp_buf[j],
tmp_width[j], tmp_height[j], tmp_stride[j], 0, i, NULL,
pd->subsampling_x, pd->subsampling_y);
}
for (ref = 0; ref < 1 + has_second_ref(above_mbmi); ++ref) {
const MV_REFERENCE_FRAME frame = above_mbmi->ref_frame[ref];
......@@ -2004,9 +2004,9 @@ void av1_build_prediction_by_left_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
for (j = 0; j < MAX_MB_PLANE; ++j) {
struct macroblockd_plane *const pd = &xd->plane[j];
setup_pred_plane(&pd->dst, tmp_buf[j], tmp_width[j], tmp_height[j],
tmp_stride[j], i, 0, NULL, pd->subsampling_x,
pd->subsampling_y);
setup_pred_plane(&pd->dst, AOMMAX(l_bsize, BLOCK_8X8), tmp_buf[j],
tmp_width[j], tmp_height[j], tmp_stride[j], i, 0, NULL,
pd->subsampling_x, pd->subsampling_y);
}
for (ref = 0; ref < 1 + has_second_ref(left_mbmi); ++ref) {
const MV_REFERENCE_FRAME frame = left_mbmi->ref_frame[ref];
......@@ -2088,7 +2088,8 @@ void av1_build_obmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
dst_width1, dst_height1, dst_stride1);
av1_build_prediction_by_left_preds(cm, xd, mi_row, mi_col, dst_buf2,
dst_width2, dst_height2, dst_stride2);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, xd->mi[0]->mbmi.sb_type,
get_frame_new_buffer(cm), mi_row, mi_col);
av1_build_obmc_inter_prediction(cm, xd, mi_row, mi_col, dst_buf1, dst_stride1,
dst_buf2, dst_stride2);
}
......@@ -2133,9 +2134,10 @@ void av1_build_prediction_by_bottom_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
for (j = 0; j < MAX_MB_PLANE; ++j) {
struct macroblockd_plane *const pd = &xd->plane[j];
setup_pred_plane(&pd->dst, tmp_buf[j], tmp_width[j], tmp_height[j],
tmp_stride[j], (xd->n8_h >> 1), i, NULL,
pd->subsampling_x, pd->subsampling_y);
setup_pred_plane(&pd->dst, AOMMAX(mbmi->sb_type, BLOCK_8X8), tmp_buf[j],
tmp_width[j], tmp_height[j], tmp_stride[j],
(xd->n8_h >> 1), i, NULL, pd->subsampling_x,
pd->subsampling_y);
}
for (ref = 0; ref < 1 + has_second_ref(mbmi); ++ref) {
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
......@@ -2240,8 +2242,9 @@ void av1_build_prediction_by_right_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
for (j = 0; j < MAX_MB_PLANE; ++j) {
struct macroblockd_plane *const pd = &xd->plane[j];
setup_pred_plane(&pd->dst, tmp_buf[j], tmp_width[j], tmp_height[j],
tmp_stride[j], i, xd->n8_w >> 1, NULL, pd->subsampling_x,
setup_pred_plane(&pd->dst, AOMMAX(mbmi->sb_type, BLOCK_8X8), tmp_buf[j],
tmp_width[j], tmp_height[j], tmp_stride[j], i,
xd->n8_w >> 1, NULL, pd->subsampling_x,
pd->subsampling_y);
}
for (ref = 0; ref < 1 + has_second_ref(mbmi); ++ref) {
......@@ -2458,16 +2461,20 @@ void av1_build_ncobmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
}
#endif // CONFIG_HIGHBITDEPTH
const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
av1_build_prediction_by_bottom_preds(cm, xd, mi_row, mi_col, dst_buf1,
dst_width1, dst_height1, dst_stride1);
av1_build_prediction_by_right_preds(cm, xd, mi_row, mi_col, dst_buf2,
dst_width2, dst_height2, dst_stride2);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
av1_merge_dst_bottom_right_preds(cm, xd, mi_row, mi_col, dst_buf1,
dst_stride1, dst_buf2, dst_stride2);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
av1_build_obmc_inter_predictors_sb(cm, xd, mi_row, mi_col);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
}
#endif // CONFIG_NCOBMC
#endif // CONFIG_MOTION_VAR
......
......@@ -599,11 +599,21 @@ static INLINE int scaled_buffer_offset(int x_offset, int y_offset, int stride,
return y * stride + x;
}
static INLINE void setup_pred_plane(struct buf_2d *dst, uint8_t *src, int width,
int height, int stride, int mi_row,
int mi_col,
static INLINE void setup_pred_plane(struct buf_2d *dst, BLOCK_SIZE bsize,
uint8_t *src, int width, int height,
int stride, int mi_row, int mi_col,
const struct scale_factors *scale,
int subsampling_x, int subsampling_y) {
#if CONFIG_CHROMA_SUB8X8
if (bsize < BLOCK_8X8) {
// Offset the buffer pointer
if (subsampling_y && (mi_row & 0x01)) mi_row -= 1;
if (subsampling_x && (mi_col & 0x01)) mi_col -= 1;
}
#else
(void)bsize;
#endif
const int x = (MI_SIZE * mi_col) >> subsampling_x;
const int y = (MI_SIZE * mi_row) >> subsampling_y;
dst->buf = src + scaled_buffer_offset(x, y, stride, scale);
......@@ -614,8 +624,8 @@ static INLINE void setup_pred_plane(struct buf_2d *dst, uint8_t *src, int width,
}
void av1_setup_dst_planes(struct macroblockd_plane planes[MAX_MB_PLANE],
const YV12_BUFFER_CONFIG *src, int mi_row,
int mi_col);
BLOCK_SIZE bsize, const YV12_BUFFER_CONFIG *src,
int mi_row, int mi_col);
void av1_setup_pre_planes(MACROBLOCKD *xd, int idx,
const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col,
......
......@@ -160,8 +160,8 @@ static int loop_filter_ver_row_worker(AV1LfSync *const lf_sync,
LOOP_FILTER_MASK lfm;
int plane;
av1_setup_dst_planes(lf_data->planes, lf_data->frame_buffer, mi_row,
mi_col);
av1_setup_dst_planes(lf_data->planes, lf_data->cm->sb_size,
lf_data->frame_buffer, mi_row, mi_col);
av1_setup_mask(lf_data->cm, mi_row, mi_col, mi + mi_col,
lf_data->cm->mi_stride, &lfm);
......@@ -206,8 +206,8 @@ static int loop_filter_hor_row_worker(AV1LfSync *const lf_sync,
// the outer loop to column-based and remove the synchronizations here.
sync_read(lf_sync, r, c);
av1_setup_dst_planes(lf_data->planes, lf_data->frame_buffer, mi_row,
mi_col);
av1_setup_dst_planes(lf_data->planes, lf_data->cm->sb_size,
lf_data->frame_buffer, mi_row, mi_col);
av1_setup_mask(lf_data->cm, mi_row, mi_col, mi + mi_col,
lf_data->cm->mi_stride, &lfm);
#if CONFIG_EXT_PARTITION_TYPES
......@@ -258,8 +258,8 @@ static int loop_filter_row_worker(AV1LfSync *const lf_sync,
sync_read(lf_sync, r, c);
av1_setup_dst_planes(lf_data->planes, lf_data->frame_buffer, mi_row,
mi_col);
av1_setup_dst_planes(lf_data->planes, lf_data->cm->sb_size,
lf_data->frame_buffer, mi_row, mi_col);
#if CONFIG_EXT_PARTITION_TYPES
for (plane = 0; plane < num_planes; ++plane) {
av1_filter_block_plane_non420_ver(lf_data->cm, &lf_data->planes[plane],
......
......@@ -726,7 +726,8 @@ static void set_offsets(AV1_COMMON *const cm, MACROBLOCKD *const xd,
#endif // CONFIG_DEPENDENT_HORZTILES
cm->mi_rows, cm->mi_cols);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
}
#if CONFIG_SUPERTX
......@@ -799,7 +800,8 @@ static void set_offsets_topblock(AV1_COMMON *const cm, MACROBLOCKD *const xd,
#endif // CONFIG_DEPENDENT_HORZTILES
cm->mi_rows, cm->mi_cols);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
}
static void set_param_topblock(AV1_COMMON *const cm, MACROBLOCKD *const xd,
......@@ -2304,7 +2306,8 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
#endif // CONFIG_EXT_TX
}
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
for (i = 0; i < MAX_MB_PLANE; i++) {
dst_buf[i] = xd->plane[i].dst.buf;
dst_stride[i] = xd->plane[i].dst.stride;
......
......@@ -285,7 +285,8 @@ static void set_offsets_without_segment_id(const AV1_COMP *const cpi,
#endif
// Set up destination pointers.
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
// Set up limit values for MV components.
// Mv beyond the range do not produce new/different prediction block.
......@@ -1829,8 +1830,8 @@ void av1_setup_src_planes(MACROBLOCK *x, const YV12_BUFFER_CONFIG *src,
x->e_mbd.cur_buf = src;
for (i = 0; i < MAX_MB_PLANE; i++)
setup_pred_plane(&x->plane[i].src, buffers[i], widths[i], heights[i],
strides[i], mi_row, mi_col, NULL,
setup_pred_plane(&x->plane[i].src, x->e_mbd.mi[0]->mbmi.sb_type, buffers[i],
widths[i], heights[i], strides[i], mi_row, mi_col, NULL,
x->e_mbd.plane[i].subsampling_x,
x->e_mbd.plane[i].subsampling_y);
}
......@@ -2473,8 +2474,8 @@ static void encode_b(const AV1_COMP *const cpi, const TileInfo *const tile,
check_ncobmc = is_inter_block(mbmi) && motion_allowed >= OBMC_CAUSAL;
if (!dry_run && check_ncobmc) {
av1_check_ncobmc_rd(cpi, x, mi_row, mi_col);
av1_setup_dst_planes(x->e_mbd.plane, get_frame_new_buffer(&cpi->common),
mi_row, mi_col);
av1_setup_dst_planes(x->e_mbd.plane, bsize,
get_frame_new_buffer(&cpi->common), mi_row, mi_col);
}
#endif
encode_superblock(cpi, td, tp, dry_run, mi_row, mi_col, bsize, ctx, rate);
......@@ -2539,7 +2540,8 @@ static void encode_sb(const AV1_COMP *const cpi, ThreadData *td,
update_state_sb_supertx(cpi, td, tile, mi_row, mi_col, bsize, dry_run,
pc_tree);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
for (i = 0; i < MAX_MB_PLANE; i++) {
dst_buf[i] = xd->plane[i].dst.buf;
dst_stride[i] = xd->plane[i].dst.stride;
......@@ -7009,7 +7011,8 @@ static void rd_supertx_sb(const AV1_COMP *const cpi, ThreadData *td,
set_skip_context(xd, mi_row, mi_col);
set_mode_info_offsets(cpi, x, xd, mi_row, mi_col);
update_state_sb_supertx(cpi, td, tile, mi_row, mi_col, bsize, 1, pc_tree);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
for (plane = 0; plane < MAX_MB_PLANE; plane++) {
dst_buf[plane] = xd->plane[plane].dst.buf;
dst_stride[plane] = xd->plane[plane].dst.stride;
......
......@@ -518,6 +518,10 @@ void av1_first_pass(AV1_COMP *cpi, const struct lookahead_entry *source) {
aom_clear_system_state();
xd->mi = cm->mi_grid_visible;
xd->mi[0] = cm->mi;
x->e_mbd.mi[0]->mbmi.sb_type = BLOCK_16X16;
intra_factor = 0.0;
brightness_factor = 0.0;
neutral_count = 0.0;
......@@ -528,7 +532,7 @@ void av1_first_pass(AV1_COMP *cpi, const struct lookahead_entry *source) {
av1_setup_block_planes(&x->e_mbd, cm->subsampling_x, cm->subsampling_y);
av1_setup_src_planes(x, cpi->source, 0, 0);
av1_setup_dst_planes(xd->plane, new_yv12, 0, 0);
av1_setup_dst_planes(xd->plane, cm->sb_size, new_yv12, 0, 0);
if (!frame_is_intra_only(cm)) {
av1_setup_pre_planes(xd, 0, first_ref_buf, 0, 0, NULL);
......
......@@ -2573,10 +2573,11 @@ int av1_find_best_masked_sub_pixel_tree_up(
if (use_upsampled_ref) {
int ref = xd->mi[0]->mbmi.ref_frame[is_second];
const YV12_BUFFER_CONFIG *upsampled_ref = get_upsampled_ref(cpi, ref);
setup_pred_plane(&pd->pre[is_second], upsampled_ref->y_buffer,
upsampled_ref->y_crop_width, upsampled_ref->y_crop_height,
upsampled_ref->y_stride, (mi_row << 3), (mi_col << 3),
NULL, pd->subsampling_x, pd->subsampling_y);
setup_pred_plane(&pd->pre[is_second], mbmi->sb_type,
upsampled_ref->y_buffer, upsampled_ref->y_crop_width,
upsampled_ref->y_crop_height, upsampled_ref->y_stride,
(mi_row << 3), (mi_col << 3), NULL, pd->subsampling_x,
pd->subsampling_y);
}
y = pd->pre[is_second].buf;
y_stride = pd->pre[is_second].stride;
......@@ -3073,10 +3074,11 @@ int av1_find_best_obmc_sub_pixel_tree_up(
if (use_upsampled_ref) {
int ref = xd->mi[0]->mbmi.ref_frame[is_second];
const YV12_BUFFER_CONFIG *upsampled_ref = get_upsampled_ref(cpi, ref);
setup_pred_plane(&pd->pre[is_second], upsampled_ref->y_buffer,
upsampled_ref->y_crop_width, upsampled_ref->y_crop_height,
upsampled_ref->y_stride, (mi_row << 3), (mi_col << 3),
NULL, pd->subsampling_x, pd->subsampling_y);
setup_pred_plane(&pd->pre[is_second], mbmi->sb_type,
upsampled_ref->y_buffer, upsampled_ref->y_crop_width,
upsampled_ref->y_crop_height, upsampled_ref->y_stride,
(mi_row << 3), (mi_col << 3), NULL, pd->subsampling_x,
pd->subsampling_y);
}
y = pd->pre[is_second].buf;
y_stride = pd->pre[is_second].stride;
......
......@@ -312,7 +312,7 @@ void av1_cdef_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref,
av1_ac_quant(cm->base_qindex, 0, cm->bit_depth) >> (cm->bit_depth - 8);
lambda = .12 * quantizer * quantizer / 256.;
av1_setup_dst_planes(xd->plane, frame, 0, 0);
av1_setup_dst_planes(xd->plane, cm->sb_size, frame, 0, 0);
mse[0] = aom_malloc(sizeof(**mse) * nvsb * nhsb);
mse[1] = aom_malloc(sizeof(**mse) * nvsb * nhsb);
for (pli = 0; pli < nplanes; pli++) {
......
......@@ -799,7 +799,7 @@ void av1_setup_pred_block(const MACROBLOCKD *xd,
dst[1].stride = dst[2].stride = src->uv_stride;
for (i = 0; i < MAX_MB_PLANE; ++i) {
setup_pred_plane(dst + i, dst[i].buf,
setup_pred_plane(dst + i, xd->mi[0]->mbmi.sb_type, dst[i].buf,
i ? src->uv_crop_width : src->y_crop_width,
i ? src->uv_crop_height : src->y_crop_height,
dst[i].stride, mi_row, mi_col, i ? scale_uv : scale,
......
......@@ -5658,7 +5658,7 @@ static void joint_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
get_upsampled_ref(cpi, refs[id]);
// Set pred for Y plane
setup_pred_plane(&pd->pre[0], upsampled_ref->y_buffer,
setup_pred_plane(&pd->pre[0], bsize, upsampled_ref->y_buffer,
upsampled_ref->y_crop_width,
upsampled_ref->y_crop_height, upsampled_ref->y_stride,
(mi_row << 3), (mi_col << 3), NULL, pd->subsampling_x,
......@@ -6102,7 +6102,7 @@ static int64_t rd_pick_inter_best_sub8x8_mode(
// Set pred for Y plane
setup_pred_plane(
&pd->pre[0], upsampled_ref->y_buffer,
&pd->pre[0], bsize, upsampled_ref->y_buffer,
upsampled_ref->y_crop_width, upsampled_ref->y_crop_height,
upsampled_ref->y_stride, (mi_row << 3), (mi_col << 3), NULL,
pd->subsampling_x, pd->subsampling_y);
......@@ -7025,7 +7025,7 @@ static void single_motion_search(const AV1_COMP *const cpi, MACROBLOCK *x,
// Set pred for Y plane
setup_pred_plane(
&pd->pre[ref_idx], upsampled_ref->y_buffer,
&pd->pre[ref_idx], bsize, upsampled_ref->y_buffer,
upsampled_ref->y_crop_width, upsampled_ref->y_crop_height,
upsampled_ref->y_stride, (mi_row << 3), (mi_col << 3), NULL,
pd->subsampling_x, pd->subsampling_y);
......@@ -9840,7 +9840,8 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
av1_build_prediction_by_left_preds(cm, xd, mi_row, mi_col,
args.left_pred_buf, dst_width2,
dst_height2, args.left_pred_stride);
av1_setup_dst_planes(xd->plane, get_frame_new_buffer(cm), mi_row, mi_col);
av1_setup_dst_planes(xd->plane, bsize, get_frame_new_buffer(cm), mi_row,
mi_col);
x->mask_buf = mask2d_buf;
x->wsrc_buf = weighted_src_buf;
calc_target_weighted_pred(cm, x, xd, mi_row, mi_col, args.above_pred_buf[0],
......@@ -12656,8 +12657,8 @@ void av1_check_ncobmc_rd(const struct AV1_COMP *cpi, struct macroblock *x,
av1_setup_pre_planes(xd, ref, cfg, mi_row, mi_col,
&xd->block_refs[ref]->sf);
}
av1_setup_dst_planes(x->e_mbd.plane, get_frame_new_buffer(&cpi->common),
mi_row, mi_col);
av1_setup_dst_planes(x->e_mbd.plane, bsize,
get_frame_new_buffer(&cpi->common), mi_row, mi_col);
av1_build_inter_predictors_sb(xd, mi_row, mi_col, NULL, bsize);
......
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