2 * This file is part of FFmpeg.
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "libavutil/pixdesc.h"
22 #include "libavfilter/drawutils.h"
27 const AVPixFmtDescriptor *desc;
32 for (f = 0; av_pix_fmt_desc_get(f); f++) {
33 desc = av_pix_fmt_desc_get(f);
36 printf("Testing %s...%*s", desc->name,
37 (int)(16 - strlen(desc->name)), "");
38 r = ff_draw_init(&draw, f, 0);
41 av_strerror(r, buf, sizeof(buf));
42 printf("no: %s\n", buf);
45 ff_draw_color(&draw, &color, (uint8_t[]) { 1, 0, 0, 1 });
46 for (i = 0; i < sizeof(color); i++)
47 if (((uint8_t *)&color)[i] != 128)
49 if (i == sizeof(color)) {
50 printf("fallback color\n");