diff options
author | Ronald S. Bultje <rbultje@gmail.com> | 2013-10-14 03:13:10 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-11-15 10:16:27 +0100 |
commit | 458446acfa1441d283dacf9e6e545beb083b8bb0 (patch) | |
tree | 49178dd81fe5208c996c942fb0c7e7a08f2e51db /libavcodec/hevc.c | |
parent | 3cbe1126530449336e2ce59b194bdb8c4eb4abb4 (diff) | |
download | ffmpeg-458446acfa1441d283dacf9e6e545beb083b8bb0.tar.gz |
lavc: Edge emulation with dst/src linesize
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index e01db16868..f00667c6ff 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -1481,7 +1481,8 @@ static void luma_mc(HEVCContext *s, int16_t *dst, ptrdiff_t dststride, y_off >= pic_height - block_h - ff_hevc_qpel_extra_after[my]) { int offset = extra_top * srcstride + (extra_left << s->sps->pixel_shift); - s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src - offset, srcstride, + s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src - offset, + srcstride, srcstride, block_w + ff_hevc_qpel_extra[mx], block_h + ff_hevc_qpel_extra[my], x_off - extra_left, y_off - extra_top, @@ -1532,7 +1533,8 @@ static void chroma_mc(HEVCContext *s, int16_t *dst1, int16_t *dst2, int offset1 = EPEL_EXTRA_BEFORE * (src1stride + (1 << s->sps->pixel_shift)); int offset2 = EPEL_EXTRA_BEFORE * (src2stride + (1 << s->sps->pixel_shift)); - s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src1 - offset1, src1stride, + s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src1 - offset1, + src1stride, src1stride, block_w + EPEL_EXTRA, block_h + EPEL_EXTRA, x_off - EPEL_EXTRA_BEFORE, y_off - EPEL_EXTRA_BEFORE, @@ -1542,7 +1544,8 @@ static void chroma_mc(HEVCContext *s, int16_t *dst1, int16_t *dst2, s->hevcdsp.put_hevc_epel[!!my][!!mx](dst1, dststride, src1, src1stride, block_w, block_h, mx, my, lc->mc_buffer); - s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src2 - offset2, src2stride, + s->vdsp.emulated_edge_mc(lc->edge_emu_buffer, src2 - offset2, + src2stride, src2stride, block_w + EPEL_EXTRA, block_h + EPEL_EXTRA, x_off - EPEL_EXTRA_BEFORE, y_off - EPEL_EXTRA_BEFORE, |