30 #define PROF_TEMP_OFFSET (MAX_PB_SIZE + 32)
44 const int hs =
sps->hshift[is_chroma];
45 const int vs =
sps->vshift[is_chroma];
47 r->l =
pps->subpic_x[subpic_idx] >> hs;
48 r->t =
pps->subpic_y[subpic_idx] >> vs;
49 r->r =
r->l + (
pps->subpic_width[subpic_idx] >> hs);
50 r->b =
r->t + (
pps->subpic_height[subpic_idx] >> vs);
56 const int l = dmvr_clip ?
FFMIN(
FFMAX(subpic->
l, sb->
l), subpic->
r - 1) : subpic->
l;
57 const int t = dmvr_clip ?
FFMIN(
FFMAX(subpic->
t, sb->
t), subpic->
b - 1) : subpic->
t;
58 const int r = dmvr_clip ?
FFMAX(
FFMIN(subpic->
r, sb->
r), subpic->
l + 1) : subpic->
r;
59 const int b = dmvr_clip ?
FFMAX(
FFMIN(subpic->
b, sb->
b), subpic->
t + 1) : subpic->
b;
68 const uint8_t **
src, ptrdiff_t *src_stride,
69 int x_off,
int y_off,
const int block_w,
const int block_h,
70 const int extra_before,
const int extra_after,
74 const int extra = extra_before + extra_after;
75 int pic_width, pic_height;
77 *
src += y_off * *src_stride + (x_off * (1 <<
fc->ps.sps->pixel_shift));
79 clip_to_subpic(&x_off, &y_off, &pic_width, &pic_height, subpic, sb, dmvr_clip);
81 if (dmvr_clip || x_off < extra_before || y_off < extra_before ||
82 x_off >= pic_width - block_w - extra_after ||
83 y_off >= pic_height - block_h - extra_after) {
84 const int ps =
fc->ps.sps->pixel_shift;
86 const int offset = extra_before * *src_stride + (extra_before << ps);
87 const int buf_offset = extra_before * edge_emu_stride + (extra_before << ps);
89 fc->vdsp.emulated_edge_mc(dst, *
src -
offset, edge_emu_stride, *src_stride,
90 block_w + extra, block_h + extra, x_off - extra_before, y_off - extra_before,
91 pic_width, pic_height);
93 *
src = dst + buf_offset;
94 *src_stride = edge_emu_stride;
99 const uint8_t *
src,
const ptrdiff_t src_stride,
const int ps,
100 int x_off,
int y_off,
const int block_w,
const int block_h,
101 const VVCRect *subpic,
const VVCRect *half_sb,
const int dmvr_clip)
104 int pic_width, pic_height;
106 src += y_off * src_stride + x_off * (1 << ps);
108 clip_to_subpic(&x_off, &y_off, &pic_width, &pic_height, subpic, half_sb, dmvr_clip);
110 fc->vdsp.emulated_edge_mc(dst,
src, dst_stride, src_stride,
111 block_w, block_h, x_off, y_off, pic_width, pic_height);
126 const uint8_t **
src, ptrdiff_t *src_stride,
const VVCFrame *src_frame,
127 int x_sb,
int y_sb,
int x_off,
int y_off,
int block_w,
int block_h,
const int wrap_enabled,
128 const int is_chroma,
const int extra_before,
const int extra_after)
132 const int ps =
sps->pixel_shift;
134 const int extra = extra_before + extra_after;
135 const int dmvr_clip = x_sb != x_off || y_sb != y_off;
136 const int dmvr_left =
FFMAX(x_off, x_sb) - extra_before;
137 const int dmvr_right =
FFMIN(x_off, x_sb) + block_w + extra_after;
138 const int left = x_off - extra_before;
139 const int top = y_off - extra_before;
140 const int pic_width =
pps->width >>
sps->hshift[is_chroma];
141 const int wrap =
pps->ref_wraparound_offset << (
sps->min_cb_log2_size_y -
sps->hshift[is_chroma]);
143 VVCRect sb = { x_sb - extra_before, y_sb - extra_before, x_sb + block_w + extra_after, y_sb + block_h + extra_after };
148 if (!wrap_enabled || (dmvr_left >= 0 && dmvr_right <= pic_width)) {
150 x_off, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip);
153 if (dmvr_right <= 0) {
156 x_off +
wrap, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip);
159 if (dmvr_left >= pic_width) {
162 x_off -
wrap, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip);
170 if (dmvr_left < 0 ) {
174 left +
wrap, top,
w, block_h, &subpic, &half_sb, dmvr_clip);
178 0, top, block_w -
w, block_h, &subpic, &half_sb, dmvr_clip);
180 const int w = pic_width -
left;
181 VVCRect half_sb = { sb.
l, sb.
t, pic_width, sb.
b };
183 left, top,
w, block_h, &subpic, &half_sb, dmvr_clip);
187 pic_width -
wrap , top, block_w -
w, block_h, &subpic, &half_sb, dmvr_clip);
190 *
src = dst + extra_before * dst_stride + (extra_before << ps);
191 *src_stride = dst_stride;
194 #define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off) \
195 emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, x_off, y_off, block_w, block_h, wrap_enabled, is_chroma, \
196 is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE, is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER)
198 #define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \
199 emulated_edge(lc, dst, src, src_stride, ref, x_sb, y_sb, x_off, y_off, block_w, block_h, wrap_enabled, is_chroma, \
200 is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE, is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER)
202 #define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \
203 emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, x_off, y_off, pred_w, pred_h, wrap_enabled, 0, \
204 BILINEAR_EXTRA_BEFORE, BILINEAR_EXTRA_AFTER)
213 const int weight_flag = (
IS_P(sh->
r) &&
pps->r->pps_weighted_pred_flag) ||
214 (
IS_B(sh->
r) &&
pps->r->pps_weighted_bipred_flag);
219 *denom =
w->log2_denom[c_idx > 0];
220 *wx =
w->weight[lx][c_idx][mvf->
ref_idx[lx]];
221 *ox =
w->offset[lx][c_idx][mvf->
ref_idx[lx]];
233 const int bcw_idx = mvf->
bcw_idx;
234 const int weight_flag = (
IS_P(sh->
r) &&
pps->r->pps_weighted_pred_flag) ||
235 (
IS_B(sh->
r) &&
pps->r->pps_weighted_bipred_flag && !dmvr_flag);
236 if ((!weight_flag && !bcw_idx) || (bcw_idx && lc->
cu->
ciip_flag))
248 *denom =
w->log2_denom[c_idx > 0];
257 #define INTER_FILTER(t, frac) (is_chroma ? ff_vvc_inter_chroma_filters[t][frac] : ff_vvc_inter_luma_filters[t][frac])
260 int x_off,
int y_off,
const int block_w,
const int block_h,
const int c_idx)
264 const uint8_t *
src =
ref->frame->data[c_idx];
265 ptrdiff_t src_stride =
ref->frame->linesize[c_idx];
266 const int is_chroma = !!c_idx;
267 const int hs =
fc->ps.sps->hshift[c_idx];
268 const int vs =
fc->ps.sps->vshift[c_idx];
269 const int idx =
av_log2(block_w) - 1;
275 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
277 x_off +=
mv->x >> (4 + hs);
278 y_off +=
mv->y >> (4 + vs);
281 fc->vvcdsp.inter.put[is_chroma][idx][!!my][!!mx](dst,
src, src_stride, block_h, hf, vf, block_w);
285 const VVCFrame *
ref,
const MvField *mvf,
int x_off,
int y_off,
const int block_w,
const int block_h,
290 const uint8_t *
src =
ref->frame->data[c_idx];
291 ptrdiff_t src_stride =
ref->frame->linesize[c_idx];
293 const int hs =
fc->ps.sps->hshift[c_idx];
294 const int vs =
fc->ps.sps->vshift[c_idx];
295 const int idx =
av_log2(block_w) - 1;
296 const Mv *
mv = &mvf->
mv[lx];
297 const int is_chroma = !!c_idx;
303 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
306 x_off +=
mv->x >> (4 + hs);
307 y_off +=
mv->y >> (4 + vs);
311 fc->vvcdsp.inter.put_uni_w[is_chroma][idx][!!my][!!mx](dst, dst_stride,
src, src_stride,
312 block_h, denom, wx, ox, hf, vf, block_w);
314 fc->vvcdsp.inter.put_uni[is_chroma][idx][!!my][!!mx](dst, dst_stride,
src, src_stride,
315 block_h, hf, vf, block_w);
321 const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int c_idx,
322 const int sb_bdof_flag)
326 const int hs =
fc->ps.sps->hshift[c_idx];
327 const int vs =
fc->ps.sps->vshift[c_idx];
328 const int idx =
av_log2(block_w) - 1;
329 const VVCFrame *refs[] = { ref0, ref1 };
331 int denom, w0, w1, o0, o1;
333 const int is_chroma = !!c_idx;
336 for (
int i =
L0;
i <=
L1;
i++) {
340 const int ox = x_off + (
mv->x >> (4 + hs));
341 const int oy = y_off + (
mv->y >> (4 + vs));
343 ptrdiff_t src_stride =
ref->frame->linesize[c_idx];
344 const uint8_t *
src =
ref->frame->data[c_idx];
347 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
350 const int x_sb = x_off + (orig_mv->
mv[
i].
x >> (4 + hs));
351 const int y_sb = y_off + (orig_mv->
mv[
i].
y >> (4 + vs));
357 fc->vvcdsp.inter.put[is_chroma][idx][!!my][!!mx](
tmp[
i],
src, src_stride, block_h, hf, vf, block_w);
359 fc->vvcdsp.inter.bdof_fetch_samples(
tmp[
i],
src, src_stride, mx, my, block_w, block_h);
362 fc->vvcdsp.inter.apply_bdof(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
363 else if (weight_flag)
364 fc->vvcdsp.inter.w_avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h, denom, w0, w1, o0, o1);
366 fc->vvcdsp.inter.avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
371 #define SCALE_THRESHOLD_1 20480
372 #define SCALE_THRESHOLD_2 28672
384 #define INTER_FILTER_SCALED(scale) inter_filter_scaled(scale, is_chroma, is_affine)
386 #define SCALED_CHROMA_ADDIN(scale, collocated_flag) (is_chroma ? (collocated_flag ? 0 : 8 * (scale - (1 << 14))) : 0)
387 #define SCALED_REF_SB(off, scaling_off, ref_mv, scale, add, shift) ((((off - (scaling_off << shift)) << (4 + shift)) + ref_mv) * scale + add)
388 #define SCALED_REF(ref_sb, offset, shift) (FFSIGN(ref_sb) * ((FFABS(ref_sb) + (128 << is_chroma)) >> (8 + is_chroma)) + (offset << (10 - shift)) + (32 >> is_chroma))
389 #define SCALED_STEP(scale) ((scale + 8) >> 4)
392 int *x,
int *y,
int *dx,
int *dy)
396 const int is_chroma = !!c_idx;
397 const int hs =
sps->hshift[c_idx];
398 const int vs =
sps->vshift[c_idx];
399 const int left_offset =
fc->ref->scaling_win.left_offset;
400 const int top_offset =
fc->ref->scaling_win.top_offset;
413 const VVCFrame *
ref,
const int x,
const int y,
const int dx,
const int dy,
const int w,
const int h,
const int is_chroma)
421 const int block_w = x_end - x_off + (x_end == x_last);
422 const int block_h = *src_height = y_end - y_off + (y_end == y_last);
423 const int wrap_enabled = 0;
429 int x_off,
int y_off,
const int block_w,
const int block_h,
const int c_idx)
436 const int is_chroma = !!c_idx;
437 const int idx =
av_log2(block_w) - 1;
440 int x, y, dx, dy, src_height;
443 emulated_edge_scaled(lc, &
src, &src_stride, &src_height, refp->
ref, x, y, dx, dy, block_w, block_h, is_chroma);
444 fc->vvcdsp.inter.put_scaled[is_chroma][idx](dst,
src, src_stride, src_height, x, y, dx, dy, block_h, hf, vf, block_w);
448 const MvField *mvf,
const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int c_idx)
455 const Mv *
mv = &mvf->
mv[lx];
457 const int is_chroma = !!c_idx;
458 const int idx =
av_log2(block_w) - 1;
461 int denom, wx, ox, x, y, dx, dy, src_height;
464 emulated_edge_scaled(lc, &
src, &src_stride, &src_height, refp->
ref, x, y, dx, dy, block_w, block_h, is_chroma);
467 fc->vvcdsp.inter.put_uni_w_scaled[is_chroma][idx](dst, dst_stride,
src, src_stride, src_height,
468 x, y, dx, dy, block_h, denom, wx, ox, hf, vf, block_w);
470 fc->vvcdsp.inter.put_uni_scaled[is_chroma][idx](dst, dst_stride,
src, src_stride, src_height,
471 x, y, dx, dy, block_h, hf, vf, block_w);
477 const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int c_idx)
479 int denom, w0, w1, o0, o1;
482 const VVCRefPic *refps[] = { refp0, refp1 };
485 for (
int i =
L0;
i <=
L1;
i++) {
490 mc_scaled(lc,
tmp[
i], refp,
mv, x_off, y_off, block_w, block_h, c_idx);
492 mc(lc,
tmp[
i], refp->
ref,
mv, x_off, y_off, block_w, block_h, c_idx);
495 fc->vvcdsp.inter.w_avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h, denom, w0, w1, o0, o1);
497 fc->vvcdsp.inter.avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
501 const VVCFrame *
ref,
const MvField *mvf,
int x_off,
int y_off,
const int block_w,
const int block_h,
502 const int cb_prof_flag,
const int16_t *diff_mv_x,
const int16_t *diff_mv_y)
506 ptrdiff_t src_stride =
ref->frame->linesize[
LUMA];
508 const int idx =
av_log2(block_w) - 1;
510 const Mv *
mv = mvf->
mv + lx;
511 const int mx =
mv->x & 0xf;
512 const int my =
mv->y & 0xf;
517 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
518 const int is_chroma = 0;
526 fc->vvcdsp.inter.fetch_samples(prof_tmp,
src, src_stride, mx, my);
528 fc->vvcdsp.inter.apply_prof_uni(dst, dst_stride, prof_tmp, diff_mv_x, diff_mv_y);
530 fc->vvcdsp.inter.apply_prof_uni_w(dst, dst_stride, prof_tmp, diff_mv_x, diff_mv_y, denom, wx, ox);
533 fc->vvcdsp.inter.put_uni[
LUMA][idx][!!my][!!mx](dst, dst_stride,
src, src_stride, block_h, hf, vf, block_w);
535 fc->vvcdsp.inter.put_uni_w[
LUMA][idx][!!my][!!mx](dst, dst_stride,
src, src_stride, block_h, denom, wx, ox, hf, vf, block_w);
540 const Mv *
mv ,
const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int lx)
544 const int mx =
mv->x & 0xf;
545 const int my =
mv->y & 0xf;
546 const int ox = x_off + (
mv->x >> 4);
547 const int oy = y_off + (
mv->y >> 4);
548 const int idx =
av_log2(block_w) - 1;
549 const int is_chroma = 0;
551 ptrdiff_t src_stride =
ref->frame->linesize[
LUMA];
555 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
559 fc->vvcdsp.inter.put[
LUMA][idx][!!my][!!mx](dst,
src, src_stride, block_h, hf, vf, block_w);
562 fc->vvcdsp.inter.fetch_samples(prof_tmp,
src, src_stride, mx, my);
569 const int block_w,
const int block_h)
572 const VVCRefPic *refps[] = { ref0, ref1 };
574 int denom, w0, w1, o0, o1;
575 const int weight_flag =
derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf,
LUMA, 0);
577 for (
int i =
L0;
i <=
L1;
i++) {
588 fc->vvcdsp.inter.w_avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h, denom, w0, w1, o0, o1);
590 fc->vvcdsp.inter.avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
598 if (
mv->pred_flag &
mask) {
600 refp[lx] = rpl[lx].
refs +
mv->ref_idx[lx];
608 #define POS(c_idx, x, y) \
609 &fc->frame->data[c_idx][((y) >> fc->ps.sps->vshift[c_idx]) * fc->frame->linesize[c_idx] + \
610 (((x) >> fc->ps.sps->hshift[c_idx]) << fc->ps.sps->pixel_shift)]
627 const int c_end =
fc->ps.sps->r->sps_chroma_format_idc ? 3 : 1;
631 for (
int c_idx = 0; c_idx < c_end; c_idx++) {
632 const int hs =
fc->ps.sps->hshift[c_idx];
633 const int vs =
fc->ps.sps->vshift[c_idx];
634 const int x = lc->
cu->
x0 >> hs;
635 const int y = lc->
cu->
y0 >> vs;
639 ptrdiff_t dst_stride =
fc->frame->linesize[c_idx];
641 int step_x = 1 << hs;
645 }
else if (mirror_type == 1) {
653 for (
int i = 0;
i < 2;
i++) {
655 const int lx =
mv->pred_flag -
PF_L0;
679 const int min_pu_width =
fc->ps.pps->min_pu_width;
692 const int x0,
const int y0,
const int sbw,
const int sbh,
const int sb_bdof_flag,
const int c_start)
695 const int c_end =
fc->ps.sps->r->sps_chroma_format_idc ?
CR :
LUMA;
701 for (
int c_idx = c_start; c_idx <= c_end; c_idx++) {
702 uint8_t *dst =
POS(c_idx, x0, y0);
703 const ptrdiff_t dst_stride =
fc->frame->linesize[c_idx];
704 const int hs =
fc->ps.sps->hshift[c_idx];
705 const int vs =
fc->ps.sps->vshift[c_idx];
706 const int x = x0 >> hs;
707 const int y = y0 >> vs;
708 const int w = sbw >> hs;
709 const int h = sbh >> vs;
710 const int is_luma = !c_idx;
711 const int do_ciip = lc->
cu->
ciip_flag && (is_luma || (
w > 2));
712 uint8_t *inter = do_ciip ? (uint8_t *)lc->
ciip_tmp : dst;
713 const ptrdiff_t inter_stride = do_ciip ? (
MAX_PB_SIZE *
sizeof(uint16_t)) : dst_stride;
714 const int do_bdof = is_luma && sb_bdof_flag;
719 if (refp[lx]->is_scaled) {
723 mc_uni(lc, inter, inter_stride, refp[lx]->
ref, mvf,
727 if (refp[
L0]->is_scaled || refp[
L1]->is_scaled) {
731 mc_bi(lc, inter, inter_stride, refp[
L0]->
ref, refp[
L1]->
ref, mvf, orig_mvf,
732 x, y,
w,
h, c_idx, do_bdof);
737 fc->vvcdsp.intra.intra_pred(lc, x0, y0, sbw, sbh, c_idx);
739 fc->vvcdsp.lmcs.filter(inter, inter_stride,
w,
h, &
fc->ps.lmcs.fwd_lut);
740 fc->vvcdsp.inter.put_ciip(dst, dst_stride,
w,
h, inter, inter_stride, intra_weight);
748 const int sad_minus = sad[-
stride];
749 const int sad_center = sad[0];
750 const int sad_plus = sad[
stride];
752 int denom = (( sad_minus + sad_plus) - (sad_center << 1 ) ) << 3;
756 if (sad_minus == sad_center)
758 else if (sad_plus == sad_center)
761 int num = ( sad_minus - sad_plus ) * (1 << 4);
769 while (counter > 0) {
770 counter = counter - 1;
771 quotient = quotient << 1;
772 if ( num >= denom ) {
774 quotient = quotient + 1;
776 denom = (denom >> 1);
787 #define SAD_ARRAY_SIZE 5
790 const VVCFrame *ref0,
const VVCFrame *ref1,
const int x_off,
const int y_off,
const int block_w,
const int block_h)
793 const int sr_range = 2;
794 const VVCFrame *refs[] = { ref0, ref1 };
797 int min_dx, min_dy, min_sad, dx, dy;
800 min_dx = min_dy = dx = dy = 2;
802 for (
int i =
L0;
i <=
L1;
i++) {
803 const int pred_w = block_w + 2 * sr_range;
804 const int pred_h = block_h + 2 * sr_range;
806 const int mx =
mv->x & 0xf;
807 const int my =
mv->y & 0xf;
808 const int ox = x_off + (
mv->x >> 4) - sr_range;
809 const int oy = y_off + (
mv->y >> 4) - sr_range;
811 ptrdiff_t src_stride =
ref->frame->linesize[
LUMA];
813 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
816 fc->vvcdsp.inter.dmvr[!!my][!!mx](
tmp[
i],
src, src_stride,
pred_h, mx, my, pred_w);
819 min_sad =
fc->vvcdsp.inter.sad(
tmp[
L0],
tmp[
L1], dx, dy, block_w, block_h);
820 min_sad -= min_sad >> 2;
821 sad[dy][dx] = min_sad;
823 if (min_sad >= block_w * block_h) {
828 if (dx != sr_range || dy != sr_range) {
829 sad[dy][dx] =
fc->vvcdsp.inter.sad(lc->
tmp, lc->
tmp1, dx, dy, block_w, block_h);
830 if (sad[dy][dx] < min_sad) {
831 min_sad = sad[dy][dx];
838 dmv[0] = (min_dx - sr_range) * (1 << 4);
839 dmv[1] = (min_dy - sr_range) * (1 << 4);
840 if (min_dx != 0 && min_dx != 4 && min_dy != 0 && min_dy != 4) {
845 for (
int i =
L0;
i <=
L1;
i++) {
847 mv->x += (1 - 2 *
i) * dmv[0];
848 mv->y += (1 - 2 *
i) * dmv[1];
852 if (min_sad < 2 * block_w * block_h) {
866 fc->ref->tab_dmvr_mvf[idx] = *mvf;
872 const int x0,
const int y0,
const int sbw,
const int sbh)
895 int sbw, sbh, sb_bdof_flag = 0;
903 for (
int sby = 0; sby <
mi->num_sb_y; sby++) {
904 for (
int sbx = 0; sbx <
mi->num_sb_x; sbx++) {
905 const int x0 = cu->
x0 + sbx * sbw;
906 const int y0 = cu->
y0 + sby * sbh;
918 const int x0,
const int y0,
const int sbw,
const int sbh)
920 const int hs =
fc->ps.sps->hshift[1];
921 const int vs =
fc->ps.sps->vshift[1];
927 mvc->
mv[0].
x += (
unsigned int)mv2->
mv[0].
x;
928 mvc->
mv[0].
y += (
unsigned int)mv2->
mv[0].
y;
929 mvc->
mv[1].
x += (
unsigned int)mv2->
mv[1].
x;
930 mvc->
mv[1].
y += (
unsigned int)mv2->
mv[1].
y;
941 const int x0 = cu->
x0;
942 const int y0 = cu->
y0;
945 const int hs =
fc->ps.sps->hshift[1];
946 const int vs =
fc->ps.sps->vshift[1];
947 const int dst_stride =
fc->frame->linesize[
LUMA];
949 for (
int sby = 0; sby <
mi->num_sb_y; sby++) {
950 for (
int sbx = 0; sbx <
mi->num_sb_x; sbx++) {
951 const int x = x0 + sbx * sbw;
952 const int y = y0 + sby * sbh;
954 uint8_t *dst0 =
POS(0, x, y);
962 const int lx =
mi->pred_flag -
PF_L0;
963 if (refp[lx]->is_scaled) {
973 if (
fc->ps.sps->r->sps_chroma_format_idc) {
1000 uint8_t* dst0 =
POS(0, cu->
x0, cu->
y0);
1013 const CTU *ctu =
fc->tab.ctus + rs;