Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -142,25 +142,13 @@ static void emulated_edge_bilinear(const VVCLocalContext *lc, uint8_t *dst, cons · 141 unmodified lines | ||
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | −#define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off) \ | |
| 145 | +#define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off) \ | |
| 146 | 146 | emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, is_chroma) |
| 147 | 147 | |
| 148 | −#define EMULATED_EDGE_LUMA(dst, src, src_stride, x_off, y_off) \ | |
| 149 | − emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 0) | |
| 150 | − | |
| 151 | −#define EMULATED_EDGE_CHROMA(dst, src, src_stride, x_off, y_off) \ | |
| 152 | − emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 1) | |
| 153 | − | |
| 154 | 148 | #define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ |
| 155 | 149 | emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, is_chroma) |
| 156 | 150 | |
| 157 | −#define EMULATED_EDGE_DMVR_LUMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ | |
| 158 | − emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 0) | |
| 159 | − | |
| 160 | −#define EMULATED_EDGE_DMVR_CHROMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ | |
| 161 | − emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 1) | |
| 162 | − | |
| 163 | −#define EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \ | |
| 151 | +#define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \ | |
| 164 | 152 | emulated_edge_bilinear(lc, dst, src, src_stride, x_off, y_off, pred_w, pred_h) |
| 165 | 153 | |
| 166 | 154 | // part of 8.5.6.6 Weighted sample prediction process |
| @@ -336,12 +324,13 @@ static void luma_prof_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst · 169 unmodified lines | ||
| 336 | 324 | const int8_t *vf = ff_vvc_inter_luma_filters[2][my]; |
| 337 | 325 | int denom, wx, ox; |
| 338 | 326 | const int weight_flag = derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA); |
| 327 | + const int is_chroma = 0; | |
| 339 | 328 | |
| 340 | 329 | x_off += mv->x >> 4; |
| 341 | 330 | y_off += mv->y >> 4; |
| 342 | 331 | src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); |
| 343 | 332 | |
| 344 | − EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); | |
| 333 | + MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); | |
| 345 | 334 | if (cb_prof_flag) { |
| 346 | 335 | fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](prof_tmp, src, src_stride, AFFINE_MIN_BLOCK_SIZE, hf, vf, AFFINE_MIN_BLOCK_SIZE); |
| 347 | 336 | fc->vvcdsp.inter.fetch_samples(prof_tmp, src, src_stride, mx, my); |
| @@ -369,6 +358,7 @@ static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_ · 21 unmodified lines | ||
| 369 | 358 | const int idx = av_log2(block_w) - 1; |
| 370 | 359 | int denom, w0, w1, o0, o1; |
| 371 | 360 | const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, LUMA, 0); |
| 361 | + const int is_chroma = 0; | |
| 372 | 362 | |
| 373 | 363 | for (int i = L0; i <= L1; i++) { |
| 374 | 364 | const Mv *mv = mvf->mv + i; |
| @@ -381,7 +371,7 @@ static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_ · 6 unmodified lines | ||
| 381 | 371 | const int8_t *hf = ff_vvc_inter_luma_filters[2][mx]; |
| 382 | 372 | const int8_t *vf = ff_vvc_inter_luma_filters[2][my]; |
| 383 | 373 | |
| 384 | − EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, ox, oy); | |
| 374 | + MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, ox, oy); | |
| 385 | 375 | if (!pu->cb_prof_flag[i]) { |
| 386 | 376 | fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w); |
| 387 | 377 | } else { |
| @@ -654,7 +644,7 @@ static void dmvr_mv_refine(VVCLocalContext *lc, MvField *mvf, MvField *orig_mv, · 266 unmodified lines | ||
| 654 | 644 | const int oy = y_off + (mv->y >> 4) - sr_range; |
| 655 | 645 | ptrdiff_t src_stride = ref[i]->linesize[LUMA]; |
| 656 | 646 | const uint8_t *src = ref[i]->data[LUMA] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); |
| 657 | − EMULATED_EDGE_BILINEAR(lc->edge_emu_buffer, &src, &src_stride, ox, oy); | |
| 647 | + MC_EMULATED_EDGE_BILINEAR(lc->edge_emu_buffer, &src, &src_stride, ox, oy); | |
| 658 | 648 | fc->vvcdsp.inter.dmvr[!!my][!!mx](tmp[i], src, src_stride, pred_h, mx, my, pred_w); |
| 659 | 649 | } |
| 660 | 650 | |