diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-01 13:23:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 18:25:51 +0100 |
commit | a07dfcdd6d72768696e6572f4d614d63a68f4969 (patch) | |
tree | e578699e9dcfe0f301b67548bc29d52d6e541526 | |
parent | 5630d5cdc2673a6699c8e0173075be324430576b (diff) | |
download | ffmpeg-a07dfcdd6d72768696e6572f4d614d63a68f4969.tar.gz |
avcodec/motion_est: use 2x8x8 for interlaced qpel
Fixes out of array read
Fixes Ticket4121
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b50e003e1cb6a215df44ffa3354603bf600b4aa3)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/motion_est.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 6b3cd61e8a..6e6d3f69e4 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -190,7 +190,13 @@ static av_always_inline int cmp_inline(MpegEncContext *s, const int x, const int int uvdxy; /* no, it might not be used uninitialized */ if(dxy){ if(qpel){ - c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h) + if (h << size == 16) { + c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h) + } else if (size == 0 && h == 8) { + c->qpel_put[1][dxy](c->temp , ref[0] + x + y*stride , stride); + c->qpel_put[1][dxy](c->temp + 8, ref[0] + x + y*stride + 8, stride); + } else + av_assert2(0); if(chroma){ int cx= hx/2; int cy= hy/2; |