summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@gmail.com>2013-10-14 03:13:10 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-11-15 10:16:27 +0100
commit458446acfa1441d283dacf9e6e545beb083b8bb0 (patch)
tree49178dd81fe5208c996c942fb0c7e7a08f2e51db /libavcodec/h264.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/h264.c')
-rw-r--r--libavcodec/h264.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 1444fc6d57..6f6727b5cf 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -899,7 +899,7 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
full_my + 16 /*FIXME*/ > pic_height + extra_height) {
h->vdsp.emulated_edge_mc(h->edge_emu_buffer,
src_y - (2 << pixel_shift) - 2 * h->mb_linesize,
- h->mb_linesize,
+ h->mb_linesize, h->mb_linesize,
16 + 5, 16 + 5 /*FIXME*/, full_mx - 2,
full_my - 2, pic_width, pic_height);
src_y = h->edge_emu_buffer + (2 << pixel_shift) + 2 * h->mb_linesize;
@@ -918,7 +918,7 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
if (emu) {
h->vdsp.emulated_edge_mc(h->edge_emu_buffer,
src_cb - (2 << pixel_shift) - 2 * h->mb_linesize,
- h->mb_linesize,
+ h->mb_linesize, h->mb_linesize,
16 + 5, 16 + 5 /*FIXME*/,
full_mx - 2, full_my - 2,
pic_width, pic_height);
@@ -932,7 +932,7 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
if (emu) {
h->vdsp.emulated_edge_mc(h->edge_emu_buffer,
src_cr - (2 << pixel_shift) - 2 * h->mb_linesize,
- h->mb_linesize,
+ h->mb_linesize, h->mb_linesize,
16 + 5, 16 + 5 /*FIXME*/,
full_mx - 2, full_my - 2,
pic_width, pic_height);
@@ -957,7 +957,8 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
(my >> ysh) * h->mb_uvlinesize;
if (emu) {
- h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cb, h->mb_uvlinesize,
+ h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cb,
+ h->mb_uvlinesize, h->mb_uvlinesize,
9, 8 * chroma_idc + 1, (mx >> 3), (my >> ysh),
pic_width >> 1, pic_height >> (chroma_idc == 1 /* yuv420 */));
src_cb = h->edge_emu_buffer;
@@ -967,7 +968,8 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
mx & 7, (my << (chroma_idc == 2 /* yuv422 */)) & 7);
if (emu) {
- h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cr, h->mb_uvlinesize,
+ h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cr,
+ h->mb_uvlinesize, h->mb_uvlinesize,
9, 8 * chroma_idc + 1, (mx >> 3), (my >> ysh),
pic_width >> 1, pic_height >> (chroma_idc == 1 /* yuv420 */));
src_cr = h->edge_emu_buffer;