[FFmpeg-cvslog] sws: disable scale16 when int32 is used

Michael Niedermayer git at videolan.org
Mon Jul 11 04:12:59 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jul  3 02:34:00 2011 +0200| [ca78fa24b75906538156392a449efacedd234247] | committer: Michael Niedermayer

sws: disable scale16 when int32 is used

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

 libswscale/swscale.c              |    5 +++--
 libswscale/x86/swscale_template.c |    4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index c39f1b6..cbb172f 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2881,8 +2881,8 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
         }
     }
 
-    if(((isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)
-       || c->srcFormat == PIX_FMT_PAL8) && c->scalingBpp == 8)
+    if((isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)
+       || c->srcFormat == PIX_FMT_PAL8)
         c->hScale16= hScale16N_c;
 
     if (c->scalingBpp == 8) {
@@ -2902,6 +2902,7 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
         }
     }
     } else {
+        c->hScale16 = NULL;
         c->hScale = hScale16_c;
         c->scale19To15Fw = scale19To15Fw_c;
         c->scale8To16Rv  = scale8To16Rv_c;
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
index 8ab5556..84b8dea 100644
--- a/libswscale/x86/swscale_template.c
+++ b/libswscale/x86/swscale_template.c
@@ -2438,6 +2438,8 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
         }
     }
 #endif /* !COMPILE_TEMPLATE_MMX2 */
-    if(isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15 && c->scalingBpp == 8)
+    if(isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)
         c->hScale16= RENAME(hScale16);
+    if(c->scalingBpp != 8)
+        c->hScale16 = NULL;
 }



More information about the ffmpeg-cvslog mailing list