diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-16 03:53:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-16 03:53:58 +0200 |
commit | 7a02527b05e2ae5ffab579062dbe3c888758335f (patch) | |
tree | c52ec9666f9436a6c15df3c6b32d08d897771aba /libswscale | |
parent | a0bafaabb0656ca3bb3591beba0de79f6153fdac (diff) | |
parent | b203f65451646b1555d458a3601159f7d89a3397 (diff) | |
download | ffmpeg-7a02527b05e2ae5ffab579062dbe3c888758335f.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
ac3enc: use correct alignment and length in channel coupling dsp functions.
ffmpeg: don't abuse a global for passing framerate from input to output
ffmpeg: don't abuse a global for passing channels from input to output
ffmpeg: don't abuse a global for passing samplerate from input to output
ARM: update ff_h264_idct8_add4_neon for 4:4:4 changes
swscale: use SwsContext for av_log when available
swscale: Remove HAVE_MMX from files that are only compiled with MMX enabled.
swscale: Fix compilation with --disable-mmx2.
Conflicts:
ffmpeg.c
libswscale/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 8 | ||||
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 2 | ||||
-rw-r--r-- | libswscale/x86/swscale_mmx.c | 2 | ||||
-rw-r--r-- | libswscale/x86/yuv2rgb_mmx.c | 6 |
4 files changed, 11 insertions, 7 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index c41590fd62..984f2c52fa 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -790,11 +790,11 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) unscaled = (srcW == dstW && srcH == dstH); if (!isSupportedIn(srcFormat)) { - av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as input pixel format\n", av_get_pix_fmt_name(srcFormat)); + av_log(c, AV_LOG_ERROR, "%s is not supported as input pixel format\n", av_get_pix_fmt_name(srcFormat)); return AVERROR(EINVAL); } if (!isSupportedOut(dstFormat)) { - av_log(NULL, AV_LOG_ERROR, "swScaler: %s is not supported as output pixel format\n", av_get_pix_fmt_name(dstFormat)); + av_log(c, AV_LOG_ERROR, "%s is not supported as output pixel format\n", av_get_pix_fmt_name(dstFormat)); return AVERROR(EINVAL); } @@ -810,12 +810,12 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) |SWS_SPLINE |SWS_BICUBLIN); if(!i || (i & (i-1))) { - av_log(NULL, AV_LOG_ERROR, "swScaler: Exactly one scaler algorithm must be chosen\n"); + av_log(c, AV_LOG_ERROR, "Exactly one scaler algorithm must be chosen\n"); return AVERROR(EINVAL); } /* sanity check */ if (srcW<4 || srcH<1 || dstW<8 || dstH<1) { //FIXME check if these are enough and try to lowwer them after fixing the relevant parts of the code - av_log(NULL, AV_LOG_ERROR, "swScaler: %dx%d -> %dx%d is invalid scaling dimension\n", + av_log(c, AV_LOG_ERROR, "%dx%d -> %dx%d is invalid scaling dimension\n", srcW, srcH, dstW, dstH); return AVERROR(EINVAL); } diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index 78b804e367..ed7f5adb74 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -127,7 +127,7 @@ void rgb2rgb_init_x86(void) { int cpu_flags = av_get_cpu_flags(); - if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) + if (cpu_flags & AV_CPU_FLAG_MMX) rgb2rgb_init_MMX(); if (HAVE_AMD3DNOW && cpu_flags & AV_CPU_FLAG_3DNOW) rgb2rgb_init_3DNOW(); diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c index 2d5b88070a..775d5f683d 100644 --- a/libswscale/x86/swscale_mmx.c +++ b/libswscale/x86/swscale_mmx.c @@ -182,6 +182,8 @@ void ff_sws_init_swScale_mmx(SwsContext *c) if (cpu_flags & AV_CPU_FLAG_MMX) sws_init_swScale_MMX(c); +#if HAVE_MMX2 if (cpu_flags & AV_CPU_FLAG_MMX2) sws_init_swScale_MMX2(c); +#endif } diff --git a/libswscale/x86/yuv2rgb_mmx.c b/libswscale/x86/yuv2rgb_mmx.c index d46d5126da..df0e1a3726 100644 --- a/libswscale/x86/yuv2rgb_mmx.c +++ b/libswscale/x86/yuv2rgb_mmx.c @@ -72,14 +72,16 @@ SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c) c->srcFormat != PIX_FMT_YUVA420P) return NULL; - if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) { +#if HAVE_MMX2 + if (cpu_flags & AV_CPU_FLAG_MMX2) { switch (c->dstFormat) { case PIX_FMT_RGB24: return yuv420_rgb24_MMX2; case PIX_FMT_BGR24: return yuv420_bgr24_MMX2; } } +#endif - if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) { + if (cpu_flags & AV_CPU_FLAG_MMX) { switch (c->dstFormat) { case PIX_FMT_RGB32: if (c->srcFormat == PIX_FMT_YUVA420P) { |