[FFmpeg-cvslog] swscale: align vertical filtersize by 2 on x86.

Ronald S. Bultje git at videolan.org
Sun Nov 6 02:39:15 CET 2011


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Fri Nov  4 12:19:29 2011 -0700| [1deb08fcb678364f7cb2559d1e3497d1e5568910] | committer: Ronald S. Bultje

swscale: align vertical filtersize by 2 on x86.

The vertical scaler handles 2 rows at a time and thus requires
alignment by 2, or else it'll read invalid memory and result in
corrupt output.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1deb08fcb678364f7cb2559d1e3497d1e5568910
---

 libswscale/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 64ac77d..862b273 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -962,7 +962,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
     /* precalculate vertical scaler filter coefficients */
     {
         const int filterAlign=
-            (HAVE_MMX     && cpu_flags & AV_CPU_FLAG_MMX) && (flags & SWS_ACCURATE_RND) ? 2 :
+            (HAVE_MMX     && cpu_flags & AV_CPU_FLAG_MMX) ? 2 :
             (HAVE_ALTIVEC && cpu_flags & AV_CPU_FLAG_ALTIVEC) ? 8 :
             1;
 



More information about the ffmpeg-cvslog mailing list