Mercurial > mplayer.hg
changeset 31693:23c297eb1092
swscale-test: use av_pix_fmt_descriptors[].name directly
author | ramiro |
---|---|
date | Tue, 20 Jul 2010 22:20:23 +0000 |
parents | d9fd0266a6d3 |
children | e251996735b5 |
files | libswscale/swscale-test.c |
diffstat | 1 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/swscale-test.c Tue Jul 20 01:45:25 2010 +0000 +++ b/libswscale/swscale-test.c Tue Jul 20 22:20:23 2010 +0000 @@ -27,12 +27,12 @@ #undef HAVE_AV_CONFIG_H #include "libavutil/mem.h" #include "libavutil/avutil.h" +#include "libavutil/pixdesc.h" #include "libavutil/lfg.h" #include "swscale.h" /* HACK Duplicated from swscale_internal.h. * Should be removed when a cleaner pixel format system exists. */ -const char *sws_format_name(enum PixelFormat format); #define isGray(x) ( \ (x)==PIX_FMT_GRAY8 \ || (x)==PIX_FMT_GRAY16BE \ @@ -120,8 +120,8 @@ srcContext= sws_getContext(w, h, PIX_FMT_YUVA420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL); if (!srcContext) { fprintf(stderr, "Failed to get %s ---> %s\n", - sws_format_name(PIX_FMT_YUVA420P), - sws_format_name(srcFormat)); + av_pix_fmt_descriptors[PIX_FMT_YUVA420P].name, + av_pix_fmt_descriptors[srcFormat].name); res = -1; goto end; @@ -129,8 +129,8 @@ dstContext= sws_getContext(srcW, srcH, srcFormat, dstW, dstH, dstFormat, flags, NULL, NULL, NULL); if (!dstContext) { fprintf(stderr, "Failed to get %s ---> %s\n", - sws_format_name(srcFormat), - sws_format_name(dstFormat)); + av_pix_fmt_descriptors[srcFormat].name, + av_pix_fmt_descriptors[dstFormat].name); res = -1; goto end; @@ -138,8 +138,8 @@ outContext= sws_getContext(dstW, dstH, dstFormat, w, h, PIX_FMT_YUVA420P, flags, NULL, NULL, NULL); if (!outContext) { fprintf(stderr, "Failed to get %s ---> %s\n", - sws_format_name(dstFormat), - sws_format_name(PIX_FMT_YUVA420P)); + av_pix_fmt_descriptors[dstFormat].name, + av_pix_fmt_descriptors[PIX_FMT_YUVA420P].name); res = -1; goto end; @@ -166,8 +166,8 @@ ssdA/= w*h; printf(" %s %dx%d -> %s %4dx%4d flags=%2d SSD=%5"PRId64",%5"PRId64",%5"PRId64",%5"PRId64"\n", - sws_format_name(srcFormat), srcW, srcH, - sws_format_name(dstFormat), dstW, dstH, + av_pix_fmt_descriptors[srcFormat].name, srcW, srcH, + av_pix_fmt_descriptors[dstFormat].name, dstW, dstH, flags, ssdY, ssdU, ssdV, ssdA); fflush(stdout); @@ -209,8 +209,8 @@ continue; printf("%s -> %s\n", - sws_format_name(srcFormat), - sws_format_name(dstFormat)); + av_pix_fmt_descriptors[srcFormat].name, + av_pix_fmt_descriptors[dstFormat].name); fflush(stdout); for (i = 0; dstW[i] && !res; i++)