36 int x,
int y,
int c,
int w,
37 int read_pal_component)
40 int plane = comp.
plane;
49 const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
50 int shift = 8 - depth - (skip & 7);
54 if (read_pal_component)
55 val = data[1][4*val +
c];
62 const uint8_t *p = data[plane] + y * linesize[plane] +
64 int is_8bit = shift + depth <= 8;
70 int val = is_8bit ? *p :
72 val = (val >>
shift) & mask;
73 if (read_pal_component)
74 val = data[1][4 * val +
c];
84 int x,
int y,
int c,
int w)
87 int plane = comp.
plane;
94 uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
95 int shift = 8 - depth - (skip & 7);
98 *p |= *src++ <<
shift;
105 uint8_t *p = data[plane] + y * linesize[plane] +
108 if (shift + depth <= 8) {
111 *p |= (*src++ <<
shift);
129 #if !FF_API_PIX_FMT_DESC
625 .name =
"yuva420p9be",
638 .name =
"yuva420p9le",
651 .name =
"yuva422p9be",
664 .name =
"yuva422p9le",
677 .name =
"yuva444p9be",
690 .name =
"yuva444p9le",
703 .name =
"yuva420p10be",
716 .name =
"yuva420p10le",
729 .name =
"yuva422p10be",
742 .name =
"yuva422p10le",
755 .name =
"yuva444p10be",
768 .name =
"yuva444p10le",
781 .name =
"yuva420p16be",
794 .name =
"yuva420p16le",
807 .name =
"yuva422p16be",
820 .name =
"yuva422p16le",
833 .name =
"yuva444p16be",
846 .name =
"yuva444p16le",
860 .name =
"vdpau_h264",
866 .name =
"vdpau_mpeg1",
872 .name =
"vdpau_mpeg2",
878 .name =
"vdpau_wmv3",
890 .name =
"vdpau_mpeg4",
1141 .name =
"vaapi_moco",
1147 .name =
"vaapi_idct",
1153 .name =
"vaapi_vld",
1159 .name =
"yuv420p9le",
1171 .name =
"yuv420p9be",
1183 .name =
"yuv420p10le",
1195 .name =
"yuv420p10be",
1207 .name =
"yuv420p12le",
1219 .name =
"yuv420p12be",
1231 .name =
"yuv420p14le",
1243 .name =
"yuv420p14be",
1255 .name =
"yuv420p16le",
1267 .name =
"yuv420p16be",
1279 .name =
"yuv422p9le",
1291 .name =
"yuv422p9be",
1303 .name =
"yuv422p10le",
1315 .name =
"yuv422p10be",
1327 .name =
"yuv422p12le",
1339 .name =
"yuv422p12be",
1351 .name =
"yuv422p14le",
1363 .name =
"yuv422p14be",
1375 .name =
"yuv422p16le",
1387 .name =
"yuv422p16be",
1399 .name =
"yuv444p16le",
1411 .name =
"yuv444p16be",
1423 .name =
"yuv444p10le",
1435 .name =
"yuv444p10be",
1447 .name =
"yuv444p9le",
1459 .name =
"yuv444p9be",
1471 .name =
"yuv444p12le",
1483 .name =
"yuv444p12be",
1495 .name =
"yuv444p14le",
1507 .name =
"yuv444p14be",
1519 .name =
"dxva2_vld",
1685 .name =
"gbrap16le",
1698 .name =
"gbrap16be",
1741 #define BAYER8_DESC_COMMON \
1742 .nb_components= 3, \
1743 .log2_chroma_w= 0, \
1744 .log2_chroma_h= 0, \
1751 #define BAYER16_DESC_COMMON \
1752 .nb_components= 3, \
1753 .log2_chroma_w= 0, \
1754 .log2_chroma_h= 0, \
1762 .name =
"bayer_bggr8",
1766 .name =
"bayer_bggr16le",
1770 .name =
"bayer_bggr16be",
1774 .name =
"bayer_rggb8",
1778 .name =
"bayer_rggb16le",
1782 .name =
"bayer_rggb16be",
1786 .name =
"bayer_gbrg8",
1790 .name =
"bayer_gbrg16le",
1794 .name =
"bayer_gbrg16be",
1798 .name =
"bayer_grbg8",
1802 .name =
"bayer_grbg16le",
1806 .name =
"bayer_grbg16be",
1853 if (av_pix_fmt_descriptors[pix_fmt].name &&
1854 !strcmp(av_pix_fmt_descriptors[pix_fmt].name, name))
1867 # define X_NE(be, le) be
1869 # define X_NE(be, le) le
1876 if (!strcmp(name,
"rgb32"))
1877 name =
X_NE(
"argb",
"bgra");
1878 else if (!strcmp(name,
"bgr32"))
1879 name =
X_NE(
"abgr",
"rgba");
1885 snprintf(name2,
sizeof(name2),
"%s%s", name,
X_NE(
"be",
"le"));
1897 int s = c == 1 || c == 2 ? 0 : log2_pixels;
1901 return bits >> log2_pixels;
1912 int s = c == 1 || c == 2 ? 0 : log2_pixels;
1915 for (c = 0; c < 4; c++)
1921 return bits >> log2_pixels;
1928 snprintf (buf, buf_size,
"name" " nb_components" " nb_bits");
1931 snprintf(buf, buf_size,
"%-11s %7d %10d", pixdesc->
name,
1942 return &av_pix_fmt_descriptors[
pix_fmt];
1948 return &av_pix_fmt_descriptors[0];
1949 while (prev - av_pix_fmt_descriptors <
FF_ARRAY_ELEMS(av_pix_fmt_descriptors) - 1) {
1959 if (desc < av_pix_fmt_descriptors ||
1960 desc >= av_pix_fmt_descriptors +
FF_ARRAY_ELEMS(av_pix_fmt_descriptors))
1968 int *h_shift,
int *v_shift)
1982 int i, planes[4] = { 0 },
ret = 0;
1999 uint8_t fill[4][8+6+3] = {{0}};
2000 uint8_t *
data[4] = {fill[0], fill[1], fill[2], fill[3]};
2001 int linesize[4] = {0,0,0,0};
2025 if (!strncmp(d->
name,
"bayer_", 6))
2042 if (!desc || strlen(desc->
name) < 2)
2045 i = strlen(name) - 2;
2046 if (strcmp(name + i,
"be") && strcmp(name + i,
"le"))
2049 name[i] ^=
'b' ^
'l';