[FFmpeg-cvslog] swscale: exchange src & dst chroma pos

Michael Niedermayer git at videolan.org
Wed Jul 24 22:53:19 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jul 24 22:43:50 2013 +0200| [436616fd4251ac5e4c7e1b60c2f589fb8c13a277] | committer: Michael Niedermayer

swscale: exchange src & dst chroma pos

Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libswscale/utils.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 00308e1..c8b53c7 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -299,7 +299,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
         FF_ALLOC_OR_GOTO(NULL, filter,
                          dstW * sizeof(*filter) * filterSize, fail);
 
-        xDstInSrc = ((srcPos*xInc)>>8) - ((dstPos*0x8000)>>7);
+        xDstInSrc = ((dstPos*xInc)>>8) - ((srcPos*0x8000)>>7);
         for (i = 0; i < dstW; i++) {
             int xx = (xDstInSrc - ((filterSize - 1) << 15) + (1 << 15)) >> 16;
 
@@ -315,7 +315,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
         FF_ALLOC_OR_GOTO(NULL, filter,
                          dstW * sizeof(*filter) * filterSize, fail);
 
-        xDstInSrc = ((srcPos*xInc)>>8) - ((dstPos*0x8000)>>7);
+        xDstInSrc = ((dstPos*xInc)>>8) - ((srcPos*0x8000)>>7);
         for (i = 0; i < dstW; i++) {
             int xx = (xDstInSrc - ((filterSize - 1) << 15) + (1 << 15)) >> 16;
             int j;
@@ -366,7 +366,7 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
         FF_ALLOC_OR_GOTO(NULL, filter,
                          dstW * sizeof(*filter) * filterSize, fail);
 
-        xDstInSrc = ((srcPos*xInc)>>7) - ((dstPos*0x10000)>>7);
+        xDstInSrc = ((dstPos*xInc)>>7) - ((srcPos*0x10000)>>7);
         for (i = 0; i < dstW; i++) {
             int xx = (xDstInSrc - ((filterSize - 2) << 16)) / (1 << 17);
             int j;



More information about the ffmpeg-cvslog mailing list