Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@gmail.com>2013-10-14 05:13:10 +0400
committerLuca Barbato <lu_zero@gentoo.org>2013-11-15 13:16:27 +0400
commit458446acfa1441d283dacf9e6e545beb083b8bb0 (patch)
tree49178dd81fe5208c996c942fb0c7e7a08f2e51db /libavcodec/mpegvideo_enc.c
parent3cbe1126530449336e2ce59b194bdb8c4eb4abb4 (diff)
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/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 1acd0ffcb1..b7dda070c1 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1699,15 +1699,19 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s,
if (mb_x * 16 + 16 > s->width || mb_y * 16 + 16 > s->height) {
uint8_t *ebuf = s->edge_emu_buffer + 32;
- s->vdsp.emulated_edge_mc(ebuf, ptr_y, wrap_y, 16, 16, mb_x * 16,
- mb_y * 16, s->width, s->height);
+ s->vdsp.emulated_edge_mc(ebuf, ptr_y,
+ wrap_y, wrap_y,
+ 16, 16, mb_x * 16, mb_y * 16,
+ s->width, s->height);
ptr_y = ebuf;
- s->vdsp.emulated_edge_mc(ebuf + 18 * wrap_y, ptr_cb, wrap_c, 8,
- mb_block_height, mb_x * 8, mb_y * 8,
+ s->vdsp.emulated_edge_mc(ebuf + 18 * wrap_y, ptr_cb,
+ wrap_c, wrap_c,
+ 8, mb_block_height, mb_x * 8, mb_y * 8,
s->width >> 1, s->height >> 1);
ptr_cb = ebuf + 18 * wrap_y;
- s->vdsp.emulated_edge_mc(ebuf + 18 * wrap_y + 8, ptr_cr, wrap_c, 8,
- mb_block_height, mb_x * 8, mb_y * 8,
+ s->vdsp.emulated_edge_mc(ebuf + 18 * wrap_y + 8, ptr_cr,
+ wrap_c, wrap_c,
+ 8, mb_block_height, mb_x * 8, mb_y * 8,
s->width >> 1, s->height >> 1);
ptr_cr = ebuf + 18 * wrap_y + 8;
}