aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-09-20 08:01:19 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2013-09-28 20:28:08 -0400
commitface578d56c2d1375e40d5e2a28acc122132bc55 (patch)
tree8a4fe63c8066b59ea41dd09285b4a82587a65030 /libavcodec/h264.c
parentf574b4da567cc1c175ab5463fb5b3901cbaa5595 (diff)
downloadffmpeg-face578d56c2d1375e40d5e2a28acc122132bc55.tar.gz
Rewrite emu_edge functions to have separate src/dst_stride arguments.
This allows supporting files for which the image stride is smaller than the max. 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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index acaab39f08..f2ee328124 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -932,7 +932,7 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
full_my < 0 - extra_height ||
full_mx + 16 /*FIXME*/ > pic_width + extra_width ||
full_my + 16 /*FIXME*/ > pic_height + extra_height) {
- h->vdsp.emulated_edge_mc(h->edge_emu_buffer,
+ h->vdsp.emulated_edge_mc(h->edge_emu_buffer, h->mb_linesize,
src_y - (2 << pixel_shift) - 2 * h->mb_linesize,
h->mb_linesize,
16 + 5, 16 + 5 /*FIXME*/, full_mx - 2,
@@ -951,7 +951,7 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
if (chroma_idc == 3 /* yuv444 */) {
src_cb = pic->f.data[1] + offset;
if (emu) {
- h->vdsp.emulated_edge_mc(h->edge_emu_buffer,
+ h->vdsp.emulated_edge_mc(h->edge_emu_buffer, h->mb_linesize,
src_cb - (2 << pixel_shift) - 2 * h->mb_linesize,
h->mb_linesize,
16 + 5, 16 + 5 /*FIXME*/,
@@ -965,7 +965,7 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
src_cr = pic->f.data[2] + offset;
if (emu) {
- h->vdsp.emulated_edge_mc(h->edge_emu_buffer,
+ h->vdsp.emulated_edge_mc(h->edge_emu_buffer, h->mb_linesize,
src_cr - (2 << pixel_shift) - 2 * h->mb_linesize,
h->mb_linesize,
16 + 5, 16 + 5 /*FIXME*/,
@@ -992,7 +992,7 @@ 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, h->mb_uvlinesize, src_cb, 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;
@@ -1002,7 +1002,7 @@ 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, h->mb_uvlinesize, src_cr, 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;