aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-01 13:23:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-02 12:57:20 +0100
commit93df243a59e4c0152b50c4da97a6bbe13d1ee357 (patch)
tree3ff885be7cf7e867a72f8a5fef87b46c4ad44d3b
parentdb61d34e83099a22d02500986d9135e4b5bceae8 (diff)
downloadffmpeg-93df243a59e4c0152b50c4da97a6bbe13d1ee357.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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 81ee2bd6b3..aae215f1d2 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -193,7 +193,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;