[FFmpeg-devel] [PATCH] Extend show_pix_fmts() to make it print the input/output support

Stefano Sabatini stefano.sabatini-lala
Sat Jan 30 18:25:46 CET 2010


On date Saturday 2010-01-30 17:21:27 +0100, Michael Niedermayer encoded:
> On Sat, Jan 30, 2010 at 04:54:08PM +0100, Stefano Sabatini wrote:
> > Hi, as in subject.
> > 
> > Resulting output looks like:
> > name       nb_channels depth is_alpha input  output
> > yuv420p         3         8      n      y       y
> > yuyv422         1         8      n      y       y
> > rgb24           3         8      n      y       y
> > bgr24           3         8      n      y       y
> > yuv422p         3         8      n      y       y
> > yuv444p         3         8      n      y       y
> > yuv410p         3         8      n      y       y
> > yuv411p         3         8      n      y       y
> > gray            1         8      n      y       y
> > monow           1         1      n      y       y
> > monob           1         1      n      y       y
> > pal8            4         8      y      y       n
> 
> > yuvj420p        3         8      n      n       n
> > yuvj422p        3         8      n      n       n
> > yuvj444p        3         8      n      n       n
> 
> no ?

This is the complete output for your reference:

name       nb_channels depth is_alpha input output
yuv420p         3         8      n      y      y
yuyv422         1         8      n      y      y
rgb24           3         8      n      y      y
bgr24           3         8      n      y      y
yuv422p         3         8      n      y      y
yuv444p         3         8      n      y      y
yuv410p         3         8      n      y      y
yuv411p         3         8      n      y      y
gray            1         8      n      y      y
monow           1         1      n      y      y
monob           1         1      n      y      y
pal8            4         8      y      y      n
yuvj420p        3         8      n      n      n
yuvj422p        3         8      n      n      n
yuvj444p        3         8      n      n      n
xvmcmc          0         0      n      n      n
xvmcidct        0         0      n      n      n
uyvy422         1         8      n      y      y
uyyvyy411       1         8      n      n      n
bgr8            1         8      n      y      y
bgr4            1         4      n      n      y
bgr4_byte       1         8      n      y      y
rgb8            1         8      n      y      y
rgb4            1         4      n      n      y
rgb4_byte       1         8      n      y      y
nv12            2         8      n      y      y
nv21            2         8      n      y      y
argb            4         8      y      y      y
rgba            4         8      y      y      y
abgr            4         8      y      y      y
bgra            4         8      y      y      y
gray16be        1        16      n      y      y
gray16le        1        16      n      y      y
yuv440p         3         8      n      y      y
yuvj440p        3         8      n      n      n
yuva420p        4         8      n      y      y
vdpau_h264      0         0      n      n      n
vdpau_mpeg1     0         0      n      n      n
vdpau_mpeg2     0         0      n      n      n
vdpau_wmv3      0         0      n      n      n
vdpau_vc1       0         0      n      n      n
rgb48be         3        16      n      y      y
rgb48le         3        16      n      y      y
rgb565be        3         5      n      n      n
rgb565le        3         5      n      y      y
rgb555be        3         5      n      n      n
rgb555le        3         5      n      y      y
bgr565be        3         5      n      n      n
bgr565le        3         5      n      y      y
bgr555be        3         5      n      n      n
bgr555le        3         5      n      y      y
vaapi_moco      0         0      n      n      n
vaapi_idct      0         0      n      n      n
vaapi_vld       0         0      n      n      n
yuv420p16le     3        16      n      y      y
yuv420p16be     3        16      n      y      y
yuv422p16le     3        16      n      y      y
yuv422p16be     3        16      n      y      y
yuv444p16le     3        16      n      y      y
yuv444p16be     3        16      n      y      y
vdpau_mpeg4     0         0      n      n      n
dxva2_vld       0         0      n      n      n

> 
> 
> > xvmcmc          0         0      n      n       n
> > xvmcidct        0         0      n      n       n
> 
> well

Are you suggesting to remove them from the output?

> [...]
> > This can be parsed to get the list of input/output format with
> > something of the kind:
> > 
> > in_pix_fmts=
> > $(ffplay -pix_fmts | egrep '[[:alnum:]_]+ +[[:digit:]] +[[:digit:]]+ +[yn] +[y]+ +[yn]' | cut -f1 -d" ")
> > 
> > out_pix_fmts=
> > $(ffplay -pix_fmts | egrep '[[:alnum:]_]+ +[[:digit:]] +[[:digit:]]+ +[yn] +[yn]+ +[y]' | cut -f1 -d" ")
> 
> how many people can write this and not just look in the source?

Well the main reason of existence of this patch is that I wanted to
simplify the swscale-test-all.sh script:

FFMPEG=../ffmpeg

input_pix_fmts=$($FFMPEG -pix_fmts | egrep '[[:alnum:]_]+ +[[:digit:]]+ +[[:digit:]]+ +[yn] +[y] +[yn]' | cut -f1 -d" ")
output_pix_fmts=$($FFMPEG -pix_fmts | egrep '[[:alnum:]_]+ +[[:digit:]]+ +[[:digit:]]+ +[yn] +[yn] +[y]' | cut -f1 -d" ")

for input_pix_fmt in $input_pix_fmts; do
    for output_pix_fmt in $output_pix_fmts; do
        swscale-test $input_pix_fmt $output_pix_fmt
    done
done

having to synch the lists in the script with the code is boring and
error-prone.

Regards.
-- 
FFmpeg = Foolish & Fast Mind-dumbing Powered Ermetic Glue



More information about the ffmpeg-devel mailing list