30 #define PROF_TEMP_OFFSET (MAX_PB_SIZE + 32)
37 const int hs =
sps->hshift[is_chroma];
38 const int vs =
sps->vshift[is_chroma];
40 r->l =
pps->subpic_x[subpic_idx] >> hs;
41 r->t =
pps->subpic_y[subpic_idx] >> vs;
42 r->r =
r->l + (
pps->subpic_width[subpic_idx] >> hs);
43 r->b =
r->t + (
pps->subpic_height[subpic_idx] >> vs);
49 const int l = dmvr_clip ?
FFMIN(
FFMAX(subpic->
l, sb->
l), subpic->
r - 1) : subpic->
l;
50 const int t = dmvr_clip ?
FFMIN(
FFMAX(subpic->
t, sb->
t), subpic->
b - 1) : subpic->
t;
51 const int r = dmvr_clip ?
FFMAX(
FFMIN(subpic->
r, sb->
r), subpic->
l + 1) : subpic->
r;
52 const int b = dmvr_clip ?
FFMAX(
FFMIN(subpic->
b, sb->
b), subpic->
t + 1) : subpic->
b;
61 const uint8_t **
src, ptrdiff_t *src_stride,
62 int x_off,
int y_off,
const int block_w,
const int block_h,
63 const int extra_before,
const int extra_after,
67 const int extra = extra_before + extra_after;
68 int pic_width, pic_height;
70 *
src += y_off * *src_stride + (x_off * (1 <<
fc->ps.sps->pixel_shift));
72 clip_to_subpic(&x_off, &y_off, &pic_width, &pic_height, subpic, sb, dmvr_clip);
74 if (dmvr_clip || x_off < extra_before || y_off < extra_before ||
75 x_off >= pic_width - block_w - extra_after ||
76 y_off >= pic_height - block_h - extra_after) {
77 const int ps =
fc->ps.sps->pixel_shift;
79 const int offset = extra_before * *src_stride + (extra_before << ps);
80 const int buf_offset = extra_before * edge_emu_stride + (extra_before << ps);
82 fc->vdsp.emulated_edge_mc(dst, *
src -
offset, edge_emu_stride, *src_stride,
83 block_w + extra, block_h + extra, x_off - extra_before, y_off - extra_before,
84 pic_width, pic_height);
86 *
src = dst + buf_offset;
87 *src_stride = edge_emu_stride;
92 const uint8_t *
src,
const ptrdiff_t src_stride,
const int ps,
93 int x_off,
int y_off,
const int block_w,
const int block_h,
97 int pic_width, pic_height;
99 src += y_off * src_stride + x_off * (1 << ps);
101 clip_to_subpic(&x_off, &y_off, &pic_width, &pic_height, subpic, half_sb, dmvr_clip);
103 fc->vdsp.emulated_edge_mc(dst,
src, dst_stride, src_stride,
104 block_w, block_h, x_off, y_off, pic_width, pic_height);
119 const uint8_t **
src, ptrdiff_t *src_stride,
const VVCFrame *src_frame,
120 int x_sb,
int y_sb,
int x_off,
int y_off,
int block_w,
int block_h,
const int wrap_enabled,
121 const int is_chroma,
const int extra_before,
const int extra_after)
125 const int ps =
sps->pixel_shift;
127 const int extra = extra_before + extra_after;
128 const int dmvr_clip = x_sb != x_off || y_sb != y_off;
129 const int dmvr_left =
FFMAX(x_off, x_sb) - extra_before;
130 const int dmvr_right =
FFMIN(x_off, x_sb) + block_w + extra_after;
131 const int left = x_off - extra_before;
132 const int top = y_off - extra_before;
133 const int pic_width =
pps->width >>
sps->hshift[is_chroma];
134 const int wrap =
pps->ref_wraparound_offset << (
sps->min_cb_log2_size_y -
sps->hshift[is_chroma]);
136 VVCRect sb = { x_sb - extra_before, y_sb - extra_before, x_sb + block_w + extra_after, y_sb + block_h + extra_after };
141 if (!wrap_enabled || (dmvr_left >= 0 && dmvr_right <= pic_width)) {
143 x_off, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip);
146 if (dmvr_right <= 0) {
149 x_off +
wrap, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip);
152 if (dmvr_left >= pic_width) {
155 x_off -
wrap, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip);
163 if (dmvr_left < 0 ) {
167 left +
wrap, top,
w, block_h, &subpic, &half_sb, dmvr_clip);
171 0, top, block_w -
w, block_h, &subpic, &half_sb, dmvr_clip);
173 const int w = pic_width -
left;
174 VVCRect half_sb = { sb.
l, sb.
t, pic_width, sb.
b };
176 left, top,
w, block_h, &subpic, &half_sb, dmvr_clip);
180 pic_width -
wrap , top, block_w -
w, block_h, &subpic, &half_sb, dmvr_clip);
183 *
src = dst + extra_before * dst_stride + (extra_before << ps);
184 *src_stride = dst_stride;
187 #define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off) \
188 emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, x_off, y_off, block_w, block_h, wrap_enabled, is_chroma, \
189 is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE, is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER)
191 #define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \
192 emulated_edge(lc, dst, src, src_stride, ref, x_sb, y_sb, x_off, y_off, block_w, block_h, wrap_enabled, is_chroma, \
193 is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE, is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER)
195 #define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \
196 emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, x_off, y_off, pred_w, pred_h, wrap_enabled, 0, \
197 BILINEAR_EXTRA_BEFORE, BILINEAR_EXTRA_AFTER)
206 const int weight_flag = (
IS_P(sh->
r) &&
pps->r->pps_weighted_pred_flag) ||
207 (
IS_B(sh->
r) &&
pps->r->pps_weighted_bipred_flag);
212 *denom =
w->log2_denom[c_idx > 0];
213 *wx =
w->weight[lx][c_idx][mvf->
ref_idx[lx]];
214 *ox =
w->offset[lx][c_idx][mvf->
ref_idx[lx]];
226 const int bcw_idx = mvf->
bcw_idx;
227 const int weight_flag = (
IS_P(sh->
r) &&
pps->r->pps_weighted_pred_flag) ||
228 (
IS_B(sh->
r) &&
pps->r->pps_weighted_bipred_flag && !dmvr_flag);
229 if ((!weight_flag && !bcw_idx) || (bcw_idx && lc->
cu->
ciip_flag))
241 *denom =
w->log2_denom[c_idx > 0];
250 #define INTER_FILTER(t, frac) (is_chroma ? ff_vvc_inter_chroma_filters[t][frac] : ff_vvc_inter_luma_filters[t][frac])
253 int x_off,
int y_off,
const int block_w,
const int block_h,
const int c_idx)
257 const uint8_t *
src =
ref->frame->data[c_idx];
258 ptrdiff_t src_stride =
ref->frame->linesize[c_idx];
259 const int is_chroma = !!c_idx;
260 const int hs =
fc->ps.sps->hshift[c_idx];
261 const int vs =
fc->ps.sps->vshift[c_idx];
262 const int idx =
av_log2(block_w) - 1;
268 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
270 x_off +=
mv->x >> (4 + hs);
271 y_off +=
mv->y >> (4 + vs);
274 fc->vvcdsp.inter.put[is_chroma][idx][!!my][!!mx](dst,
src, src_stride, block_h, hf, vf, block_w);
278 const VVCFrame *
ref,
const MvField *mvf,
int x_off,
int y_off,
const int block_w,
const int block_h,
283 const uint8_t *
src =
ref->frame->data[c_idx];
284 ptrdiff_t src_stride =
ref->frame->linesize[c_idx];
286 const int hs =
fc->ps.sps->hshift[c_idx];
287 const int vs =
fc->ps.sps->vshift[c_idx];
288 const int idx =
av_log2(block_w) - 1;
289 const Mv *
mv = &mvf->
mv[lx];
290 const int is_chroma = !!c_idx;
296 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
299 x_off +=
mv->x >> (4 + hs);
300 y_off +=
mv->y >> (4 + vs);
304 fc->vvcdsp.inter.put_uni_w[is_chroma][idx][!!my][!!mx](dst, dst_stride,
src, src_stride,
305 block_h, denom, wx, ox, hf, vf, block_w);
307 fc->vvcdsp.inter.put_uni[is_chroma][idx][!!my][!!mx](dst, dst_stride,
src, src_stride,
308 block_h, hf, vf, block_w);
314 const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int c_idx,
315 const int sb_bdof_flag)
319 const int hs =
fc->ps.sps->hshift[c_idx];
320 const int vs =
fc->ps.sps->vshift[c_idx];
321 const int idx =
av_log2(block_w) - 1;
322 const VVCFrame *refs[] = { ref0, ref1 };
324 int denom, w0, w1, o0, o1;
326 const int is_chroma = !!c_idx;
329 for (
int i =
L0;
i <=
L1;
i++) {
333 const int ox = x_off + (
mv->x >> (4 + hs));
334 const int oy = y_off + (
mv->y >> (4 + vs));
336 ptrdiff_t src_stride =
ref->frame->linesize[c_idx];
337 const uint8_t *
src =
ref->frame->data[c_idx];
340 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
343 const int x_sb = x_off + (orig_mv->
mv[
i].
x >> (4 + hs));
344 const int y_sb = y_off + (orig_mv->
mv[
i].
y >> (4 + vs));
350 fc->vvcdsp.inter.put[is_chroma][idx][!!my][!!mx](
tmp[
i],
src, src_stride, block_h, hf, vf, block_w);
352 fc->vvcdsp.inter.bdof_fetch_samples(
tmp[
i],
src, src_stride, mx, my, block_w, block_h);
355 fc->vvcdsp.inter.apply_bdof(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
356 else if (weight_flag)
357 fc->vvcdsp.inter.w_avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h, denom, w0, w1, o0, o1);
359 fc->vvcdsp.inter.avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
364 #define SCALE_THRESHOLD_1 20480
365 #define SCALE_THRESHOLD_2 28672
377 #define INTER_FILTER_SCALED(scale) inter_filter_scaled(scale, is_chroma, is_affine)
379 #define SCALED_CHROMA_ADDIN(scale, collocated_flag) (is_chroma ? (collocated_flag ? 0 : 8 * (scale - (1 << 14))) : 0)
380 #define SCALED_REF_SB(off, scaling_off, ref_mv, scale, add, shift) ((((off - (scaling_off << shift)) << (4 + shift)) + ref_mv) * scale + add)
381 #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))
382 #define SCALED_STEP(scale) ((scale + 8) >> 4)
385 int *x,
int *y,
int *dx,
int *dy)
389 const int is_chroma = !!c_idx;
390 const int hs =
sps->hshift[c_idx];
391 const int vs =
sps->vshift[c_idx];
392 const int left_offset =
fc->ref->scaling_win.left_offset;
393 const int top_offset =
fc->ref->scaling_win.top_offset;
406 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)
414 const int block_w = x_end - x_off + (x_end == x_last);
415 const int block_h = *src_height = y_end - y_off + (y_end == y_last);
416 const int wrap_enabled = 0;
422 int x_off,
int y_off,
const int block_w,
const int block_h,
const int c_idx)
429 const int is_chroma = !!c_idx;
430 const int idx =
av_log2(block_w) - 1;
433 int x, y, dx, dy, src_height;
436 emulated_edge_scaled(lc, &
src, &src_stride, &src_height, refp->
ref, x, y, dx, dy, block_w, block_h, is_chroma);
437 fc->vvcdsp.inter.put_scaled[is_chroma][idx](dst,
src, src_stride, src_height, x, y, dx, dy, block_h, hf, vf, block_w);
441 const MvField *mvf,
const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int c_idx)
448 const Mv *
mv = &mvf->
mv[lx];
450 const int is_chroma = !!c_idx;
451 const int idx =
av_log2(block_w) - 1;
454 int denom, wx, ox, x, y, dx, dy, src_height;
457 emulated_edge_scaled(lc, &
src, &src_stride, &src_height, refp->
ref, x, y, dx, dy, block_w, block_h, is_chroma);
460 fc->vvcdsp.inter.put_uni_w_scaled[is_chroma][idx](dst, dst_stride,
src, src_stride, src_height,
461 x, y, dx, dy, block_h, denom, wx, ox, hf, vf, block_w);
463 fc->vvcdsp.inter.put_uni_scaled[is_chroma][idx](dst, dst_stride,
src, src_stride, src_height,
464 x, y, dx, dy, block_h, hf, vf, block_w);
470 const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int c_idx)
472 int denom, w0, w1, o0, o1;
475 const VVCRefPic *refps[] = { refp0, refp1 };
478 for (
int i =
L0;
i <=
L1;
i++) {
483 mc_scaled(lc,
tmp[
i], refp,
mv, x_off, y_off, block_w, block_h, c_idx);
485 mc(lc,
tmp[
i], refp->
ref,
mv, x_off, y_off, block_w, block_h, c_idx);
488 fc->vvcdsp.inter.w_avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h, denom, w0, w1, o0, o1);
490 fc->vvcdsp.inter.avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
494 const VVCFrame *
ref,
const MvField *mvf,
int x_off,
int y_off,
const int block_w,
const int block_h,
495 const int cb_prof_flag,
const int16_t *diff_mv_x,
const int16_t *diff_mv_y)
499 ptrdiff_t src_stride =
ref->frame->linesize[
LUMA];
501 const int idx =
av_log2(block_w) - 1;
503 const Mv *
mv = mvf->
mv + lx;
504 const int mx =
mv->x & 0xf;
505 const int my =
mv->y & 0xf;
510 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
511 const int is_chroma = 0;
519 fc->vvcdsp.inter.fetch_samples(prof_tmp,
src, src_stride, mx, my);
521 fc->vvcdsp.inter.apply_prof_uni(dst, dst_stride, prof_tmp, diff_mv_x, diff_mv_y);
523 fc->vvcdsp.inter.apply_prof_uni_w(dst, dst_stride, prof_tmp, diff_mv_x, diff_mv_y, denom, wx, ox);
526 fc->vvcdsp.inter.put_uni[
LUMA][idx][!!my][!!mx](dst, dst_stride,
src, src_stride, block_h, hf, vf, block_w);
528 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);
533 const Mv *
mv ,
const int x_off,
const int y_off,
const int block_w,
const int block_h,
const int lx)
537 const int mx =
mv->x & 0xf;
538 const int my =
mv->y & 0xf;
539 const int ox = x_off + (
mv->x >> 4);
540 const int oy = y_off + (
mv->y >> 4);
541 const int idx =
av_log2(block_w) - 1;
542 const int is_chroma = 0;
544 ptrdiff_t src_stride =
ref->frame->linesize[
LUMA];
548 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
552 fc->vvcdsp.inter.put[
LUMA][idx][!!my][!!mx](dst,
src, src_stride, block_h, hf, vf, block_w);
555 fc->vvcdsp.inter.fetch_samples(prof_tmp,
src, src_stride, mx, my);
562 const int block_w,
const int block_h)
565 const VVCRefPic *refps[] = { ref0, ref1 };
567 int denom, w0, w1, o0, o1;
568 const int weight_flag =
derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf,
LUMA, 0);
570 for (
int i =
L0;
i <=
L1;
i++) {
581 fc->vvcdsp.inter.w_avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h, denom, w0, w1, o0, o1);
583 fc->vvcdsp.inter.avg(dst, dst_stride,
tmp[
L0],
tmp[
L1], block_w, block_h);
591 if (
mv->pred_flag &
mask) {
593 refp[lx] = rpl[lx].
refs +
mv->ref_idx[lx];
601 #define POS(c_idx, x, y) \
602 &fc->frame->data[c_idx][((y) >> fc->ps.sps->vshift[c_idx]) * fc->frame->linesize[c_idx] + \
603 (((x) >> fc->ps.sps->hshift[c_idx]) << fc->ps.sps->pixel_shift)]
620 const int c_end =
fc->ps.sps->r->sps_chroma_format_idc ? 3 : 1;
624 for (
int c_idx = 0; c_idx < c_end; c_idx++) {
625 const int hs =
fc->ps.sps->hshift[c_idx];
626 const int vs =
fc->ps.sps->vshift[c_idx];
627 const int x = lc->
cu->
x0 >> hs;
628 const int y = lc->
cu->
y0 >> vs;
632 ptrdiff_t dst_stride =
fc->frame->linesize[c_idx];
634 int step_x = 1 << hs;
638 }
else if (mirror_type == 1) {
646 for (
int i = 0;
i < 2;
i++) {
648 const int lx =
mv->pred_flag -
PF_L0;
672 const int min_pu_width =
fc->ps.pps->min_pu_width;
685 const int x0,
const int y0,
const int sbw,
const int sbh,
const int sb_bdof_flag,
const int c_start)
688 const int c_end =
fc->ps.sps->r->sps_chroma_format_idc ?
CR :
LUMA;
694 for (
int c_idx = c_start; c_idx <= c_end; c_idx++) {
695 uint8_t *dst =
POS(c_idx, x0, y0);
696 const ptrdiff_t dst_stride =
fc->frame->linesize[c_idx];
697 const int hs =
fc->ps.sps->hshift[c_idx];
698 const int vs =
fc->ps.sps->vshift[c_idx];
699 const int x = x0 >> hs;
700 const int y = y0 >> vs;
701 const int w = sbw >> hs;
702 const int h = sbh >> vs;
703 const int is_luma = !c_idx;
704 const int do_ciip = lc->
cu->
ciip_flag && (is_luma || (
w > 2));
705 uint8_t *inter = do_ciip ? (uint8_t *)lc->
ciip_tmp : dst;
706 const ptrdiff_t inter_stride = do_ciip ? (
MAX_PB_SIZE *
sizeof(uint16_t)) : dst_stride;
707 const int do_bdof = is_luma && sb_bdof_flag;
712 if (refp[lx]->is_scaled) {
716 mc_uni(lc, inter, inter_stride, refp[lx]->
ref, mvf,
720 if (refp[
L0]->is_scaled || refp[
L1]->is_scaled) {
724 mc_bi(lc, inter, inter_stride, refp[
L0]->
ref, refp[
L1]->
ref, mvf, orig_mvf,
725 x, y,
w,
h, c_idx, do_bdof);
730 fc->vvcdsp.intra.intra_pred(lc, x0, y0, sbw, sbh, c_idx);
732 fc->vvcdsp.lmcs.filter(inter, inter_stride,
w,
h, &
fc->ps.lmcs.fwd_lut);
733 fc->vvcdsp.inter.put_ciip(dst, dst_stride,
w,
h, inter, inter_stride, intra_weight);
741 const int sad_minus = sad[-
stride];
742 const int sad_center = sad[0];
743 const int sad_plus = sad[
stride];
745 int denom = (( sad_minus + sad_plus) - (sad_center << 1 ) ) << 3;
749 if (sad_minus == sad_center)
751 else if (sad_plus == sad_center)
754 int num = ( sad_minus - sad_plus ) * (1 << 4);
762 while (counter > 0) {
763 counter = counter - 1;
764 quotient = quotient << 1;
765 if ( num >= denom ) {
767 quotient = quotient + 1;
769 denom = (denom >> 1);
780 #define SAD_ARRAY_SIZE 5
783 const VVCFrame *ref0,
const VVCFrame *ref1,
const int x_off,
const int y_off,
const int block_w,
const int block_h)
786 const int sr_range = 2;
787 const VVCFrame *refs[] = { ref0, ref1 };
790 int min_dx, min_dy, min_sad, dx, dy;
793 min_dx = min_dy = dx = dy = 2;
795 for (
int i =
L0;
i <=
L1;
i++) {
796 const int pred_w = block_w + 2 * sr_range;
797 const int pred_h = block_h + 2 * sr_range;
799 const int mx =
mv->x & 0xf;
800 const int my =
mv->y & 0xf;
801 const int ox = x_off + (
mv->x >> 4) - sr_range;
802 const int oy = y_off + (
mv->y >> 4) - sr_range;
804 ptrdiff_t src_stride =
ref->frame->linesize[
LUMA];
806 const int wrap_enabled =
fc->ps.pps->r->pps_ref_wraparound_enabled_flag;
809 fc->vvcdsp.inter.dmvr[!!my][!!mx](
tmp[
i],
src, src_stride,
pred_h, mx, my, pred_w);
812 min_sad =
fc->vvcdsp.inter.sad(
tmp[
L0],
tmp[
L1], dx, dy, block_w, block_h);
813 min_sad -= min_sad >> 2;
814 sad[dy][dx] = min_sad;
816 if (min_sad >= block_w * block_h) {
821 if (dx != sr_range || dy != sr_range) {
822 sad[dy][dx] =
fc->vvcdsp.inter.sad(lc->
tmp, lc->
tmp1, dx, dy, block_w, block_h);
823 if (sad[dy][dx] < min_sad) {
824 min_sad = sad[dy][dx];
831 dmv[0] = (min_dx - sr_range) * (1 << 4);
832 dmv[1] = (min_dy - sr_range) * (1 << 4);
833 if (min_dx != 0 && min_dx != 4 && min_dy != 0 && min_dy != 4) {
838 for (
int i =
L0;
i <=
L1;
i++) {
840 mv->x += (1 - 2 *
i) * dmv[0];
841 mv->y += (1 - 2 *
i) * dmv[1];
845 if (min_sad < 2 * block_w * block_h) {
859 fc->ref->tab_dmvr_mvf[idx] = *mvf;
865 const int x0,
const int y0,
const int sbw,
const int sbh)
888 int sbw, sbh, sb_bdof_flag = 0;
896 for (
int sby = 0; sby <
mi->num_sb_y; sby++) {
897 for (
int sbx = 0; sbx <
mi->num_sb_x; sbx++) {
898 const int x0 = cu->
x0 + sbx * sbw;
899 const int y0 = cu->
y0 + sby * sbh;
911 const int x0,
const int y0,
const int sbw,
const int sbh)
913 const int hs =
fc->ps.sps->hshift[1];
914 const int vs =
fc->ps.sps->vshift[1];
920 mvc->
mv[0].
x += (
unsigned int)mv2->
mv[0].
x;
921 mvc->
mv[0].
y += (
unsigned int)mv2->
mv[0].
y;
922 mvc->
mv[1].
x += (
unsigned int)mv2->
mv[1].
x;
923 mvc->
mv[1].
y += (
unsigned int)mv2->
mv[1].
y;
934 const int x0 = cu->
x0;
935 const int y0 = cu->
y0;
938 const int hs =
fc->ps.sps->hshift[1];
939 const int vs =
fc->ps.sps->vshift[1];
940 const int dst_stride =
fc->frame->linesize[
LUMA];
942 for (
int sby = 0; sby <
mi->num_sb_y; sby++) {
943 for (
int sbx = 0; sbx <
mi->num_sb_x; sbx++) {
944 const int x = x0 + sbx * sbw;
945 const int y = y0 + sby * sbh;
947 uint8_t *dst0 =
POS(0, x, y);
955 const int lx =
mi->pred_flag -
PF_L0;
956 if (refp[lx]->is_scaled) {
966 if (
fc->ps.sps->r->sps_chroma_format_idc) {
993 uint8_t* dst0 =
POS(0, cu->
x0, cu->
y0);