diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-10 23:36:35 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-10 23:36:35 +0000 |
commit | 9cb5c760d73e08bcd5d441d261abe67d472e98ee (patch) | |
tree | aaeb23cd268271bf22bcd131644577a77f3be64d /cmdutils.c | |
parent | 33bd38dbd3f5d8c06c6229f6f404ba664027a618 (diff) | |
download | ffmpeg-9cb5c760d73e08bcd5d441d261abe67d472e98ee.tar.gz |
Extend show_pix_fmts(), make it show input/output support for
conversion and other information exposed by the pixdesc API.
Originally committed as revision 21751 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c index 24a8db2f1b..275c16a060 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -35,6 +35,7 @@ #include "libswscale/swscale.h" #include "libpostproc/postprocess.h" #include "libavutil/avstring.h" +#include "libavutil/pixdesc.h" #include "libavcodec/opt.h" #include "cmdutils.h" #include "version.h" @@ -627,7 +628,30 @@ void show_filters(void) void show_pix_fmts(void) { - list_fmts(avcodec_pix_fmt_string, PIX_FMT_NB); + enum PixelFormat pix_fmt; + + printf( + "Pixel formats:\n" + "I.... = Supported Input format for conversion\n" + ".O... = Supported Output format for conversion\n" + "..H.. = Hardware accelerated format\n" + "...P. = Paletted format\n" + "....B = Bitstream format\n" + "FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL\n" + "-----\n"); + + for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) { + const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt]; + printf("%c%c%c%c%c %-16s %d %2d\n", + sws_isSupportedInput (pix_fmt) ? 'I' : '.', + sws_isSupportedOutput(pix_fmt) ? 'O' : '.', + pix_desc->flags & PIX_FMT_HWACCEL ? 'H' : '.', + pix_desc->flags & PIX_FMT_PAL ? 'P' : '.', + pix_desc->flags & PIX_FMT_BITSTREAM ? 'B' : '.', + pix_desc->name, + pix_desc->nb_components, + av_get_bits_per_pixel(pix_desc)); + } } int read_yesno(void) |