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:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-01 15:23:24 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-12-08 21:08:30 +0300
commit7390c2629dc24a69612bfdf92250fad3effc6d37 (patch)
treefe9c8152a33a439d024af44327ed5e7be2f1af74
parent3d9860f68af5d3cc588fe67ebe11eba61c180649 (diff)
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 5ca59aa2e5..0d441848d6 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -189,7 +189,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;