aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-05 21:47:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-08-05 21:47:21 +0200
commit3e32bf3dbddc1882775ea69e779a5906c3bb5701 (patch)
tree277ea2a28de3c5ca8218718fab8fe6a4a39c7187 /libswscale
parent6e19cfb083eda83aaf4b49ae765ab2b3e578d32d (diff)
parent6a92551234c6966ab59d00052076b79133e6e7e5 (diff)
downloadffmpeg-3e32bf3dbddc1882775ea69e779a5906c3bb5701.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: lsws: remove optimization debug logs in sws_init_context() lsws: use array for storing the supported in/out information Conflicts: libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c59
1 files changed, 5 insertions, 54 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 27b28049c0..d3451e4bbd 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -125,7 +125,7 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
[PIX_FMT_RGB444BE] = { 0 , 1 },
[PIX_FMT_BGR444LE] = { 0 , 1 },
[PIX_FMT_BGR444BE] = { 0 , 1 },
- [PIX_FMT_GRAY8A] = { 1 , 0 },
+ [PIX_FMT_Y400A] = { 1 , 0 },
[PIX_FMT_BGR48BE] = { 1 , 1 },
[PIX_FMT_BGR48LE] = { 1 , 1 },
[PIX_FMT_YUV420P9BE] = { 1 , 1 },
@@ -142,12 +142,14 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
int sws_isSupportedInput(enum PixelFormat pix_fmt)
{
- return format_entries[pix_fmt].is_supported_in;
+ return (unsigned)pix_fmt < PIX_FMT_NB ?
+ format_entries[pix_fmt].is_supported_in : 0;
}
int sws_isSupportedOutput(enum PixelFormat pix_fmt)
{
- return format_entries[pix_fmt].is_supported_out;
+ return (unsigned)pix_fmt < PIX_FMT_NB ?
+ format_entries[pix_fmt].is_supported_out : 0;
}
extern const int32_t ff_yuv2rgb_coeffs[8][4];
@@ -1061,57 +1063,6 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
else if (HAVE_ALTIVEC && cpu_flags & AV_CPU_FLAG_ALTIVEC) av_log(c, AV_LOG_INFO, "using AltiVec\n");
else av_log(c, AV_LOG_INFO, "using C\n");
- if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) {
- if (c->canMMX2BeUsed && (flags&SWS_FAST_BILINEAR))
- av_log(c, AV_LOG_VERBOSE, "using FAST_BILINEAR MMX2 scaler for horizontal scaling\n");
- else {
- av_log(c, AV_LOG_VERBOSE, "using %s-tap MMX scaler for horizontal luminance scaling\n",
- c->hLumFilterSize == 4 ? "4" :
- c->hLumFilterSize == 8 ? "8" : "n");
- av_log(c, AV_LOG_VERBOSE, "using %s-tap MMX scaler for horizontal chrominance scaling\n",
- c->hChrFilterSize == 4 ? "4" :
- c->hChrFilterSize == 8 ? "8" : "n");
- }
- } else {
- av_log(c, AV_LOG_VERBOSE, "using %s scaler for horizontal scaling\n",
- HAVE_MMX ? "x86 asm" :
- flags & SWS_FAST_BILINEAR ? "FAST_BILINEAR C" : "C");
- }
- if (isPlanarYUV(dstFormat)) {
- av_log(c, AV_LOG_VERBOSE, "using %s-tap %s \"scaler\" for vertical scaling (YV12 like)\n",
- c->vLumFilterSize == 1 ? "1" : "n",
- HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX ? "MMX" : "C");
- } else {
- if (c->vLumFilterSize==1 && c->vChrFilterSize==2)
- av_log(c, AV_LOG_VERBOSE, "using 1-tap %s \"scaler\" for vertical luminance scaling (BGR)\n"
- " 2-tap scaler for vertical chrominance scaling (BGR)\n",
- (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C");
- else if (c->vLumFilterSize==2 && c->vChrFilterSize==2)
- av_log(c, AV_LOG_VERBOSE, "using 2-tap linear %s scaler for vertical scaling (BGR)\n",
- (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C");
- else
- av_log(c, AV_LOG_VERBOSE, "using n-tap %s scaler for vertical scaling (BGR)\n",
- (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C");
- }
-
- if (dstFormat==PIX_FMT_BGR24)
- av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR24 converter\n",
- (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) ? "MMX2" :
- ((HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C"));
- else if (dstFormat==PIX_FMT_RGB32)
- av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR32 converter\n",
- (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C");
- else if (dstFormat==PIX_FMT_BGR565)
- av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR16 converter\n",
- (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C");
- else if (dstFormat==PIX_FMT_BGR555)
- av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR15 converter\n",
- (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C");
- else if (dstFormat == PIX_FMT_RGB444BE || dstFormat == PIX_FMT_RGB444LE ||
- dstFormat == PIX_FMT_BGR444BE || dstFormat == PIX_FMT_BGR444LE)
- av_log(c, AV_LOG_VERBOSE, "using %s YV12->BGR12 converter\n",
- (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? "MMX" : "C");
-
av_log(c, AV_LOG_VERBOSE, "%dx%d -> %dx%d\n", srcW, srcH, dstW, dstH);
av_log(c, AV_LOG_DEBUG, "lum srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n",
c->srcW, c->srcH, c->dstW, c->dstH, c->lumXInc, c->lumYInc);