2 * Copyright (c) 2017 Clément Bœsch <u pkh me>
4 * This file is part of FFmpeg.
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "libswscale/swscale_internal.h"
25 int (*cond)(enum AVPixelFormat pix_fmt);
31 {"isPlanarYUV", isPlanarYUV},
34 {"RGBinInt", isRGBinInt},
35 {"BGRinInt", isBGRinInt},
41 {"PackedRGB", isPackedRGB},
42 {"PlanarRGB", isPlanarRGB},
50 for (i = 0; i < FF_ARRAY_ELEMS(query_tab); i++) {
51 const AVPixFmtDescriptor *pix_desc = NULL;
52 printf("%s:\n", query_tab[i].class);
53 while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) {
54 enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc);
55 if (query_tab[i].cond(pix_fmt))
56 printf(" %s\n", pix_desc->name);