Go to the documentation of this file.
40 printf(
"Show the relationships between rawvideo pixel formats and FourCC tags.\n");
41 printf(
"usage: fourcc2pixfmt [OPTIONS]\n");
44 "-l list the pixel format for each fourcc\n"
45 "-L list the fourccs for each pixel format\n"
46 "-p PIX_FMT given a pixel format, print the list of associated fourccs (one per line)\n"
47 "-h print this help\n");
59 int main(
int argc,
char **argv)
61 int i, list_fourcc_pix_fmt = 0, list_pix_fmt_fourccs = 0;
63 const char *pix_fmt_name =
NULL;
71 while ((
c =
getopt(argc, argv,
"hp:lL")) != -1) {
77 list_fourcc_pix_fmt = 1;
80 list_pix_fmt_fourccs = 1;
91 if (list_fourcc_pix_fmt)
96 if (list_pix_fmt_fourccs) {
110 fprintf(stderr,
"Invalid pixel format selected '%s'\n", pix_fmt_name);
AVPixelFormat
Pixel format.
const struct PixelFormatTag * avpriv_get_raw_pix_fmt_tags(void)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
static int getopt(int argc, char *argv[], char *opts)
static enum AVPixelFormat pix_fmt
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static void print_pix_fmt_fourccs(enum AVPixelFormat pix_fmt, const PixelFormatTag *pix_fmt_tags, char sep)
printf("static const uint8_t my_array[100] = {\n")
int main(int argc, char **argv)
#define i(width, name, range_min, range_max)
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
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.
#define av_fourcc2str(fourcc)