x_off += mv->x >> 2;
y_off += mv->y >> 2;
- src += y_off * srcstride + (x_off << s->ps.sps->pixel_shift);
+ src += y_off * srcstride + (x_off * (1 << s->ps.sps->pixel_shift));
if (x_off < extra_left || y_off < extra_top ||
x_off >= pic_width - block_w - ff_hevc_qpel_extra_after[mx] ||
x_off += mv->x >> 3;
y_off += mv->y >> 3;
- src1 += y_off * src1stride + (x_off << s->ps.sps->pixel_shift);
- src2 += y_off * src2stride + (x_off << s->ps.sps->pixel_shift);
+ src1 += y_off * src1stride + (x_off * (1 << s->ps.sps->pixel_shift));
+ src2 += y_off * src2stride + (x_off * (1 << s->ps.sps->pixel_shift));
if (x_off < EPEL_EXTRA_BEFORE || y_off < EPEL_EXTRA_AFTER ||
x_off >= pic_width - block_w - EPEL_EXTRA_AFTER ||
dst0, s->frame->linesize[0],
tmp, tmp2, tmpstride, nPbW, nPbH);
} else {
- s->hevcdsp.put_weighted_pred_avg(dst0, s->frame->linesize[0],
- tmp, tmp2, tmpstride, nPbW, nPbH);
+ s->hevcdsp.put_unweighted_pred_avg(dst0, s->frame->linesize[0],
+ tmp, tmp2, tmpstride, nPbW, nPbH);
}
chroma_mc(s, tmp, tmp2, tmpstride, ref0->frame,
dst2, s->frame->linesize[2], tmp2, tmp4,
tmpstride, nPbW / 2, nPbH / 2);
} else {
- s->hevcdsp.put_weighted_pred_avg(dst1, s->frame->linesize[1], tmp, tmp3, tmpstride, nPbW/2, nPbH/2);
- s->hevcdsp.put_weighted_pred_avg(dst2, s->frame->linesize[2], tmp2, tmp4, tmpstride, nPbW/2, nPbH/2);
+ s->hevcdsp.put_unweighted_pred_avg(dst1, s->frame->linesize[1], tmp, tmp3, tmpstride, nPbW/2, nPbH/2);
+ s->hevcdsp.put_unweighted_pred_avg(dst2, s->frame->linesize[2], tmp2, tmp4, tmpstride, nPbW/2, nPbH/2);
}
}
}
if (!desc)
return AVERROR(EINVAL);
- pixel_shift = desc->comp[0].depth_minus1 > 7;
+ pixel_shift = desc->comp[0].depth > 8;
av_log(s->avctx, AV_LOG_DEBUG, "Verifying checksum for frame with POC %d: ",
s->poc);