38 printf(
"Show the relationships between rawvideo pixel formats and FourCC tags.\n");
39 printf(
"usage: fourcc2pixfmt [OPTIONS]\n");
42 "-l list the pixel format for each fourcc\n"
43 "-L list the fourccs for each pixel format\n"
44 "-p PIX_FMT given a pixel format, print the list of associated fourccs (one per line)\n"
45 "-h print this help\n");
57int main(
int argc,
char **argv)
59 int i, list_fourcc_pix_fmt = 0, list_pix_fmt_fourccs = 0;
61 const char *pix_fmt_name =
NULL;
69 while ((
c =
getopt(argc, argv,
"hp:lL")) != -1) {
75 list_fourcc_pix_fmt = 1;
78 list_pix_fmt_fourccs = 1;
89 if (list_fourcc_pix_fmt)
94 if (list_pix_fmt_fourccs) {
108 fprintf(stderr,
"Invalid pixel format selected '%s'\n", pix_fmt_name);
Convenience header that includes libavutil's core.
#define i(width, name, range_min, range_max)
__device__ int printf(const char *,...)
static enum AVPixelFormat pix_fmt
static void print_pix_fmt_fourccs(enum AVPixelFormat pix_fmt, const PixelFormatTag *pix_fmt_tags, char sep)
static int getopt(int argc, char *argv[], const char *opts)
#define av_fourcc2str(fourcc)
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
AVPixelFormat
Pixel format.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
uint64_t flags
Combination of AV_PIX_FMT_FLAG_... flags.