History

avcodec/vvcdec: misc, remove unused EMULATED_EDGE_{LUMA, CHROMA}, EMULATED_EDGE_DMVR_{LUAM, CHROMA}

Nuo Mi committed 2 years ago

Commit 875fa961 parent 84a93d91 file · +7 −17Browse files

Unified · Split

libavcodec/vvc/inter.c+7−17
@@ -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 emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, is_chroma)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#define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \148#define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \
155 emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, is_chroma)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) \151#define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, 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) \
164 emulated_edge_bilinear(lc, dst, src, src_stride, x_off, y_off, pred_w, pred_h)152 emulated_edge_bilinear(lc, dst, src, src_stride, x_off, y_off, pred_w, pred_h)
165 153
166// part of 8.5.6.6 Weighted sample prediction process154// 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 const int8_t *vf = ff_vvc_inter_luma_filters[2][my];324 const int8_t *vf = ff_vvc_inter_luma_filters[2][my];
337 int denom, wx, ox;325 int denom, wx, ox;
338 const int weight_flag = derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA);326 const int weight_flag = derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA);
327 const int is_chroma = 0;
339 328
340 x_off += mv->x >> 4;329 x_off += mv->x >> 4;
341 y_off += mv->y >> 4;330 y_off += mv->y >> 4;
342 src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift));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 if (cb_prof_flag) {334 if (cb_prof_flag) {
346 fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](prof_tmp, src, src_stride, AFFINE_MIN_BLOCK_SIZE, hf, vf, AFFINE_MIN_BLOCK_SIZE);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 fc->vvcdsp.inter.fetch_samples(prof_tmp, src, src_stride, mx, my);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 const int idx = av_log2(block_w) - 1;358 const int idx = av_log2(block_w) - 1;
370 int denom, w0, w1, o0, o1;359 int denom, w0, w1, o0, o1;
371 const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, LUMA, 0);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 for (int i = L0; i <= L1; i++) {363 for (int i = L0; i <= L1; i++) {
374 const Mv *mv = mvf->mv + i;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 const int8_t *hf = ff_vvc_inter_luma_filters[2][mx];371 const int8_t *hf = ff_vvc_inter_luma_filters[2][mx];
382 const int8_t *vf = ff_vvc_inter_luma_filters[2][my];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 if (!pu->cb_prof_flag[i]) {375 if (!pu->cb_prof_flag[i]) {
386 fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w);376 fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w);
387 } else {377 } else {
@@ -654,7 +644,7 @@ static void dmvr_mv_refine(VVCLocalContext *lc, MvField *mvf, MvField *orig_mv, · 266 unmodified lines
654 const int oy = y_off + (mv->y >> 4) - sr_range;644 const int oy = y_off + (mv->y >> 4) - sr_range;
655 ptrdiff_t src_stride = ref[i]->linesize[LUMA];645 ptrdiff_t src_stride = ref[i]->linesize[LUMA];
656 const uint8_t *src = ref[i]->data[LUMA] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift));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 fc->vvcdsp.inter.dmvr[!!my][!!mx](tmp[i], src, src_stride, pred_h, mx, my, pred_w);648 fc->vvcdsp.inter.dmvr[!!my][!!mx](tmp[i], src, src_stride, pred_h, mx, my, pred_w);
659 }649 }
660 650

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t