diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:36:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:36:56 +0000 |
commit | 51de1d8436100f725f3576aefa24a2bd2057bc28 (patch) | |
tree | c6d1d5264b6d40a8d7ca34129f36b7d61e188af3 /test | |
parent | Initial commit. (diff) | |
download | mpv-51de1d8436100f725f3576aefa24a2bd2057bc28.tar.xz mpv-51de1d8436100f725f3576aefa24a2bd2057bc28.zip |
Adding upstream version 0.37.0.upstream/0.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | test/chmap.c | 218 | ||||
-rw-r--r-- | test/gl_video.c | 25 | ||||
-rw-r--r-- | test/img_format.c | 217 | ||||
-rw-r--r-- | test/img_utils.c | 63 | ||||
-rw-r--r-- | test/img_utils.h | 24 | ||||
-rw-r--r-- | test/json.c | 87 | ||||
-rw-r--r-- | test/libmpv_test.c | 271 | ||||
-rw-r--r-- | test/linked_list.c | 160 | ||||
-rw-r--r-- | test/meson.build | 148 | ||||
-rw-r--r-- | test/paths.c | 65 | ||||
-rw-r--r-- | test/ref/draw_bmp.txt | 249 | ||||
-rw-r--r-- | test/ref/img_formats.txt | 2834 | ||||
-rw-r--r-- | test/ref/repack.txt | 385 | ||||
-rw-r--r-- | test/ref/repack_sws.log | 18 | ||||
-rw-r--r-- | test/ref/repack_zimg.log | 18 | ||||
-rw-r--r-- | test/ref/zimg_formats.txt | 249 | ||||
-rw-r--r-- | test/repack.c | 532 | ||||
-rw-r--r-- | test/scale_sws.c | 42 | ||||
-rw-r--r-- | test/scale_test.c | 192 | ||||
-rw-r--r-- | test/scale_test.h | 30 | ||||
-rw-r--r-- | test/scale_zimg.c | 56 | ||||
-rw-r--r-- | test/test_utils.c | 111 | ||||
-rw-r--r-- | test/test_utils.h | 56 | ||||
-rw-r--r-- | test/timer.c | 41 |
24 files changed, 6091 insertions, 0 deletions
diff --git a/test/chmap.c b/test/chmap.c new file mode 100644 index 0000000..48af822 --- /dev/null +++ b/test/chmap.c @@ -0,0 +1,218 @@ +#include "audio/chmap.h" +#include "audio/chmap_sel.h" +#include "config.h" +#include "test_utils.h" + +#if HAVE_AV_CHANNEL_LAYOUT +#include "audio/chmap_avchannel.h" +#endif + +#define LAYOUTS(...) (char*[]){__VA_ARGS__, NULL} + +static void test_sel(const char *input, const char *expected_selection, + char **layouts) +{ + struct mp_chmap_sel s = {0}; + struct mp_chmap input_map; + struct mp_chmap expected_map; + + assert_true(mp_chmap_from_str(&input_map, bstr0(input))); + assert_true(mp_chmap_from_str(&expected_map, bstr0(expected_selection))); + + for (int n = 0; layouts[n]; n++) { + struct mp_chmap tmp; + assert_true(mp_chmap_from_str(&tmp, bstr0(layouts[n]))); + int count = s.num_chmaps; + mp_chmap_sel_add_map(&s, &tmp); + assert_true(s.num_chmaps > count); // assure validity and max. count + } + + assert_true(mp_chmap_sel_fallback(&s, &input_map)); + // We convert expected_map to a chmap and then back to a string to avoid + // problems with ambiguous layouts. + assert_string_equal(mp_chmap_to_str(&input_map), + mp_chmap_to_str(&expected_map)); +} + +#if HAVE_AV_CHANNEL_LAYOUT +static bool layout_matches(const AVChannelLayout *av_layout, + const struct mp_chmap *mp_layout, + bool require_default_unspec) +{ + if (!mp_chmap_is_valid(mp_layout) || + !av_channel_layout_check(av_layout) || + av_layout->nb_channels != mp_layout->num || + mp_layout->num > MP_NUM_CHANNELS) + return false; + + switch (av_layout->order) { + case AV_CHANNEL_ORDER_UNSPEC: + { + if (!require_default_unspec) + return true; + + // mp_chmap essentially does not have a concept of "unspecified" + // so we check if the mp layout matches the default layout for such + // channel count. + struct mp_chmap default_layout = { 0 }; + mp_chmap_from_channels(&default_layout, mp_layout->num); + return mp_chmap_equals(mp_layout, &default_layout); + } + case AV_CHANNEL_ORDER_NATIVE: + return av_layout->u.mask == mp_chmap_to_lavc(mp_layout); + default: + // TODO: handle custom layouts + return false; + } + + return true; +} + +static void test_mp_chmap_to_av_channel_layout(void) +{ + mp_ch_layout_tuple *mapping_array = NULL; + void *iter = NULL; + bool anything_failed = false; + + printf("Testing mp_chmap -> AVChannelLayout conversions\n"); + + while ((mapping_array = mp_iterate_builtin_layouts(&iter))) { + const char *mapping_name = (*mapping_array)[0]; + const char *mapping_str = (*mapping_array)[1]; + struct mp_chmap mp_layout = { 0 }; + AVChannelLayout av_layout = { 0 }; + char layout_desc[128] = {0}; + + assert_true(mp_chmap_from_str(&mp_layout, bstr0(mapping_str))); + + mp_chmap_to_av_layout(&av_layout, &mp_layout); + + assert_false(av_channel_layout_describe(&av_layout, + layout_desc, 128) < 0); + + bool success = + (strcmp(layout_desc, mp_chmap_to_str(&mp_layout)) == 0 || + layout_matches(&av_layout, &mp_layout, false)); + if (!success) + anything_failed = true; + + printf("%s: %s (%s) -> %s\n", + success ? "Success" : "Failure", + mapping_str, mapping_name, layout_desc); + + av_channel_layout_uninit(&av_layout); + } + + assert_false(anything_failed); +} + +static void test_av_channel_layout_to_mp_chmap(void) +{ + const AVChannelLayout *av_layout = NULL; + void *iter = NULL; + bool anything_failed = false; + + printf("Testing AVChannelLayout -> mp_chmap conversions\n"); + + while ((av_layout = av_channel_layout_standard(&iter))) { + struct mp_chmap mp_layout = { 0 }; + char layout_desc[128] = {0}; + + assert_false(av_channel_layout_describe(av_layout, + layout_desc, 128) < 0); + + bool ret = mp_chmap_from_av_layout(&mp_layout, av_layout); + if (!ret) { + bool too_many_channels = + av_layout->nb_channels > MP_NUM_CHANNELS; + printf("Conversion from '%s' to mp_chmap failed (%s)!\n", + layout_desc, + too_many_channels ? + "channel count was over max, ignoring" : + "unexpected, failing"); + + // we should for now only fail with things such as 22.2 + // due to mp_chmap being currently limited to 16 channels + assert_true(too_many_channels); + + continue; + } + + bool success = + (strcmp(layout_desc, mp_chmap_to_str(&mp_layout)) == 0 || + layout_matches(av_layout, &mp_layout, true)); + if (!success) + anything_failed = true; + + printf("%s: %s -> %s\n", + success ? "Success" : "Failure", + layout_desc, mp_chmap_to_str(&mp_layout)); + } + + assert_false(anything_failed); +} +#endif + + +int main(void) +{ + struct mp_chmap a; + struct mp_chmap b; + struct mp_chmap_sel s = {0}; + + test_sel("5.1", "7.1", LAYOUTS("7.1")); + test_sel("7.1", "5.1", LAYOUTS("5.1")); + test_sel("7.1(wide-side)", "7.1", LAYOUTS("7.1")); + test_sel("7.1(wide-side)", "5.1(side)", LAYOUTS("7.1", "5.1(side)")); + test_sel("3.1", "5.1", LAYOUTS("7.1", "5.1", "2.1", "stereo", "mono")); + test_sel("5.1", "7.1(rear)", LAYOUTS("7.1(rear)")); + test_sel("5.1(side)", "5.1", LAYOUTS("5.1", "7.1")); + test_sel("5.1", "7.1(alsa)", LAYOUTS("7.1(alsa)")); + test_sel("mono", "stereo", LAYOUTS("stereo", "5.1")); + test_sel("stereo", "stereo", LAYOUTS("stereo", "5.1")); + test_sel("5.1(side)", "7.1(rear)", LAYOUTS("stereo", "7.1(rear)")); + test_sel("7.1", "fl-fr-lfe-fc-bl-br-flc-frc", + LAYOUTS("fl-fr-lfe-fc-bl-br-flc-frc", "3.0(back)")); + + mp_chmap_set_unknown(&a, 2); + + mp_chmap_from_str(&b, bstr0("5.1")); + + mp_chmap_sel_add_map(&s, &a); + assert_false(mp_chmap_sel_fallback(&s, &b)); + assert_string_equal(mp_chmap_to_str(&b), "5.1"); + + test_sel("quad", "quad(side)", LAYOUTS("quad(side)", "stereo")); + test_sel("quad", "quad(side)", LAYOUTS("quad(side)", "7.0")); + test_sel("quad", "quad(side)", LAYOUTS("7.0", "quad(side)")); + test_sel("quad", "7.1(wide-side)", LAYOUTS("7.1(wide-side)", "stereo")); + test_sel("quad", "7.1(wide-side)", LAYOUTS("stereo", "7.1(wide-side)")); + test_sel("quad", "fl-fr-sl-sr", + LAYOUTS("fl-fr-fc-bl-br", "fl-fr-sl-sr")); + test_sel("quad", "fl-fr-bl-br-na-na-na-na", + LAYOUTS("fl-fr-bl-br-na-na-na-na", "quad(side)", "stereo")); + test_sel("quad", "fl-fr-bl-br-na-na-na-na", + LAYOUTS("stereo", "quad(side)", "fl-fr-bl-br-na-na-na-na")); + test_sel("fl-fr-fc-lfe-sl-sr", "fl-fr-lfe-fc-bl-br-na-na", + LAYOUTS("fl-fr-lfe-fc-bl-br-na-na", "fl-fr-lfe-fc-bl-br-sdl-sdr")); + test_sel("fl-fr-fc-lfe-sl-sr", "fl-fr-lfe-fc-bl-br-na-na", + LAYOUTS("fl-fr-lfe-fc-bl-br-sdl-sdr", "fl-fr-lfe-fc-bl-br-na-na")); + + test_sel("na-fl-fr", "na-fl-fr", LAYOUTS("na-fl-fr-na", "fl-na-fr", "na-fl-fr", + "fl-fr-na-na", "na-na-fl-fr")); + + mp_chmap_from_str(&a, bstr0("3.1")); + mp_chmap_from_str(&b, bstr0("2.1")); + + assert_int_equal(mp_chmap_diffn(&a, &b), 1); + + mp_chmap_from_str(&b, bstr0("6.1(back)")); + assert_int_equal(mp_chmap_diffn(&a, &b), 0); + assert_int_equal(mp_chmap_diffn(&b, &a), 3); + +#if HAVE_AV_CHANNEL_LAYOUT + test_av_channel_layout_to_mp_chmap(); + test_mp_chmap_to_av_channel_layout(); +#endif + return 0; +} diff --git a/test/gl_video.c b/test/gl_video.c new file mode 100644 index 0000000..a2bdda4 --- /dev/null +++ b/test/gl_video.c @@ -0,0 +1,25 @@ +#include "test_utils.h" +#include "video/out/gpu/utils.h" + +int main(void) +{ + float x; + + x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 16.0); + assert_float_equal(x, 2.40f, FLT_EPSILON); + + x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 64.0); + assert_float_equal(x, 1.961f, FLT_EPSILON); + + x = gl_video_scale_ambient_lux(16.0, 64.0, 1.961, 2.40, 64.0); + assert_float_equal(x, 2.40f, FLT_EPSILON); + + x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 0.0); + assert_float_equal(x, 2.40f, FLT_EPSILON); + + // 32 corresponds to the midpoint after converting lux to the log10 scale + x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 32.0); + float mid_gamma = (2.40 - 1.961) / 2 + 1.961; + assert_float_equal(x, mid_gamma, FLT_EPSILON); + return 0; +} diff --git a/test/img_format.c b/test/img_format.c new file mode 100644 index 0000000..3cc8ff5 --- /dev/null +++ b/test/img_format.c @@ -0,0 +1,217 @@ +#include <libavutil/frame.h> +#include <libavutil/pixdesc.h> + +#include "img_utils.h" +#include "options/path.h" +#include "test_utils.h" +#include "video/fmt-conversion.h" +#include "video/img_format.h" +#include "video/mp_image.h" +#include "video/sws_utils.h" + +static enum AVPixelFormat pixfmt_unsup[100]; +static int num_pixfmt_unsup; + +static const char *comp_type(enum mp_component_type type) +{ + switch (type) { + case MP_COMPONENT_TYPE_UINT: return "uint"; + case MP_COMPONENT_TYPE_FLOAT: return "float"; + default: return "unknown"; + } +} + +int main(int argc, char *argv[]) +{ + init_imgfmts_list(); + const char *refdir = argv[1]; + const char *outdir = argv[2]; + + FILE *f = test_open_out(outdir, "img_formats.txt"); + + for (int z = 0; z < num_imgfmts; z++) { + int mpfmt = imgfmts[z]; + enum AVPixelFormat pixfmt = imgfmt2pixfmt(mpfmt); + const AVPixFmtDescriptor *avd = av_pix_fmt_desc_get(pixfmt); + + fprintf(f, "%s: ", mp_imgfmt_to_name(mpfmt)); + if (mpfmt >= IMGFMT_AVPIXFMT_START && mpfmt < IMGFMT_AVPIXFMT_END) + fprintf(f, "[GENERIC] "); + + int fcsp = mp_imgfmt_get_forced_csp(mpfmt); + if (fcsp) + fprintf(f, "fcsp=%s ", m_opt_choice_str(mp_csp_names, fcsp)); + fprintf(f, "ctype=%s\n", comp_type(mp_imgfmt_get_component_type(mpfmt))); + + struct mp_imgfmt_desc d = mp_imgfmt_get_desc(mpfmt); + if (d.id) { + fprintf(f, " Basic desc: "); + #define FLAG(t, c) if (d.flags & (t)) fprintf(f, "[%s]", c); + FLAG(MP_IMGFLAG_BYTE_ALIGNED, "ba") + FLAG(MP_IMGFLAG_BYTES, "bb") + FLAG(MP_IMGFLAG_ALPHA, "a") + FLAG(MP_IMGFLAG_YUV_P, "yuvp") + FLAG(MP_IMGFLAG_YUV_NV, "nv") + FLAG(MP_IMGFLAG_COLOR_YUV, "yuv") + FLAG(MP_IMGFLAG_COLOR_RGB, "rgb") + FLAG(MP_IMGFLAG_COLOR_XYZ, "xyz") + FLAG(MP_IMGFLAG_GRAY, "gray") + FLAG(MP_IMGFLAG_LE, "le") + FLAG(MP_IMGFLAG_BE, "be") + FLAG(MP_IMGFLAG_TYPE_PAL8, "pal") + FLAG(MP_IMGFLAG_TYPE_HW, "hw") + FLAG(MP_IMGFLAG_TYPE_FLOAT, "float") + FLAG(MP_IMGFLAG_TYPE_UINT, "uint") + fprintf(f, "\n"); + fprintf(f, " planes=%d, chroma=%d:%d align=%d:%d\n", + d.num_planes, d.chroma_xs, d.chroma_ys, d.align_x, d.align_y); + fprintf(f, " {"); + for (int n = 0; n < MP_MAX_PLANES; n++) { + if (n >= d.num_planes) { + assert(d.bpp[n] == 0 && d.xs[n] == 0 && d.ys[n] == 0); + continue; + } + fprintf(f, "%d/[%d:%d] ", d.bpp[n], d.xs[n], d.ys[n]); + } + fprintf(f, "}\n"); + } else { + fprintf(f, " [NODESC]\n"); + } + + for (int n = 0; n < d.num_planes; n++) { + fprintf(f, " %d: %dbits", n, d.bpp[n]); + if (d.endian_shift) + fprintf(f, " endian_bytes=%d", 1 << d.endian_shift); + for (int x = 0; x < MP_NUM_COMPONENTS; x++) { + struct mp_imgfmt_comp_desc cm = d.comps[x]; + fprintf(f, " {"); + if (cm.plane == n) { + if (cm.size) { + fprintf(f, "%d:%d", cm.offset, cm.size); + if (cm.pad) + fprintf(f, "/%d", cm.pad); + } else { + assert(cm.offset == 0); + assert(cm.pad == 0); + } + } + fprintf(f, "}"); + if (!(d.flags & (MP_IMGFLAG_PACKED_SS_YUV | MP_IMGFLAG_HAS_COMPS))) + { + assert(cm.size == 0); + assert(cm.offset == 0); + assert(cm.pad == 0); + } + } + fprintf(f, "\n"); + if (d.flags & MP_IMGFLAG_PACKED_SS_YUV) { + assert(!(d.flags & MP_IMGFLAG_HAS_COMPS)); + uint8_t offsets[10]; + bool r = mp_imgfmt_get_packed_yuv_locations(mpfmt, offsets); + assert(r); + fprintf(f, " luma_offsets=["); + for (int x = 0; x < d.align_x; x++) + fprintf(f, " %d", offsets[x]); + fprintf(f, "]\n"); + } + } + + if (!(d.flags & MP_IMGFLAG_HWACCEL) && pixfmt != AV_PIX_FMT_NONE) { + AVFrame *fr = av_frame_alloc(); + fr->format = pixfmt; + fr->width = 128; + fr->height = 128; + int err = av_frame_get_buffer(fr, MP_IMAGE_BYTE_ALIGN); + assert(err >= 0); + struct mp_image *mpi = mp_image_alloc(mpfmt, fr->width, fr->height); + if (mpi) { + // A rather fuzzy test, which might fail even if there's no bug. + for (int n = 0; n < 4; n++) { + if (!!mpi->planes[n] != !!fr->data[n]) { + #ifdef AV_PIX_FMT_FLAG_PSEUDOPAL + if (n == 1 && (avd->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)) + continue; + #endif + fprintf(f, " Warning: p%d: %p %p\n", n, + mpi->planes[n], fr->data[n]); + } + if (mpi->stride[n] != fr->linesize[n]) { + fprintf(f, " Warning: p%d: %d %d\n", n, + mpi->stride[n], fr->linesize[n]); + } + } + } else { + fprintf(f, " [NOALLOC]\n"); + } + talloc_free(mpi); + av_frame_free(&fr); + } + + struct mp_regular_imgfmt reg; + if (mp_get_regular_imgfmt(®, mpfmt)) { + fprintf(f, " Regular: planes=%d compbytes=%d bitpad=%d " + "chroma=%dx%d ctype=%s\n", + reg.num_planes, reg.component_size, reg.component_pad, + 1 << reg.chroma_xs, 1 << reg.chroma_ys, + comp_type(reg.component_type)); + for (int n = 0; n < reg.num_planes; n++) { + struct mp_regular_imgfmt_plane *plane = ®.planes[n]; + fprintf(f, " %d: {", n); + for (int i = 0; i < plane->num_components; i++) { + if (i > 0) + fprintf(f, ", "); + fprintf(f, "%d", plane->components[i]); + } + fprintf(f, "}\n"); + } + } + + // This isn't ours, but changes likely affect us. + if (avd) { + fprintf(f, " AVD: name=%s chroma=%d:%d flags=0x%"PRIx64, avd->name, + avd->log2_chroma_w, avd->log2_chroma_h, avd->flags); + #define FLAGAV(t, c) if (avd->flags & (t)) \ + {fprintf(f, "%s[%s]", pre, c); pre = ""; } + char *pre = " "; + FLAGAV(AV_PIX_FMT_FLAG_BE, "be") + FLAGAV(AV_PIX_FMT_FLAG_PAL, "pal") + FLAGAV(AV_PIX_FMT_FLAG_BITSTREAM, "bs") + FLAGAV(AV_PIX_FMT_FLAG_HWACCEL, "hw") + FLAGAV(AV_PIX_FMT_FLAG_PLANAR, "planar") + FLAGAV(AV_PIX_FMT_FLAG_RGB, "rgb") + FLAGAV(AV_PIX_FMT_FLAG_ALPHA, "alpha") + FLAGAV(AV_PIX_FMT_FLAG_BAYER, "bayer") + FLAGAV(AV_PIX_FMT_FLAG_FLOAT, "float") + fprintf(f, "\n"); + for (int n = 0; n < avd->nb_components; n++) { + const AVComponentDescriptor *cd = &avd->comp[n]; + fprintf(f, " %d: p=%-2d st=%-2d o=%-2d sh=%-2d d=%d\n", + n, cd->plane, cd->step, cd->offset, cd->shift, cd->depth); + } + for (int n = avd->nb_components; n < 4; n++) { + const AVComponentDescriptor *cd = &avd->comp[n]; + assert(!cd->plane && !cd->step && !cd->offset && !cd->shift && + !cd->depth); + } + } + + const AVPixFmtDescriptor *avd2 = av_pix_fmt_desc_next(NULL); + for (; avd2; avd2 = av_pix_fmt_desc_next(avd2)) { + enum AVPixelFormat pixfmt2 = av_pix_fmt_desc_get_id(avd2); + int mpfmt2 = pixfmt2imgfmt(pixfmt2); + if (mpfmt2 == mpfmt && pixfmt2 != pixfmt) + fprintf(f, " Ambiguous alias: %s\n", avd2->name); + } + } + + for (int z = 0; z < num_pixfmt_unsup; z++) { + const AVPixFmtDescriptor *avd = av_pix_fmt_desc_get(pixfmt_unsup[z]); + fprintf(f, "Unsupported: %s\n", avd->name); + } + + fclose(f); + + assert_text_files_equal(refdir, outdir, "img_formats.txt", + "This can fail if FFmpeg adds new formats or flags."); + return 0; +} diff --git a/test/img_utils.c b/test/img_utils.c new file mode 100644 index 0000000..71764f3 --- /dev/null +++ b/test/img_utils.c @@ -0,0 +1,63 @@ +/* + * This file is part of mpv. + * + * mpv is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * mpv is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <assert.h> +#include <libavutil/frame.h> +#include <libavutil/pixdesc.h> + +#include "common/common.h" +#include "img_utils.h" +#include "video/img_format.h" +#include "video/fmt-conversion.h" + +int imgfmts[IMGFMT_AVPIXFMT_END - IMGFMT_AVPIXFMT_START + 100]; +int num_imgfmts; + +static enum AVPixelFormat pixfmt_unsup[100]; +static int num_pixfmt_unsup; + +static int cmp_imgfmt_name(const void *a, const void *b) +{ + char *name_a = mp_imgfmt_to_name(*(int *)a); + char *name_b = mp_imgfmt_to_name(*(int *)b); + + return strcmp(name_a, name_b); +} + +void init_imgfmts_list(void) +{ + const AVPixFmtDescriptor *avd = av_pix_fmt_desc_next(NULL); + for (; avd; avd = av_pix_fmt_desc_next(avd)) { + enum AVPixelFormat fmt = av_pix_fmt_desc_get_id(avd); + int mpfmt = pixfmt2imgfmt(fmt); + if (!mpfmt) { + assert(num_pixfmt_unsup < MP_ARRAY_SIZE(pixfmt_unsup)); + pixfmt_unsup[num_pixfmt_unsup++] = fmt; + } + } + + for (int fmt = IMGFMT_START; fmt <= IMGFMT_END; fmt++) { + struct mp_imgfmt_desc d = mp_imgfmt_get_desc(fmt); + enum AVPixelFormat pixfmt = imgfmt2pixfmt(fmt); + if (d.id || pixfmt != AV_PIX_FMT_NONE) { + assert(num_imgfmts < MP_ARRAY_SIZE(imgfmts)); // enlarge that array + imgfmts[num_imgfmts++] = fmt; + } + } + + qsort(imgfmts, num_imgfmts, sizeof(imgfmts[0]), cmp_imgfmt_name); +} diff --git a/test/img_utils.h b/test/img_utils.h new file mode 100644 index 0000000..2c21bcd --- /dev/null +++ b/test/img_utils.h @@ -0,0 +1,24 @@ +/* + * This file is part of mpv. + * + * mpv is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * mpv is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// Sorted list of valid imgfmts. Call init_imgfmts_list() before use. +extern int imgfmts[]; +extern int num_imgfmts; + +void init_imgfmts_list(void); diff --git a/test/json.c b/test/json.c new file mode 100644 index 0000000..8aeae23 --- /dev/null +++ b/test/json.c @@ -0,0 +1,87 @@ +#include "misc/json.h" +#include "misc/node.h" +#include "test_utils.h" + +struct entry { + const char *src; + const char *out_txt; + struct mpv_node out_data; + bool expect_fail; +}; + +#define TEXT(...) #__VA_ARGS__ + +#define VAL_LIST(...) (struct mpv_node[]){__VA_ARGS__} + +#define L(...) __VA_ARGS__ + +#define NODE_INT64(v) {.format = MPV_FORMAT_INT64, .u = { .int64 = (v) }} +#define NODE_STR(v) {.format = MPV_FORMAT_STRING, .u = { .string = (v) }} +#define NODE_BOOL(v) {.format = MPV_FORMAT_FLAG, .u = { .flag = (bool)(v) }} +#define NODE_FLOAT(v) {.format = MPV_FORMAT_DOUBLE, .u = { .double_ = (v) }} +#define NODE_NONE() {.format = MPV_FORMAT_NONE } +#define NODE_ARRAY(...) {.format = MPV_FORMAT_NODE_ARRAY, .u = { .list = \ + &(struct mpv_node_list) { \ + .num = sizeof(VAL_LIST(__VA_ARGS__)) / sizeof(struct mpv_node), \ + .values = VAL_LIST(__VA_ARGS__)}}} +#define NODE_MAP(k, v) {.format = MPV_FORMAT_NODE_MAP, .u = { .list = \ + &(struct mpv_node_list) { \ + .num = sizeof(VAL_LIST(v)) / sizeof(struct mpv_node), \ + .values = VAL_LIST(v), \ + .keys = (char**)(const char *[]){k}}}} + +static const struct entry entries[] = { + { "null", "null", NODE_NONE()}, + { "true", "true", NODE_BOOL(true)}, + { "false", "false", NODE_BOOL(false)}, + { "", .expect_fail = true}, + { "abc", .expect_fail = true}, + { " 123 ", "123", NODE_INT64(123)}, + { "123.25", "123.250000", NODE_FLOAT(123.25)}, + { TEXT("a\n\\\/\\\""), TEXT("a\n\\/\\\""), NODE_STR("a\n\\/\\\"")}, + { TEXT("a\u2c29"), TEXT("aⰩ"), NODE_STR("a\342\260\251")}, + { "[1,2,3]", "[1,2,3]", + NODE_ARRAY(NODE_INT64(1), NODE_INT64(2), NODE_INT64(3))}, + { "[ ]", "[]", NODE_ARRAY()}, + { "[1,,2]", .expect_fail = true}, + { "[,]", .expect_fail = true}, + { TEXT({"a":1, "b":2}), TEXT({"a":1,"b":2}), + NODE_MAP(L("a", "b"), L(NODE_INT64(1), NODE_INT64(2)))}, + { "{ }", "{}", NODE_MAP(L(), L())}, + { TEXT({"a":b}), .expect_fail = true}, + { TEXT({1a:"b"}), .expect_fail = true}, + + // non-standard extensions + { "[1,2,]", "[1,2]", NODE_ARRAY(NODE_INT64(1), NODE_INT64(2))}, + { TEXT({a:"b"}), TEXT({"a":"b"}), + NODE_MAP(L("a"), L(NODE_STR("b")))}, + { TEXT({a="b"}), TEXT({"a":"b"}), + NODE_MAP(L("a"), L(NODE_STR("b")))}, + { TEXT({a ="b"}), TEXT({"a":"b"}), + NODE_MAP(L("a"), L(NODE_STR("b")))}, + { TEXT({_a12="b"}), TEXT({"_a12":"b"}), + NODE_MAP(L("_a12"), L(NODE_STR("b")))}, +}; + +int main(void) +{ + for (int n = 0; n < MP_ARRAY_SIZE(entries); n++) { + const struct entry *e = &entries[n]; + void *tmp = talloc_new(NULL); + char *s = talloc_strdup(tmp, e->src); + json_skip_whitespace(&s); + struct mpv_node res; + bool ok = json_parse(tmp, &res, &s, MAX_JSON_DEPTH) >= 0; + assert_true(ok != e->expect_fail); + if (!ok) { + talloc_free(tmp); + continue; + } + char *d = talloc_strdup(tmp, ""); + assert_true(json_write(&d, &res) >= 0); + assert_string_equal(e->out_txt, d); + assert_true(equal_mpv_node(&e->out_data, &res)); + talloc_free(tmp); + } + return 0; +} diff --git a/test/libmpv_test.c b/test/libmpv_test.c new file mode 100644 index 0000000..fafef6a --- /dev/null +++ b/test/libmpv_test.c @@ -0,0 +1,271 @@ +/* + * This file is part of mpv. + * + * mpv is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * mpv is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <inttypes.h> +#include <libmpv/client.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +// Stolen from osdep/compiler.h +#ifdef __GNUC__ +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format(printf, a1, a2))) +#define MP_NORETURN __attribute__((noreturn)) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#define MP_NORETURN +#endif + +// Broken crap with __USE_MINGW_ANSI_STDIO +#if defined(__MINGW32__) && defined(__GNUC__) && !defined(__clang__) +#undef PRINTF_ATTRIBUTE +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (gnu_printf, a1, a2))) +#endif + +// Dummy values for test_options_and_properties +static const char *str = "string"; +static int flag = 1; +static int64_t int_ = 20; +static double double_ = 1.5; + +// Global handle. +static mpv_handle *ctx; + + +MP_NORETURN PRINTF_ATTRIBUTE(1, 2) +static void fail(const char *fmt, ...) +{ + if (fmt) { + va_list va; + va_start(va, fmt); + vfprintf(stderr, fmt, va); + va_end(va); + } + mpv_destroy(ctx); + exit(1); +} + +static void check_api_error(int status) +{ + if (status < 0) + fail("mpv API error: %s\n", mpv_error_string(status)); +} + +static void check_double(const char *property, double expect) +{ + double result_double; + check_api_error(mpv_get_property(ctx, property, MPV_FORMAT_DOUBLE, &result_double)); + if (expect != result_double) + fail("Double: expected '%f' but got '%f'!\n", expect, result_double); +} + +static void check_flag(const char *property, int expect) +{ + int result_flag; + check_api_error(mpv_get_property(ctx, property, MPV_FORMAT_FLAG, &result_flag)); + if (expect != result_flag) + fail("Flag: expected '%d' but got '%d'!\n", expect, result_flag); +} + +static void check_int(const char *property, int64_t expect) +{ + int64_t result_int; + check_api_error(mpv_get_property(ctx, property, MPV_FORMAT_INT64, &result_int)); + if (expect != result_int) + fail("Int: expected '%" PRId64 "' but got '%" PRId64 "'!\n", expect, result_int); +} + +static void check_string(const char *property, const char *expect) +{ + char *result_string; + check_api_error(mpv_get_property(ctx, property, MPV_FORMAT_STRING, &result_string)); + if (strcmp(expect, result_string) != 0) + fail("String: expected '%s' but got '%s'!\n", expect, result_string); + mpv_free(result_string); +} + +static void check_results(const char *properties[], enum mpv_format formats[]) +{ + for (int i = 0; properties[i]; i++) { + switch (formats[i]) { + case MPV_FORMAT_STRING: + check_string(properties[i], str); + break; + case MPV_FORMAT_FLAG: + check_flag(properties[i], flag); + break; + case MPV_FORMAT_INT64: + check_int(properties[i], int_); + break; + case MPV_FORMAT_DOUBLE: + check_double(properties[i], double_); + break; + } + } +} + +static void set_options_and_properties(const char *options[], const char *properties[], + enum mpv_format formats[]) +{ + for (int i = 0; options[i]; i++) { + switch (formats[i]) { + case MPV_FORMAT_STRING: + check_api_error(mpv_set_option(ctx, options[i], formats[i], &str)); + check_api_error(mpv_set_property(ctx, properties[i], formats[i], &str)); + break; + case MPV_FORMAT_FLAG: + check_api_error(mpv_set_option(ctx, options[i], formats[i], &flag)); + check_api_error(mpv_set_property(ctx, properties[i], formats[i], &flag)); + break; + case MPV_FORMAT_INT64: + check_api_error(mpv_set_option(ctx, options[i], formats[i], &int_)); + check_api_error(mpv_set_property(ctx, properties[i], formats[i], &int_)); + break; + case MPV_FORMAT_DOUBLE: + check_api_error(mpv_set_option(ctx, options[i], formats[i], &double_)); + check_api_error(mpv_set_property(ctx, properties[i], formats[i], &double_)); + break; + } + } +} + +static void test_file_loading(char *file) +{ + const char *cmd[] = {"loadfile", file, NULL}; + check_api_error(mpv_command(ctx, cmd)); + int loaded = 0; + int finished = 0; + while (!finished) { + mpv_event *event = mpv_wait_event(ctx, 0); + switch (event->event_id) { + case MPV_EVENT_FILE_LOADED: + // make sure it loads before exiting + loaded = 1; + break; + case MPV_EVENT_END_FILE: + if (loaded) + finished = 1; + break; + } + } + if (!finished) + fail("Unable to load test file!\n"); +} + +static void test_lavfi_complex(char *file) +{ + const char *cmd[] = {"loadfile", file, NULL}; + check_api_error(mpv_command(ctx, cmd)); + int finished = 0; + int loaded = 0; + while (!finished) { + mpv_event *event = mpv_wait_event(ctx, 0); + switch (event->event_id) { + case MPV_EVENT_FILE_LOADED: + // Add file as external and toggle lavfi-complex on. + if (!loaded) { + check_api_error(mpv_set_property_string(ctx, "external-files", file)); + const char *add_cmd[] = {"video-add", file, "auto", NULL}; + check_api_error(mpv_command(ctx, add_cmd)); + check_api_error(mpv_set_property_string(ctx, "lavfi-complex", "[vid1] [vid2] vstack [vo]")); + } + loaded = 1; + break; + case MPV_EVENT_END_FILE: + if (loaded) + finished = 1; + break; + } + } + if (!finished) + fail("Lavfi complex failed!\n"); +} + +// Ensure that setting options/properties work correctly and +// have the expected values. +static void test_options_and_properties(void) +{ + // Order matters. string -> flag -> int -> double (repeat) + // One for set_option the other for set_property + const char *options[] = { + "screen-name", + "save-position-on-quit", + "cursor-autohide", + "speed", + NULL + }; + + const char *properties[] = { + "fs-screen-name", + "shuffle", + "sub-pos", + "window-scale", + NULL + }; + + // Must match above ordering. + enum mpv_format formats[] = { + MPV_FORMAT_STRING, + MPV_FORMAT_FLAG, + MPV_FORMAT_INT64, + MPV_FORMAT_DOUBLE, + }; + + set_options_and_properties(options, properties, formats); + + check_api_error(mpv_initialize(ctx)); + + check_results(options, formats); + check_results(properties, formats); + + // Ensure the format is still MPV_FORMAT_FLAG for these property types. + mpv_node result_node; + check_api_error(mpv_get_property(ctx, "idle-active", MPV_FORMAT_NODE, &result_node)); + if (result_node.format != MPV_FORMAT_FLAG) + fail("Node: expected mpv format '%d' but got '%d'!\n", MPV_FORMAT_FLAG, result_node.format); + + // Always should be true. + if (result_node.u.flag != 1) + fail("Node: expected 1 but got %d'!\n", result_node.u.flag); +} + +int main(int argc, char *argv[]) +{ + if (argc != 2) + return 1; + + ctx = mpv_create(); + if (!ctx) + return 1; + + check_api_error(mpv_set_option_string(ctx, "vo", "null")); + check_api_error(mpv_set_option_string(ctx, "terminal", "yes")); + check_api_error(mpv_set_option_string(ctx, "msg-level", "all=debug")); + + const char *fmt = "================ TEST: %s ================\n"; + + printf(fmt, "test_options_and_properties"); + test_options_and_properties(); + printf(fmt, "test_file_loading"); + test_file_loading(argv[1]); + printf(fmt, "test_lavfi_complex"); + test_lavfi_complex(argv[1]); + + mpv_destroy(ctx); + return 0; +} diff --git a/test/linked_list.c b/test/linked_list.c new file mode 100644 index 0000000..691de35 --- /dev/null +++ b/test/linked_list.c @@ -0,0 +1,160 @@ +#include "common/common.h" +#include "misc/linked_list.h" +#include "test_utils.h" + +struct list_item { + int v; + struct { + struct list_item *prev, *next; + } list_node; +}; + +struct the_list { + struct list_item *head, *tail; +}; + +// This serves to remove some -Waddress "always true" warnings. +static struct list_item *STUPID_SHIT(struct list_item *item) +{ + return item; +} + +static bool do_check_list(struct the_list *lst, int *c, int num_c) +{ + if (!lst->head) + assert_true(!lst->tail); + if (!lst->tail) + assert_true(!lst->head); + + for (struct list_item *cur = lst->head; cur; cur = cur->list_node.next) { + if (cur->list_node.prev) { + assert_true(cur->list_node.prev->list_node.next == cur); + assert_true(lst->head != cur); + } else { + assert_true(lst->head == cur); + } + if (cur->list_node.next) { + assert_true(cur->list_node.next->list_node.prev == cur); + assert_true(lst->tail != cur); + } else { + assert_true(lst->tail == cur); + } + + if (num_c < 1) + return false; + if (c[0] != cur->v) + return false; + + num_c--; + c++; + } + + if (num_c) + return false; + + return true; +} + +int main(void) +{ + struct the_list lst = {0}; + struct list_item e1 = {1}; + struct list_item e2 = {2}; + struct list_item e3 = {3}; + struct list_item e4 = {4}; + struct list_item e5 = {5}; + struct list_item e6 = {6}; + +#define check_list(...) \ + assert_true(do_check_list(&lst, (int[]){__VA_ARGS__}, \ + sizeof((int[]){__VA_ARGS__}) / sizeof(int))); +#define check_list_empty() \ + assert_true(do_check_list(&lst, NULL, 0)); + + check_list_empty(); + LL_APPEND(list_node, &lst, &e1); + + check_list(1); + LL_APPEND(list_node, &lst, &e2); + + check_list(1, 2); + LL_APPEND(list_node, &lst, &e4); + + check_list(1, 2, 4); + LL_CLEAR(list_node, &lst); + + check_list_empty(); + LL_PREPEND(list_node, &lst, &e4); + + check_list(4); + LL_PREPEND(list_node, &lst, &e2); + + check_list(2, 4); + LL_PREPEND(list_node, &lst, &e1); + + check_list(1, 2, 4); + LL_CLEAR(list_node, &lst); + + check_list_empty(); + LL_INSERT_BEFORE(list_node, &lst, (struct list_item *)NULL, &e6); + + check_list(6); + LL_INSERT_BEFORE(list_node, &lst, (struct list_item *)NULL, &e1); + + check_list(6, 1); + LL_INSERT_BEFORE(list_node, &lst, (struct list_item *)NULL, &e2); + + check_list(6, 1, 2); + LL_INSERT_BEFORE(list_node, &lst, STUPID_SHIT(&e6), &e3); + + check_list(3, 6, 1, 2); + LL_INSERT_BEFORE(list_node, &lst, STUPID_SHIT(&e6), &e5); + + check_list(3, 5, 6, 1, 2); + LL_INSERT_BEFORE(list_node, &lst, STUPID_SHIT(&e2), &e4); + + check_list(3, 5, 6, 1, 4, 2); + LL_REMOVE(list_node, &lst, &e6); + + check_list(3, 5, 1, 4, 2); + LL_REMOVE(list_node, &lst, &e3); + + check_list(5, 1, 4, 2); + LL_REMOVE(list_node, &lst, &e2); + + check_list(5, 1, 4); + LL_REMOVE(list_node, &lst, &e4); + + check_list(5, 1); + LL_REMOVE(list_node, &lst, &e5); + + check_list(1); + LL_REMOVE(list_node, &lst, &e1); + + check_list_empty(); + LL_APPEND(list_node, &lst, &e2); + + check_list(2); + LL_REMOVE(list_node, &lst, &e2); + + check_list_empty(); + LL_INSERT_AFTER(list_node, &lst, (struct list_item *)NULL, &e1); + + check_list(1); + LL_INSERT_AFTER(list_node, &lst, (struct list_item *)NULL, &e2); + + check_list(2, 1); + LL_INSERT_AFTER(list_node, &lst, (struct list_item *)NULL, &e3); + + check_list(3, 2, 1); + LL_INSERT_AFTER(list_node, &lst, STUPID_SHIT(&e3), &e4); + + check_list(3, 4, 2, 1); + LL_INSERT_AFTER(list_node, &lst, STUPID_SHIT(&e4), &e5); + + check_list(3, 4, 5, 2, 1); + LL_INSERT_AFTER(list_node, &lst, STUPID_SHIT(&e1), &e6); + + check_list(3, 4, 5, 2, 1, 6); + return 0; +} diff --git a/test/meson.build b/test/meson.build new file mode 100644 index 0000000..ebd4395 --- /dev/null +++ b/test/meson.build @@ -0,0 +1,148 @@ +# So we don't have to reorganize the entire directory tree. +incdir = include_directories('../') +outdir = join_paths(build_root, 'test', 'out') +refdir = join_paths(source_root, 'test', 'ref') + +# Convenient testing libraries. An adhoc collection of +# mpv objects that test_utils.c needs. Paths and subprocesses +# are required in order to run a diff command when comparing +# different files. Stuff will probably break if core things are +# carelessly moved around. +test_utils_args = [] +test_utils_files = [ + 'audio/chmap.c', + 'audio/format.c', + 'common/common.c', + 'misc/bstr.c', + 'misc/dispatch.c', + 'misc/json.c', + 'misc/node.c', + 'misc/random.c', + 'misc/thread_tools.c', + 'options/m_config_core.c', + 'options/m_config_frontend.c', + 'options/m_option.c', + 'options/path.c', + 'osdep/io.c', + 'osdep/subprocess.c', + 'osdep/timer.c', + timer_source, + path_source, + subprocess_source, + 'ta/ta.c', + 'ta/ta_talloc.c', + 'ta/ta_utils.c' +] + +test_utils_deps = [libavutil, libm] + +if win32 + test_utils_files += 'osdep/windows_utils.c' +endif + +if features['pthread-debug'] + test_utils_files += 'osdep/threads-posix.c' +endif + +# The zimg code requires using threads. +if not features['win32-threads'] + test_utils_deps += pthreads +endif + +if features['win32-desktop'] + test_utils_deps += cc.find_library('winmm') +endif +test_utils_objects = libmpv.extract_objects(test_utils_files) +test_utils = static_library('test-utils', 'test_utils.c', include_directories: incdir, + c_args: test_utils_args, objects: test_utils_objects, + dependencies: test_utils_deps) + +# For getting imgfmts and stuff. +img_utils_files = [ + 'misc/thread_pool.c', + 'video/csputils.c', + 'video/fmt-conversion.c', + 'video/img_format.c', + 'video/mp_image.c', + 'video/out/placebo/utils.c', + 'video/sws_utils.c' +] +if features['zimg'] + img_utils_files += ['video/repack.c', 'video/zimg.c'] +endif + +img_utils_objects = libmpv.extract_objects(img_utils_files) +img_utils = static_library('img-utils', 'img_utils.c', include_directories: incdir, + dependencies: [libavcodec], objects: img_utils_objects) + +# The actual tests. +chmap_files = [ + 'audio/chmap_sel.c' +] +if features['av-channel-layout'] + chmap_files += 'audio/chmap_avchannel.c' +endif +chmap_objects = libmpv.extract_objects(chmap_files) +chmap = executable('chmap', 'chmap.c', include_directories: incdir, + dependencies: [libavutil], objects: chmap_objects, + link_with: test_utils) +test('chmap', chmap) + +gl_video_objects = libmpv.extract_objects('video/out/gpu/ra.c', + 'video/out/gpu/utils.c') +gl_video = executable('gl-video', 'gl_video.c', objects: gl_video_objects, + dependencies: [libavutil], include_directories: incdir, + link_with: [img_utils, test_utils]) +test('gl-video', gl_video) + +json = executable('json', 'json.c', include_directories: incdir, link_with: test_utils) +test('json', json) + +linked_list = executable('linked-list', files('linked_list.c'), include_directories: incdir) +test('linked-list', linked_list) + +timer = executable('timer', files('timer.c'), include_directories: incdir, link_with: test_utils) +test('timer', timer) + +paths_objects = libmpv.extract_objects('options/path.c', path_source) +paths = executable('paths', 'paths.c', include_directories: incdir, + objects: paths_objects, link_with: test_utils) +test('paths', paths) + +if get_option('libmpv') + libmpv_test = executable('libmpv-test', 'libmpv_test.c', + include_directories: incdir, link_with: libmpv) + file = join_paths(source_root, 'etc', 'mpv-icon-8bit-16x16.png') + test('libmpv', libmpv_test, args: file, timeout: 60) +endif + +# Minimum required libavutil version that works with these tests. +# Will need to be manually updated when ffmpeg adds/removes more formats in the future. +if libavutil.version().version_compare('>= 58.27.100') + +# The CI can randomly fail if libavutil isn't explicitly linked again here. + img_format = executable('img-format', 'img_format.c', include_directories: incdir, + dependencies: [libavutil, libplacebo], link_with: [img_utils, test_utils]) + test('img-format', img_format, args: [refdir, outdir], suite: 'ffmpeg') + + + scale_sws_objects = libmpv.extract_objects('video/image_writer.c', + 'video/repack.c') + scale_sws = executable('scale-sws', ['scale_sws.c', 'scale_test.c'], include_directories: incdir, + objects: scale_sws_objects, dependencies: [libavutil, libavformat, libswscale, jpeg, zimg, libplacebo], + link_with: [img_utils, test_utils]) + test('scale-sws', scale_sws, args: [refdir, outdir], suite: 'ffmpeg') + + if features['zimg'] + repack_objects = libmpv.extract_objects('sub/draw_bmp.c') + repack = executable('repack', 'repack.c', include_directories: incdir, objects: repack_objects, + dependencies: [libavutil, libswscale, zimg, libplacebo], link_with: [img_utils, test_utils]) + test('repack', repack, args: [refdir, outdir], suite: 'ffmpeg') + + scale_zimg_objects = libmpv.extract_objects('video/image_writer.c') + scale_zimg = executable('scale-zimg', ['scale_test.c', 'scale_zimg.c'], include_directories: incdir, + objects: scale_zimg_objects, dependencies:[libavutil, libavformat, libswscale, jpeg, zimg, libplacebo], + link_with: [img_utils, test_utils]) + test('scale-zimg', scale_zimg, args: [refdir, outdir], suite: 'ffmpeg') + endif +endif diff --git a/test/paths.c b/test/paths.c new file mode 100644 index 0000000..aa610db --- /dev/null +++ b/test/paths.c @@ -0,0 +1,65 @@ +#include "common/common.h" +#include "common/msg.h" +#include "config.h" +#include "options/path.h" +#include "test_utils.h" + +static void test_join(char *file, int line, char *a, char *b, char *c) +{ + char *res = mp_path_join(NULL, a, b); + if (strcmp(res, c) != 0) { + printf("%s:%d: '%s' + '%s' = '%s', expected '%s'\n", file, line, + a, b, res, c); + abort(); + } + talloc_free(res); +} + +static void test_abs(char *file, int line, bool abs, char *a) +{ + if (mp_path_is_absolute(bstr0(a)) != abs) { + printf("%s:%d: mp_path_is_absolute('%s') => %d, expected %d\n", + file, line, a, !abs, abs); + abort(); + } +} + +#define TEST_JOIN(a, b, c) \ + test_join(__FILE__, __LINE__, a, b, c); + +#define TEST_ABS(abs, a) \ + test_abs(__FILE__, __LINE__, abs, a) + +int main(void) +{ + TEST_ABS(true, "/ab"); + TEST_ABS(false, "ab"); + TEST_JOIN("", "", ""); + TEST_JOIN("a", "", "a"); + TEST_JOIN("/a", "", "/a"); + TEST_JOIN("", "b", "b"); + TEST_JOIN("", "/b", "/b"); + TEST_JOIN("ab", "cd", "ab/cd"); + TEST_JOIN("ab/", "cd", "ab/cd"); + TEST_JOIN("ab/", "/cd", "/cd"); + // Note: we prefer "/" on win32, but tolerate "\". +#if HAVE_DOS_PATHS + TEST_ABS(true, "\\ab"); + TEST_ABS(true, "c:\\"); + TEST_ABS(true, "c:/"); + TEST_ABS(false, "c:"); + TEST_ABS(false, "c:a"); + TEST_ABS(false, "c:a\\"); + TEST_JOIN("ab\\", "cd", "ab\\cd"); + TEST_JOIN("ab\\", "\\cd", "\\cd"); + TEST_JOIN("c:/", "de", "c:/de"); + TEST_JOIN("c:/a", "de", "c:/a/de"); + TEST_JOIN("c:\\a", "c:\\b", "c:\\b"); + TEST_JOIN("c:/a", "c:/b", "c:/b"); + // Note: drive-relative paths are not always supported "properly" + TEST_JOIN("c:/a", "d:b", "c:/a/d:b"); + TEST_JOIN("c:a", "b", "c:a/b"); + TEST_JOIN("c:", "b", "c:b"); +#endif + return 0; +} diff --git a/test/ref/draw_bmp.txt b/test/ref/draw_bmp.txt new file mode 100644 index 0000000..66de4de --- /dev/null +++ b/test/ref/draw_bmp.txt @@ -0,0 +1,249 @@ +0bgr = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +0rgb = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +abgr = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrap, a=unknown, ca=unknown, ca_f=unknown +argb = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrap, a=unknown, ca=unknown, ca_f=unknown +ayuv64 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +ayuv64be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +bayer_bggr16= no +bayer_bggr16be= no +bayer_bggr8 = no +bayer_gbrg16= no +bayer_gbrg16be= no +bayer_gbrg8 = no +bayer_grbg16= no +bayer_grbg16be= no +bayer_grbg8 = no +bayer_rggb16= no +bayer_rggb16be= no +bayer_rggb8 = no +bgr0 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr24 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr4 = no +bgr444 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr444be = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr48 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +bgr48be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +bgr4_byte = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr555 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr555be = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr565 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr565be = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgr8 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +bgra = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrap, a=unknown, ca=unknown, ca_f=unknown +bgra64 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +bgra64be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +cuda = no +d3d11 = no +d3d11va_vld = no +drm_prime = no +dxva2_vld = no +gbrap = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrap, a=unknown, ca=unknown, ca_f=unknown +gbrap10 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrap10be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrap12 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrap12be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrap14 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrap14be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrap16 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrap16be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrapf32 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrapf32be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +gbrp = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +gbrp1 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp10 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp10be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp12 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp12be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp14 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp14be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp16 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp16be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp2 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp3 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp4 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp5 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp6 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp9 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrp9be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrpf32 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gbrpf32be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +gray = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray10 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray10be = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray12 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray12be = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray14 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray14be = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray16 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray16be = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray9 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +gray9be = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +grayaf32 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayaf32, a=unknown, ca=unknown, ca_f=unknown +grayf32 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +grayf32be = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +mediacodec = no +mmal = no +monob = align=8:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +monow = align=8:1 ov=yap8 , ov_f=grayaf32, v_f=grayf32, a=unknown, ca=unknown, ca_f=unknown +nv12 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +nv16 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +nv20 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +nv20be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +nv21 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +nv24 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +nv42 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +opencl = no +p010 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +p010be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +p012 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +p012be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +p016 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +p016be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +p210 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +p210be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +p212 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +p212be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +p216 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +p216be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +p410 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +p410be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +p412 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +p412be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +p416 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +p416be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +pal8 = no +qsv = no +rgb0 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb24 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb30 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +rgb4 = no +rgb444 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb444be = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb48 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +rgb48be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +rgb4_byte = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb555 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb555be = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb565 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb565be = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgb8 = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrp, a=unknown, ca=unknown, ca_f=unknown +rgba = align=1:1 ov=unknown, ov_f=gbrap, v_f=gbrap, a=unknown, ca=unknown, ca_f=unknown +rgba64 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +rgba64be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrapf32, a=unknown, ca=unknown, ca_f=unknown +rgbaf16 = no +rgbaf16be = no +rgbaf32 = no +rgbaf32be = no +rgbf32 = no +rgbf32be = no +uyvy422 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +uyyvyy411 = no +vaapi = no +vdpau = no +vdpau_output= no +videotoolbox= no +vulkan = no +vuya = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +vuyx = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +x2bgr10 = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +x2bgr10be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +x2rgb10be = align=1:1 ov=unknown, ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +xv30 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +xv30be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +xv36 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +xv36be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +xvmc = no +xyz12 = align=1:1 ov=gbrap , ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +xyz12be = align=1:1 ov=gbrap , ov_f=gbrapf32, v_f=gbrpf32, a=unknown, ca=unknown, ca_f=unknown +y1 = no +y210 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +y210be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +y212 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +y212be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +ya16 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayaf32, a=unknown, ca=unknown, ca_f=unknown +ya16be = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayaf32, a=unknown, ca=unknown, ca_f=unknown +ya8 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayaf32, a=unknown, ca=unknown, ca_f=unknown +yap16 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayaf32, a=unknown, ca=unknown, ca_f=unknown +yap8 = align=1:1 ov=yap8 , ov_f=grayaf32, v_f=grayaf32, a=unknown, ca=unknown, ca_f=unknown +yuv410p = no +yuv410pf = no +yuv411p = no +yuv411pf = no +yuv420p = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p10 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p10be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p12 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p12be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p14 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p14be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p16 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p16be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p9 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420p9be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv420pf = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuv420pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p10 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p10be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p12 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p12be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p14 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p14be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p16 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p16be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p9 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422p9be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv422pf = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuv440p = no +yuv440p10 = no +yuv440p10be = no +yuv440p12 = no +yuv440p12be = no +yuv440pf = no +yuv444p = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p10 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p10be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p12 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p12be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p14 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p14be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p16 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p16be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p9 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444p9be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuv444pf = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuv444pf, a=unknown, ca=unknown, ca_f=unknown +yuva410pf = no +yuva411pf = no +yuva420p = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva420p10 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva420p10be= align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva420p16 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva420p16be= align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva420p9 = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva420p9be = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva420pf = align=2:2 ov=yuva420p, ov_f=yuva420pf, v_f=yuva420pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p10 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p10be= align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p12 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p12be= align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p16 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p16be= align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p9 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422p9be = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva422pf = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuva422pf, a=gray, ca=gray, ca_f=grayf32 +yuva440pf = no +yuva444p = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p10 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p10be= align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p12 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p12be= align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p16 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p16be= align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p9 = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444p9be = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuva444pf = align=1:1 ov=yuva444p, ov_f=yuva444pf, v_f=yuva444pf, a=unknown, ca=unknown, ca_f=unknown +yuvj411p = no +yuvj422p = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yuvj440p = no +yuyv422 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 +yvyu422 = align=2:1 ov=yuva422p, ov_f=yuva422pf, v_f=yuv422pf, a=gray, ca=gray, ca_f=grayf32 diff --git a/test/ref/img_formats.txt b/test/ref/img_formats.txt new file mode 100644 index 0000000..9a3826b --- /dev/null +++ b/test/ref/img_formats.txt @@ -0,0 +1,2834 @@ +0bgr: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {24:8} {16:8} {8:8} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {0, 3, 2, 1} + AVD: name=0bgr chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=4 o=3 sh=0 d=8 + 1: p=0 st=4 o=2 sh=0 d=8 + 2: p=0 st=4 o=1 sh=0 d=8 +0rgb: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {8:8} {16:8} {24:8} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {0, 1, 2, 3} + AVD: name=0rgb chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=4 o=1 sh=0 d=8 + 1: p=0 st=4 o=2 sh=0 d=8 + 2: p=0 st=4 o=3 sh=0 d=8 +abgr: fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {24:8} {16:8} {8:8} {0:8} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {4, 3, 2, 1} + AVD: name=abgr chroma=0:0 flags=0xa0 [rgb][alpha] + 0: p=0 st=4 o=3 sh=0 d=8 + 1: p=0 st=4 o=2 sh=0 d=8 + 2: p=0 st=4 o=1 sh=0 d=8 + 3: p=0 st=4 o=0 sh=0 d=8 +argb: fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {8:8} {16:8} {24:8} {0:8} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {4, 1, 2, 3} + AVD: name=argb chroma=0:0 flags=0xa0 [rgb][alpha] + 0: p=0 st=4 o=1 sh=0 d=8 + 1: p=0 st=4 o=2 sh=0 d=8 + 2: p=0 st=4 o=3 sh=0 d=8 + 3: p=0 st=4 o=0 sh=0 d=8 +ayuv64: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuv][le][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits {16:16} {32:16} {48:16} {0:16} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {4, 1, 2, 3} + AVD: name=ayuv64le chroma=0:0 flags=0x80 [alpha] + 0: p=0 st=8 o=2 sh=0 d=16 + 1: p=0 st=8 o=4 sh=0 d=16 + 2: p=0 st=8 o=6 sh=0 d=16 + 3: p=0 st=8 o=0 sh=0 d=16 +ayuv64be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuv][be][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits endian_bytes=2 {16:16} {32:16} {48:16} {0:16} + AVD: name=ayuv64be chroma=0:0 flags=0x81 [be][alpha] + 0: p=0 st=8 o=2 sh=0 d=16 + 1: p=0 st=8 o=4 sh=0 d=16 + 2: p=0 st=8 o=6 sh=0 d=16 + 3: p=0 st=8 o=0 sh=0 d=16 +bayer_bggr16: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {} {} {} {} + AVD: name=bayer_bggr16le chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_bggr16be: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {} {} {} {} + AVD: name=bayer_bggr16be chroma=0:0 flags=0x121 [be][rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_bggr8: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {} {} {} {} + AVD: name=bayer_bggr8 chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=1 o=0 sh=0 d=2 + 1: p=0 st=1 o=0 sh=0 d=4 + 2: p=0 st=1 o=0 sh=0 d=2 +bayer_gbrg16: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {} {} {} {} + AVD: name=bayer_gbrg16le chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_gbrg16be: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {} {} {} {} + AVD: name=bayer_gbrg16be chroma=0:0 flags=0x121 [be][rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_gbrg8: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {} {} {} {} + AVD: name=bayer_gbrg8 chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=1 o=0 sh=0 d=2 + 1: p=0 st=1 o=0 sh=0 d=4 + 2: p=0 st=1 o=0 sh=0 d=2 +bayer_grbg16: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {} {} {} {} + AVD: name=bayer_grbg16le chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_grbg16be: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {} {} {} {} + AVD: name=bayer_grbg16be chroma=0:0 flags=0x121 [be][rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_grbg8: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {} {} {} {} + AVD: name=bayer_grbg8 chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=1 o=0 sh=0 d=2 + 1: p=0 st=1 o=0 sh=0 d=4 + 2: p=0 st=1 o=0 sh=0 d=2 +bayer_rggb16: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {} {} {} {} + AVD: name=bayer_rggb16le chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_rggb16be: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {} {} {} {} + AVD: name=bayer_rggb16be chroma=0:0 flags=0x121 [be][rgb][bayer] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=0 d=8 + 2: p=0 st=2 o=0 sh=0 d=4 +bayer_rggb8: [GENERIC] fcsp=rgb ctype=unknown + Basic desc: [ba][rgb][le][be] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {} {} {} {} + AVD: name=bayer_rggb8 chroma=0:0 flags=0x120 [rgb][bayer] + 0: p=0 st=1 o=0 sh=0 d=2 + 1: p=0 st=1 o=0 sh=0 d=4 + 2: p=0 st=1 o=0 sh=0 d=2 +bgr0: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {16:8} {8:8} {0:8} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {3, 2, 1, 0} + AVD: name=bgr0 chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=4 o=2 sh=0 d=8 + 1: p=0 st=4 o=1 sh=0 d=8 + 2: p=0 st=4 o=0 sh=0 d=8 +bgr24: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {24/[0:0] } + 0: 24bits {16:8} {8:8} {0:8} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {3, 2, 1} + AVD: name=bgr24 chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=3 o=2 sh=0 d=8 + 1: p=0 st=3 o=1 sh=0 d=8 + 2: p=0 st=3 o=0 sh=0 d=8 +bgr4: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [rgb][le][be][uint] + planes=1, chroma=0:0 align=2:1 + {4/[0:0] } + 0: 4bits {3:1} {1:2} {0:1} {} + AVD: name=bgr4 chroma=0:0 flags=0x24 [bs][rgb] + 0: p=0 st=4 o=3 sh=0 d=1 + 1: p=0 st=4 o=1 sh=0 d=2 + 2: p=0 st=4 o=0 sh=0 d=1 +bgr444: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:4} {4:4} {8:4} {} + AVD: name=bgr444le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=4 d=4 + 2: p=0 st=2 o=1 sh=0 d=4 +bgr444be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:4} {4:4} {8:4} {} + AVD: name=bgr444be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=2 o=0 sh=0 d=4 + 1: p=0 st=2 o=0 sh=4 d=4 + 2: p=0 st=2 o=-1 sh=0 d=4 +bgr48: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {48/[0:0] } + 0: 48bits {32:16} {16:16} {0:16} {} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {3, 2, 1} + AVD: name=bgr48le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=6 o=4 sh=0 d=16 + 1: p=0 st=6 o=2 sh=0 d=16 + 2: p=0 st=6 o=0 sh=0 d=16 +bgr48be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {48/[0:0] } + 0: 48bits endian_bytes=2 {32:16} {16:16} {0:16} {} + AVD: name=bgr48be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=6 o=4 sh=0 d=16 + 1: p=0 st=6 o=2 sh=0 d=16 + 2: p=0 st=6 o=0 sh=0 d=16 +bgr4_byte: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {0:1} {1:2} {3:1} {} + AVD: name=bgr4_byte chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=1 o=0 sh=0 d=1 + 1: p=0 st=1 o=0 sh=1 d=2 + 2: p=0 st=1 o=0 sh=3 d=1 +bgr555: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:5} {5:5} {10:5} {} + AVD: name=bgr555le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=2 o=0 sh=0 d=5 + 1: p=0 st=2 o=0 sh=5 d=5 + 2: p=0 st=2 o=1 sh=2 d=5 +bgr555be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:5} {5:5} {10:5} {} + AVD: name=bgr555be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=2 o=0 sh=0 d=5 + 1: p=0 st=2 o=0 sh=5 d=5 + 2: p=0 st=2 o=-1 sh=2 d=5 +bgr565: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:5} {5:6} {11:5} {} + AVD: name=bgr565le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=2 o=0 sh=0 d=5 + 1: p=0 st=2 o=0 sh=5 d=6 + 2: p=0 st=2 o=1 sh=3 d=5 +bgr565be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:5} {5:6} {11:5} {} + AVD: name=bgr565be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=2 o=0 sh=0 d=5 + 1: p=0 st=2 o=0 sh=5 d=6 + 2: p=0 st=2 o=-1 sh=3 d=5 +bgr8: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {0:3} {3:3} {6:2} {} + AVD: name=bgr8 chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=1 o=0 sh=0 d=3 + 1: p=0 st=1 o=0 sh=3 d=3 + 2: p=0 st=1 o=0 sh=6 d=2 +bgra: fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {16:8} {8:8} {0:8} {24:8} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {3, 2, 1, 4} + AVD: name=bgra chroma=0:0 flags=0xa0 [rgb][alpha] + 0: p=0 st=4 o=2 sh=0 d=8 + 1: p=0 st=4 o=1 sh=0 d=8 + 2: p=0 st=4 o=0 sh=0 d=8 + 3: p=0 st=4 o=3 sh=0 d=8 +bgra64: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits {32:16} {16:16} {0:16} {48:16} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {3, 2, 1, 4} + AVD: name=bgra64le chroma=0:0 flags=0xa0 [rgb][alpha] + 0: p=0 st=8 o=4 sh=0 d=16 + 1: p=0 st=8 o=2 sh=0 d=16 + 2: p=0 st=8 o=0 sh=0 d=16 + 3: p=0 st=8 o=6 sh=0 d=16 +bgra64be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits endian_bytes=2 {32:16} {16:16} {0:16} {48:16} + AVD: name=bgra64be chroma=0:0 flags=0xa1 [be][rgb][alpha] + 0: p=0 st=8 o=4 sh=0 d=16 + 1: p=0 st=8 o=2 sh=0 d=16 + 2: p=0 st=8 o=0 sh=0 d=16 + 3: p=0 st=8 o=6 sh=0 d=16 +cuda: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=cuda chroma=0:0 flags=0x8 [hw] +d3d11: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=d3d11 chroma=0:0 flags=0x8 [hw] +d3d11va_vld: [GENERIC] ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=1:1 align=2:2 + {} + AVD: name=d3d11va_vld chroma=1:1 flags=0x8 [hw] +drm_prime: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=drm_prime chroma=0:0 flags=0x8 [hw] +dxva2_vld: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=1:1 align=2:2 + {} + AVD: name=dxva2_vld chroma=1:1 flags=0x8 [hw] +gbrap: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][be][uint] + planes=4, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8} {} {} + 1: 8bits {} {} {0:8} {} + 2: 8bits {0:8} {} {} {} + 3: 8bits {} {} {} {0:8} + Regular: planes=4 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + 3: {4} + AVD: name=gbrap chroma=0:0 flags=0xb0 [planar][rgb][alpha] + 0: p=2 st=1 o=0 sh=0 d=8 + 1: p=0 st=1 o=0 sh=0 d=8 + 2: p=1 st=1 o=0 sh=0 d=8 + 3: p=3 st=1 o=0 sh=0 d=8 +gbrap10: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16/-6} {} {} + 1: 16bits {} {} {0:16/-6} {} + 2: 16bits {0:16/-6} {} {} {} + 3: 16bits {} {} {} {0:16/-6} + Regular: planes=4 compbytes=2 bitpad=-6 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + 3: {4} + AVD: name=gbrap10le chroma=0:0 flags=0xb0 [planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=10 + 1: p=0 st=2 o=0 sh=0 d=10 + 2: p=1 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +gbrap10be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16/-6} {} + 2: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-6} + AVD: name=gbrap10be chroma=0:0 flags=0xb1 [be][planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=10 + 1: p=0 st=2 o=0 sh=0 d=10 + 2: p=1 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +gbrap12: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16/-4} {} {} + 1: 16bits {} {} {0:16/-4} {} + 2: 16bits {0:16/-4} {} {} {} + 3: 16bits {} {} {} {0:16/-4} + Regular: planes=4 compbytes=2 bitpad=-4 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + 3: {4} + AVD: name=gbrap12le chroma=0:0 flags=0xb0 [planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=12 + 1: p=0 st=2 o=0 sh=0 d=12 + 2: p=1 st=2 o=0 sh=0 d=12 + 3: p=3 st=2 o=0 sh=0 d=12 +gbrap12be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16/-4} {} + 2: 16bits endian_bytes=2 {0:16/-4} {} {} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-4} + AVD: name=gbrap12be chroma=0:0 flags=0xb1 [be][planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=12 + 1: p=0 st=2 o=0 sh=0 d=12 + 2: p=1 st=2 o=0 sh=0 d=12 + 3: p=3 st=2 o=0 sh=0 d=12 +gbrap14: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16/-2} {} {} + 1: 16bits {} {} {0:16/-2} {} + 2: 16bits {0:16/-2} {} {} {} + 3: 16bits {} {} {} {0:16/-2} + Regular: planes=4 compbytes=2 bitpad=-2 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + 3: {4} + AVD: name=gbrap14le chroma=0:0 flags=0xb0 [planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=14 + 1: p=0 st=2 o=0 sh=0 d=14 + 2: p=1 st=2 o=0 sh=0 d=14 + 3: p=3 st=2 o=0 sh=0 d=14 +gbrap14be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16/-2} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16/-2} {} + 2: 16bits endian_bytes=2 {0:16/-2} {} {} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-2} + AVD: name=gbrap14be chroma=0:0 flags=0xb1 [be][planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=14 + 1: p=0 st=2 o=0 sh=0 d=14 + 2: p=1 st=2 o=0 sh=0 d=14 + 3: p=3 st=2 o=0 sh=0 d=14 +gbrap16: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16} {} {} + 1: 16bits {} {} {0:16} {} + 2: 16bits {0:16} {} {} {} + 3: 16bits {} {} {} {0:16} + Regular: planes=4 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + 3: {4} + AVD: name=gbrap16le chroma=0:0 flags=0xb0 [planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=16 + 1: p=0 st=2 o=0 sh=0 d=16 + 2: p=1 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +gbrap16be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16} {} + 2: 16bits endian_bytes=2 {0:16} {} {} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16} + AVD: name=gbrap16be chroma=0:0 flags=0xb1 [be][planar][rgb][alpha] + 0: p=2 st=2 o=0 sh=0 d=16 + 1: p=0 st=2 o=0 sh=0 d=16 + 2: p=1 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +gbrapf32: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][bb][a][rgb][le][float] + planes=4, chroma=0:0 align=1:1 + {32/[0:0] 32/[0:0] 32/[0:0] 32/[0:0] } + 0: 32bits {} {0:32} {} {} + 1: 32bits {} {} {0:32} {} + 2: 32bits {0:32} {} {} {} + 3: 32bits {} {} {} {0:32} + Regular: planes=4 compbytes=4 bitpad=0 chroma=1x1 ctype=float + 0: {2} + 1: {3} + 2: {1} + 3: {4} + AVD: name=gbrapf32le chroma=0:0 flags=0x2b0 [planar][rgb][alpha][float] + 0: p=2 st=4 o=0 sh=0 d=32 + 1: p=0 st=4 o=0 sh=0 d=32 + 2: p=1 st=4 o=0 sh=0 d=32 + 3: p=3 st=4 o=0 sh=0 d=32 +gbrapf32be: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][bb][a][rgb][be][float] + planes=4, chroma=0:0 align=1:1 + {32/[0:0] 32/[0:0] 32/[0:0] 32/[0:0] } + 0: 32bits endian_bytes=4 {} {0:32} {} {} + 1: 32bits endian_bytes=4 {} {} {0:32} {} + 2: 32bits endian_bytes=4 {0:32} {} {} {} + 3: 32bits endian_bytes=4 {} {} {} {0:32} + AVD: name=gbrapf32be chroma=0:0 flags=0x2b1 [be][planar][rgb][alpha][float] + 0: p=2 st=4 o=0 sh=0 d=32 + 1: p=0 st=4 o=0 sh=0 d=32 + 2: p=1 st=4 o=0 sh=0 d=32 + 3: p=3 st=4 o=0 sh=0 d=32 +gbrp: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][be][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8} {} {} + 1: 8bits {} {} {0:8} {} + 2: 8bits {0:8} {} {} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + AVD: name=gbrp chroma=0:0 flags=0x30 [planar][rgb] + 0: p=2 st=1 o=0 sh=0 d=8 + 1: p=0 st=1 o=0 sh=0 d=8 + 2: p=1 st=1 o=0 sh=0 d=8 +gbrp1: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8/-7} {} {} + 1: 8bits {} {} {0:8/-7} {} + 2: 8bits {0:8/-7} {} {} {} + Regular: planes=3 compbytes=1 bitpad=-7 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} +gbrp10: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16/-6} {} {} + 1: 16bits {} {} {0:16/-6} {} + 2: 16bits {0:16/-6} {} {} {} + Regular: planes=3 compbytes=2 bitpad=-6 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + AVD: name=gbrp10le chroma=0:0 flags=0x30 [planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=10 + 1: p=0 st=2 o=0 sh=0 d=10 + 2: p=1 st=2 o=0 sh=0 d=10 +gbrp10be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16/-6} {} + 2: 16bits endian_bytes=2 {0:16/-6} {} {} {} + AVD: name=gbrp10be chroma=0:0 flags=0x31 [be][planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=10 + 1: p=0 st=2 o=0 sh=0 d=10 + 2: p=1 st=2 o=0 sh=0 d=10 +gbrp12: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16/-4} {} {} + 1: 16bits {} {} {0:16/-4} {} + 2: 16bits {0:16/-4} {} {} {} + Regular: planes=3 compbytes=2 bitpad=-4 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + AVD: name=gbrp12le chroma=0:0 flags=0x30 [planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=12 + 1: p=0 st=2 o=0 sh=0 d=12 + 2: p=1 st=2 o=0 sh=0 d=12 +gbrp12be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16/-4} {} + 2: 16bits endian_bytes=2 {0:16/-4} {} {} {} + AVD: name=gbrp12be chroma=0:0 flags=0x31 [be][planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=12 + 1: p=0 st=2 o=0 sh=0 d=12 + 2: p=1 st=2 o=0 sh=0 d=12 +gbrp14: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16/-2} {} {} + 1: 16bits {} {} {0:16/-2} {} + 2: 16bits {0:16/-2} {} {} {} + Regular: planes=3 compbytes=2 bitpad=-2 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + AVD: name=gbrp14le chroma=0:0 flags=0x30 [planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=14 + 1: p=0 st=2 o=0 sh=0 d=14 + 2: p=1 st=2 o=0 sh=0 d=14 +gbrp14be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16/-2} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16/-2} {} + 2: 16bits endian_bytes=2 {0:16/-2} {} {} {} + AVD: name=gbrp14be chroma=0:0 flags=0x31 [be][planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=14 + 1: p=0 st=2 o=0 sh=0 d=14 + 2: p=1 st=2 o=0 sh=0 d=14 +gbrp16: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16} {} {} + 1: 16bits {} {} {0:16} {} + 2: 16bits {0:16} {} {} {} + Regular: planes=3 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + AVD: name=gbrp16le chroma=0:0 flags=0x30 [planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=16 + 1: p=0 st=2 o=0 sh=0 d=16 + 2: p=1 st=2 o=0 sh=0 d=16 +gbrp16be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16} {} + 2: 16bits endian_bytes=2 {0:16} {} {} {} + AVD: name=gbrp16be chroma=0:0 flags=0x31 [be][planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=16 + 1: p=0 st=2 o=0 sh=0 d=16 + 2: p=1 st=2 o=0 sh=0 d=16 +gbrp2: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8/-6} {} {} + 1: 8bits {} {} {0:8/-6} {} + 2: 8bits {0:8/-6} {} {} {} + Regular: planes=3 compbytes=1 bitpad=-6 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} +gbrp3: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8/-5} {} {} + 1: 8bits {} {} {0:8/-5} {} + 2: 8bits {0:8/-5} {} {} {} + Regular: planes=3 compbytes=1 bitpad=-5 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} +gbrp4: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8/-4} {} {} + 1: 8bits {} {} {0:8/-4} {} + 2: 8bits {0:8/-4} {} {} {} + Regular: planes=3 compbytes=1 bitpad=-4 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} +gbrp5: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8/-3} {} {} + 1: 8bits {} {} {0:8/-3} {} + 2: 8bits {0:8/-3} {} {} {} + Regular: planes=3 compbytes=1 bitpad=-3 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} +gbrp6: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {} {0:8/-2} {} {} + 1: 8bits {} {} {0:8/-2} {} + 2: 8bits {0:8/-2} {} {} {} + Regular: planes=3 compbytes=1 bitpad=-2 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} +gbrp9: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {} {0:16/-7} {} {} + 1: 16bits {} {} {0:16/-7} {} + 2: 16bits {0:16/-7} {} {} {} + Regular: planes=3 compbytes=2 bitpad=-7 chroma=1x1 ctype=uint + 0: {2} + 1: {3} + 2: {1} + AVD: name=gbrp9le chroma=0:0 flags=0x30 [planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=9 + 1: p=0 st=2 o=0 sh=0 d=9 + 2: p=1 st=2 o=0 sh=0 d=9 +gbrp9be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {} {0:16/-7} {} {} + 1: 16bits endian_bytes=2 {} {} {0:16/-7} {} + 2: 16bits endian_bytes=2 {0:16/-7} {} {} {} + AVD: name=gbrp9be chroma=0:0 flags=0x31 [be][planar][rgb] + 0: p=2 st=2 o=0 sh=0 d=9 + 1: p=0 st=2 o=0 sh=0 d=9 + 2: p=1 st=2 o=0 sh=0 d=9 +gbrpf32: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][bb][rgb][le][float] + planes=3, chroma=0:0 align=1:1 + {32/[0:0] 32/[0:0] 32/[0:0] } + 0: 32bits {} {0:32} {} {} + 1: 32bits {} {} {0:32} {} + 2: 32bits {0:32} {} {} {} + Regular: planes=3 compbytes=4 bitpad=0 chroma=1x1 ctype=float + 0: {2} + 1: {3} + 2: {1} + AVD: name=gbrpf32le chroma=0:0 flags=0x230 [planar][rgb][float] + 0: p=2 st=4 o=0 sh=0 d=32 + 1: p=0 st=4 o=0 sh=0 d=32 + 2: p=1 st=4 o=0 sh=0 d=32 +gbrpf32be: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][bb][rgb][be][float] + planes=3, chroma=0:0 align=1:1 + {32/[0:0] 32/[0:0] 32/[0:0] } + 0: 32bits endian_bytes=4 {} {0:32} {} {} + 1: 32bits endian_bytes=4 {} {} {0:32} {} + 2: 32bits endian_bytes=4 {0:32} {} {} {} + AVD: name=gbrpf32be chroma=0:0 flags=0x231 [be][planar][rgb][float] + 0: p=2 st=4 o=0 sh=0 d=32 + 1: p=0 st=4 o=0 sh=0 d=32 + 2: p=1 st=4 o=0 sh=0 d=32 +gray: ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {0:8} {} {} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + AVD: name=gray chroma=0:0 flags=0x0 + 0: p=0 st=1 o=0 sh=0 d=8 +gray10: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:16/-6} {} {} {} + Regular: planes=1 compbytes=2 bitpad=-6 chroma=1x1 ctype=uint + 0: {1} + AVD: name=gray10le chroma=0:0 flags=0x0 + 0: p=0 st=2 o=0 sh=0 d=10 +gray10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + AVD: name=gray10be chroma=0:0 flags=0x1 [be] + 0: p=0 st=2 o=0 sh=0 d=10 +gray12: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:16/-4} {} {} {} + Regular: planes=1 compbytes=2 bitpad=-4 chroma=1x1 ctype=uint + 0: {1} + AVD: name=gray12le chroma=0:0 flags=0x0 + 0: p=0 st=2 o=0 sh=0 d=12 +gray12be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-4} {} {} {} + AVD: name=gray12be chroma=0:0 flags=0x1 [be] + 0: p=0 st=2 o=0 sh=0 d=12 +gray14: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:16/-2} {} {} {} + Regular: planes=1 compbytes=2 bitpad=-2 chroma=1x1 ctype=uint + 0: {1} + AVD: name=gray14le chroma=0:0 flags=0x0 + 0: p=0 st=2 o=0 sh=0 d=14 +gray14be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-2} {} {} {} + AVD: name=gray14be chroma=0:0 flags=0x1 [be] + 0: p=0 st=2 o=0 sh=0 d=14 +gray16: ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:16} {} {} {} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + AVD: name=gray16le chroma=0:0 flags=0x0 + 0: p=0 st=2 o=0 sh=0 d=16 +gray16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + AVD: name=gray16be chroma=0:0 flags=0x1 [be] + 0: p=0 st=2 o=0 sh=0 d=16 +gray9: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:16/-7} {} {} {} + Regular: planes=1 compbytes=2 bitpad=-7 chroma=1x1 ctype=uint + 0: {1} + AVD: name=gray9le chroma=0:0 flags=0x0 + 0: p=0 st=2 o=0 sh=0 d=9 +gray9be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][gray][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-7} {} {} {} + AVD: name=gray9be chroma=0:0 flags=0x1 [be] + 0: p=0 st=2 o=0 sh=0 d=9 +grayaf32: ctype=float + Basic desc: [ba][bb][a][yuv][gray][le][float] + planes=2, chroma=0:0 align=1:1 + {32/[0:0] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {} {} {0:32} + Regular: planes=2 compbytes=4 bitpad=0 chroma=1x1 ctype=float + 0: {1} + 1: {4} +grayf32: [GENERIC] ctype=float + Basic desc: [ba][bb][yuv][gray][le][float] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {0:32} {} {} {} + Regular: planes=1 compbytes=4 bitpad=0 chroma=1x1 ctype=float + 0: {1} + AVD: name=grayf32le chroma=0:0 flags=0x200 [float] + 0: p=0 st=4 o=0 sh=0 d=32 +grayf32be: [GENERIC] ctype=float + Basic desc: [ba][bb][yuv][gray][be][float] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits endian_bytes=4 {0:32} {} {} {} + AVD: name=grayf32be chroma=0:0 flags=0x201 [be][float] + 0: p=0 st=4 o=0 sh=0 d=32 +mediacodec: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=mediacodec chroma=0:0 flags=0x8 [hw] +mmal: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=mmal chroma=0:0 flags=0x8 [hw] +monob: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [rgb][gray][le][be][uint] + planes=1, chroma=0:0 align=8:1 + {1/[0:0] } + 0: 1bits {0:1} {} {} {} + AVD: name=monob chroma=0:0 flags=0x4 [bs] + 0: p=0 st=1 o=0 sh=7 d=1 +monow: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [rgb][gray][le][be][uint] + planes=1, chroma=0:0 align=8:1 + {1/[0:0] } + 0: 1bits {0:1} {} {} {} + AVD: name=monow chroma=0:0 flags=0x4 [bs] + 0: p=0 st=1 o=0 sh=0 d=1 +nv12: ctype=uint + Basic desc: [ba][bb][nv][yuv][le][be][uint] + planes=2, chroma=1:1 align=2:2 + {8/[0:0] 16/[1:1] } + 0: 8bits {0:8} {} {} {} + 1: 16bits {} {0:8} {8:8} {} + Regular: planes=2 compbytes=1 bitpad=0 chroma=2x2 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=nv12 chroma=1:1 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=2 o=0 sh=0 d=8 + 2: p=1 st=2 o=1 sh=0 d=8 +nv16: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][be][uint] + planes=2, chroma=1:0 align=2:1 + {8/[0:0] 16/[1:0] } + 0: 8bits {0:8} {} {} {} + 1: 16bits {} {0:8} {8:8} {} + Regular: planes=2 compbytes=1 bitpad=0 chroma=2x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=nv16 chroma=1:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=2 o=0 sh=0 d=8 + 2: p=1 st=2 o=1 sh=0 d=8 +nv20: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits {0:16/-6} {} {} {} + 1: 32bits {} {0:16/-6} {16:16/-6} {} + Regular: planes=2 compbytes=2 bitpad=-6 chroma=2x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=nv20le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=4 o=0 sh=0 d=10 + 2: p=1 st=4 o=2 sh=0 d=10 +nv20be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16/-6} {16:16/-6} {} + AVD: name=nv20be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=4 o=0 sh=0 d=10 + 2: p=1 st=4 o=2 sh=0 d=10 +nv21: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][be][uint] + planes=2, chroma=1:1 align=2:2 + {8/[0:0] 16/[1:1] } + 0: 8bits {0:8} {} {} {} + 1: 16bits {} {8:8} {0:8} {} + Regular: planes=2 compbytes=1 bitpad=0 chroma=2x2 ctype=uint + 0: {1} + 1: {3, 2} + AVD: name=nv21 chroma=1:1 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=2 o=1 sh=0 d=8 + 2: p=1 st=2 o=0 sh=0 d=8 +nv24: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][be][uint] + planes=2, chroma=0:0 align=1:1 + {8/[0:0] 16/[0:0] } + 0: 8bits {0:8} {} {} {} + 1: 16bits {} {0:8} {8:8} {} + Regular: planes=2 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=nv24 chroma=0:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=2 o=0 sh=0 d=8 + 2: p=1 st=2 o=1 sh=0 d=8 +nv42: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][be][uint] + planes=2, chroma=0:0 align=1:1 + {8/[0:0] 16/[0:0] } + 0: 8bits {0:8} {} {} {} + 1: 16bits {} {8:8} {0:8} {} + Regular: planes=2 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {3, 2} + AVD: name=nv42 chroma=0:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=2 o=1 sh=0 d=8 + 2: p=1 st=2 o=0 sh=0 d=8 +opencl: [GENERIC] ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=opencl chroma=0:0 flags=0x8 [hw] +p010: ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=1:1 align=2:2 + {16/[0:0] 32/[1:1] } + 0: 16bits {0:16/6} {} {} {} + 1: 32bits {} {0:16/6} {16:16/6} {} + Regular: planes=2 compbytes=2 bitpad=6 chroma=2x2 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p010le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=6 d=10 + 1: p=1 st=4 o=0 sh=6 d=10 + 2: p=1 st=4 o=2 sh=6 d=10 +p010be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=1:1 align=2:2 + {16/[0:0] 32/[1:1] } + 0: 16bits endian_bytes=2 {0:16/6} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16/6} {16:16/6} {} + AVD: name=p010be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=6 d=10 + 1: p=1 st=4 o=0 sh=6 d=10 + 2: p=1 st=4 o=2 sh=6 d=10 +p012: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=1:1 align=2:2 + {16/[0:0] 32/[1:1] } + 0: 16bits {0:16/4} {} {} {} + 1: 32bits {} {0:16/4} {16:16/4} {} + Regular: planes=2 compbytes=2 bitpad=4 chroma=2x2 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p012le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=4 d=12 + 1: p=1 st=4 o=0 sh=4 d=12 + 2: p=1 st=4 o=2 sh=4 d=12 +p012be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=1:1 align=2:2 + {16/[0:0] 32/[1:1] } + 0: 16bits endian_bytes=2 {0:16/4} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16/4} {16:16/4} {} + AVD: name=p012be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=4 d=12 + 1: p=1 st=4 o=0 sh=4 d=12 + 2: p=1 st=4 o=2 sh=4 d=12 +p016: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=1:1 align=2:2 + {16/[0:0] 32/[1:1] } + 0: 16bits {0:16} {} {} {} + 1: 32bits {} {0:16} {16:16} {} + Regular: planes=2 compbytes=2 bitpad=0 chroma=2x2 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p016le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=4 o=0 sh=0 d=16 + 2: p=1 st=4 o=2 sh=0 d=16 +p016be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=1:1 align=2:2 + {16/[0:0] 32/[1:1] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16} {16:16} {} + AVD: name=p016be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=4 o=0 sh=0 d=16 + 2: p=1 st=4 o=2 sh=0 d=16 +p210: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits {0:16/6} {} {} {} + 1: 32bits {} {0:16/6} {16:16/6} {} + Regular: planes=2 compbytes=2 bitpad=6 chroma=2x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p210le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=6 d=10 + 1: p=1 st=4 o=0 sh=6 d=10 + 2: p=1 st=4 o=2 sh=6 d=10 +p210be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits endian_bytes=2 {0:16/6} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16/6} {16:16/6} {} + AVD: name=p210be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=6 d=10 + 1: p=1 st=4 o=0 sh=6 d=10 + 2: p=1 st=4 o=2 sh=6 d=10 +p212: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits {0:16/4} {} {} {} + 1: 32bits {} {0:16/4} {16:16/4} {} + Regular: planes=2 compbytes=2 bitpad=4 chroma=2x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p212le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=4 d=12 + 1: p=1 st=4 o=0 sh=4 d=12 + 2: p=1 st=4 o=2 sh=4 d=12 +p212be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits endian_bytes=2 {0:16/4} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16/4} {16:16/4} {} + AVD: name=p212be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=4 d=12 + 1: p=1 st=4 o=0 sh=4 d=12 + 2: p=1 st=4 o=2 sh=4 d=12 +p216: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits {0:16} {} {} {} + 1: 32bits {} {0:16} {16:16} {} + Regular: planes=2 compbytes=2 bitpad=0 chroma=2x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p216le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=4 o=0 sh=0 d=16 + 2: p=1 st=4 o=2 sh=0 d=16 +p216be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=1:0 align=2:1 + {16/[0:0] 32/[1:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16} {16:16} {} + AVD: name=p216be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=4 o=0 sh=0 d=16 + 2: p=1 st=4 o=2 sh=0 d=16 +p410: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=0:0 align=1:1 + {16/[0:0] 32/[0:0] } + 0: 16bits {0:16/6} {} {} {} + 1: 32bits {} {0:16/6} {16:16/6} {} + Regular: planes=2 compbytes=2 bitpad=6 chroma=1x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p410le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=6 d=10 + 1: p=1 st=4 o=0 sh=6 d=10 + 2: p=1 st=4 o=2 sh=6 d=10 +p410be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=0:0 align=1:1 + {16/[0:0] 32/[0:0] } + 0: 16bits endian_bytes=2 {0:16/6} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16/6} {16:16/6} {} + AVD: name=p410be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=6 d=10 + 1: p=1 st=4 o=0 sh=6 d=10 + 2: p=1 st=4 o=2 sh=6 d=10 +p412: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=0:0 align=1:1 + {16/[0:0] 32/[0:0] } + 0: 16bits {0:16/4} {} {} {} + 1: 32bits {} {0:16/4} {16:16/4} {} + Regular: planes=2 compbytes=2 bitpad=4 chroma=1x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p412le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=4 d=12 + 1: p=1 st=4 o=0 sh=4 d=12 + 2: p=1 st=4 o=2 sh=4 d=12 +p412be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=0:0 align=1:1 + {16/[0:0] 32/[0:0] } + 0: 16bits endian_bytes=2 {0:16/4} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16/4} {16:16/4} {} + AVD: name=p412be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=4 d=12 + 1: p=1 st=4 o=0 sh=4 d=12 + 2: p=1 st=4 o=2 sh=4 d=12 +p416: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][le][uint] + planes=2, chroma=0:0 align=1:1 + {16/[0:0] 32/[0:0] } + 0: 16bits {0:16} {} {} {} + 1: 32bits {} {0:16} {16:16} {} + Regular: planes=2 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {2, 3} + AVD: name=p416le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=4 o=0 sh=0 d=16 + 2: p=1 st=4 o=2 sh=0 d=16 +p416be: [GENERIC] ctype=uint + Basic desc: [ba][bb][nv][yuv][be][uint] + planes=2, chroma=0:0 align=1:1 + {16/[0:0] 32/[0:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 32bits endian_bytes=2 {} {0:16} {16:16} {} + AVD: name=p416be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=4 o=0 sh=0 d=16 + 2: p=1 st=4 o=2 sh=0 d=16 +pal8: fcsp=rgb ctype=unknown + Basic desc: [ba][a][rgb][le][be][pal] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {} {} {} {} + AVD: name=pal8 chroma=0:0 flags=0x82 [pal][alpha] + 0: p=0 st=1 o=0 sh=0 d=8 +qsv: [GENERIC] ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=qsv chroma=0:0 flags=0x8 [hw] +rgb0: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {0:8} {8:8} {16:8} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1, 2, 3, 0} + AVD: name=rgb0 chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=4 o=0 sh=0 d=8 + 1: p=0 st=4 o=1 sh=0 d=8 + 2: p=0 st=4 o=2 sh=0 d=8 +rgb24: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {24/[0:0] } + 0: 24bits {0:8} {8:8} {16:8} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1, 2, 3} + AVD: name=rgb24 chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=3 o=0 sh=0 d=8 + 1: p=0 st=3 o=1 sh=0 d=8 + 2: p=0 st=3 o=2 sh=0 d=8 +rgb30: fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {20:10} {10:10} {0:10} {} + AVD: name=x2rgb10le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=4 o=2 sh=4 d=10 + 1: p=0 st=4 o=1 sh=2 d=10 + 2: p=0 st=4 o=0 sh=0 d=10 +rgb4: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [rgb][le][be][uint] + planes=1, chroma=0:0 align=2:1 + {4/[0:0] } + 0: 4bits {0:1} {1:2} {3:1} {} + AVD: name=rgb4 chroma=0:0 flags=0x24 [bs][rgb] + 0: p=0 st=4 o=0 sh=0 d=1 + 1: p=0 st=4 o=1 sh=0 d=2 + 2: p=0 st=4 o=3 sh=0 d=1 +rgb444: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {8:4} {4:4} {0:4} {} + AVD: name=rgb444le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=2 o=1 sh=0 d=4 + 1: p=0 st=2 o=0 sh=4 d=4 + 2: p=0 st=2 o=0 sh=0 d=4 +rgb444be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {8:4} {4:4} {0:4} {} + AVD: name=rgb444be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=2 o=-1 sh=0 d=4 + 1: p=0 st=2 o=0 sh=4 d=4 + 2: p=0 st=2 o=0 sh=0 d=4 +rgb48: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {48/[0:0] } + 0: 48bits {0:16} {16:16} {32:16} {} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1, 2, 3} + AVD: name=rgb48le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=6 o=0 sh=0 d=16 + 1: p=0 st=6 o=2 sh=0 d=16 + 2: p=0 st=6 o=4 sh=0 d=16 +rgb48be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {48/[0:0] } + 0: 48bits endian_bytes=2 {0:16} {16:16} {32:16} {} + AVD: name=rgb48be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=6 o=0 sh=0 d=16 + 1: p=0 st=6 o=2 sh=0 d=16 + 2: p=0 st=6 o=4 sh=0 d=16 +rgb4_byte: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {3:1} {1:2} {0:1} {} + AVD: name=rgb4_byte chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=1 o=0 sh=3 d=1 + 1: p=0 st=1 o=0 sh=1 d=2 + 2: p=0 st=1 o=0 sh=0 d=1 +rgb555: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {10:5} {5:5} {0:5} {} + AVD: name=rgb555le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=2 o=1 sh=2 d=5 + 1: p=0 st=2 o=0 sh=5 d=5 + 2: p=0 st=2 o=0 sh=0 d=5 +rgb555be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {10:5} {5:5} {0:5} {} + AVD: name=rgb555be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=2 o=-1 sh=2 d=5 + 1: p=0 st=2 o=0 sh=5 d=5 + 2: p=0 st=2 o=0 sh=0 d=5 +rgb565: fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {11:5} {5:6} {0:5} {} + AVD: name=rgb565le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=2 o=1 sh=3 d=5 + 1: p=0 st=2 o=0 sh=5 d=6 + 2: p=0 st=2 o=0 sh=0 d=5 +rgb565be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits endian_bytes=2 {11:5} {5:6} {0:5} {} + AVD: name=rgb565be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=2 o=-1 sh=3 d=5 + 1: p=0 st=2 o=0 sh=5 d=6 + 2: p=0 st=2 o=0 sh=0 d=5 +rgb8: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {5:3} {2:3} {0:2} {} + AVD: name=rgb8 chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=1 o=0 sh=6 d=2 + 1: p=0 st=1 o=0 sh=3 d=3 + 2: p=0 st=1 o=0 sh=0 d=3 +rgba: fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {0:8} {8:8} {16:8} {24:8} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1, 2, 3, 4} + AVD: name=rgba chroma=0:0 flags=0xa0 [rgb][alpha] + 0: p=0 st=4 o=0 sh=0 d=8 + 1: p=0 st=4 o=1 sh=0 d=8 + 2: p=0 st=4 o=2 sh=0 d=8 + 3: p=0 st=4 o=3 sh=0 d=8 +rgba64: fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits {0:16} {16:16} {32:16} {48:16} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1, 2, 3, 4} + AVD: name=rgba64le chroma=0:0 flags=0xa0 [rgb][alpha] + 0: p=0 st=8 o=0 sh=0 d=16 + 1: p=0 st=8 o=2 sh=0 d=16 + 2: p=0 st=8 o=4 sh=0 d=16 + 3: p=0 st=8 o=6 sh=0 d=16 +rgba64be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][bb][a][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits endian_bytes=2 {0:16} {16:16} {32:16} {48:16} + AVD: name=rgba64be chroma=0:0 flags=0xa1 [be][rgb][alpha] + 0: p=0 st=8 o=0 sh=0 d=16 + 1: p=0 st=8 o=2 sh=0 d=16 + 2: p=0 st=8 o=4 sh=0 d=16 + 3: p=0 st=8 o=6 sh=0 d=16 +rgbaf16: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][bb][a][rgb][le][float] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits {0:16} {16:16} {32:16} {48:16} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=float + 0: {1, 2, 3, 4} + AVD: name=rgbaf16le chroma=0:0 flags=0x2a0 [rgb][alpha][float] + 0: p=0 st=8 o=0 sh=0 d=16 + 1: p=0 st=8 o=2 sh=0 d=16 + 2: p=0 st=8 o=4 sh=0 d=16 + 3: p=0 st=8 o=6 sh=0 d=16 +rgbaf16be: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][bb][a][rgb][be][float] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits endian_bytes=2 {0:16} {16:16} {32:16} {48:16} + AVD: name=rgbaf16be chroma=0:0 flags=0x2a1 [be][rgb][alpha][float] + 0: p=0 st=8 o=0 sh=0 d=16 + 1: p=0 st=8 o=2 sh=0 d=16 + 2: p=0 st=8 o=4 sh=0 d=16 + 3: p=0 st=8 o=6 sh=0 d=16 +rgbaf32: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][a][rgb][le][be][float] + planes=1, chroma=0:0 align=1:1 + {-128/[0:0] } + 0: -128bits {} {} {} {} + [NOALLOC] + AVD: name=rgbaf32le chroma=0:0 flags=0x2a0 [rgb][alpha][float] + 0: p=0 st=16 o=0 sh=0 d=32 + 1: p=0 st=16 o=4 sh=0 d=32 + 2: p=0 st=16 o=8 sh=0 d=32 + 3: p=0 st=16 o=12 sh=0 d=32 +rgbaf32be: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][a][rgb][le][be][float] + planes=1, chroma=0:0 align=1:1 + {-128/[0:0] } + 0: -128bits endian_bytes=4 {} {} {} {} + [NOALLOC] + AVD: name=rgbaf32be chroma=0:0 flags=0x2a1 [be][rgb][alpha][float] + 0: p=0 st=16 o=0 sh=0 d=32 + 1: p=0 st=16 o=4 sh=0 d=32 + 2: p=0 st=16 o=8 sh=0 d=32 + 3: p=0 st=16 o=12 sh=0 d=32 +rgbf32: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][rgb][le][be][float] + planes=1, chroma=0:0 align=1:1 + {96/[0:0] } + 0: 96bits {} {} {} {} + AVD: name=rgbf32le chroma=0:0 flags=0x220 [rgb][float] + 0: p=0 st=12 o=0 sh=0 d=32 + 1: p=0 st=12 o=4 sh=0 d=32 + 2: p=0 st=12 o=8 sh=0 d=32 +rgbf32be: [GENERIC] fcsp=rgb ctype=float + Basic desc: [ba][rgb][le][be][float] + planes=1, chroma=0:0 align=1:1 + {96/[0:0] } + 0: 96bits endian_bytes=4 {} {} {} {} + AVD: name=rgbf32be chroma=0:0 flags=0x221 [be][rgb][float] + 0: p=0 st=12 o=0 sh=0 d=32 + 1: p=0 st=12 o=4 sh=0 d=32 + 2: p=0 st=12 o=8 sh=0 d=32 +uyvy422: ctype=uint + Basic desc: [ba][yuv][le][be][uint] + planes=1, chroma=1:0 align=2:1 + {16/[0:0] } + 0: 16bits {8:8} {0:8} {16:8} {} + luma_offsets=[ 8 24] + AVD: name=uyvy422 chroma=1:0 flags=0x0 + 0: p=0 st=2 o=1 sh=0 d=8 + 1: p=0 st=4 o=0 sh=0 d=8 + 2: p=0 st=4 o=2 sh=0 d=8 +uyyvyy411: [GENERIC] ctype=uint + Basic desc: [yuv][le][be][uint] + planes=1, chroma=2:0 align=4:1 + {12/[0:0] } + 0: 12bits {8:8} {0:8} {24:8} {} + luma_offsets=[ 8 16 32 40] + AVD: name=uyyvyy411 chroma=2:0 flags=0x0 + 0: p=0 st=4 o=1 sh=0 d=8 + 1: p=0 st=6 o=0 sh=0 d=8 + 2: p=0 st=6 o=3 sh=0 d=8 +vaapi: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=1:1 align=2:2 + {} + AVD: name=vaapi chroma=1:1 flags=0x8 [hw] +vdpau: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=1:1 align=2:2 + {} + AVD: name=vdpau chroma=1:1 flags=0x8 [hw] +vdpau_output: fcsp=rgb ctype=unknown + Basic desc: [rgb][le][hw] + planes=0, chroma=0:0 align=1:1 + {} +videotoolbox: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=videotoolbox_vld chroma=0:0 flags=0x8 [hw] +vulkan: ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=vulkan chroma=0:0 flags=0x8 [hw] +vuya: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuv][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {16:8} {8:8} {0:8} {24:8} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {3, 2, 1, 4} + AVD: name=vuya chroma=0:0 flags=0x80 [alpha] + 0: p=0 st=4 o=2 sh=0 d=8 + 1: p=0 st=4 o=1 sh=0 d=8 + 2: p=0 st=4 o=0 sh=0 d=8 + 3: p=0 st=4 o=3 sh=0 d=8 +vuyx: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuv][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {16:8} {8:8} {0:8} {} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {3, 2, 1, 0} + AVD: name=vuyx chroma=0:0 flags=0x0 + 0: p=0 st=4 o=2 sh=0 d=8 + 1: p=0 st=4 o=1 sh=0 d=8 + 2: p=0 st=4 o=0 sh=0 d=8 +x2bgr10: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][le][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {0:10} {10:10} {20:10} {} + AVD: name=x2bgr10le chroma=0:0 flags=0x20 [rgb] + 0: p=0 st=4 o=0 sh=0 d=10 + 1: p=0 st=4 o=1 sh=2 d=10 + 2: p=0 st=4 o=2 sh=4 d=10 +x2bgr10be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits endian_bytes=4 {0:10} {10:10} {20:10} {} + AVD: name=x2bgr10be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=4 o=2 sh=0 d=10 + 1: p=0 st=4 o=1 sh=2 d=10 + 2: p=0 st=4 o=0 sh=4 d=10 +x2rgb10be: [GENERIC] fcsp=rgb ctype=uint + Basic desc: [ba][rgb][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits endian_bytes=4 {20:10} {10:10} {0:10} {} + AVD: name=x2rgb10be chroma=0:0 flags=0x21 [be][rgb] + 0: p=0 st=4 o=0 sh=4 d=10 + 1: p=0 st=4 o=1 sh=2 d=10 + 2: p=0 st=4 o=2 sh=0 d=10 +xv30: [GENERIC] ctype=uint + Basic desc: [ba][yuv][le][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {10:10} {0:10} {20:10} {} + AVD: name=xv30le chroma=0:0 flags=0x0 + 0: p=0 st=4 o=1 sh=2 d=10 + 1: p=0 st=4 o=0 sh=0 d=10 + 2: p=0 st=4 o=2 sh=4 d=10 +xv30be: [GENERIC] ctype=unknown + Basic desc: [ba][yuv][le][be] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits endian_bytes=4 {} {} {} {} + AVD: name=xv30be chroma=0:0 flags=0x5 [be][bs] + 0: p=0 st=32 o=10 sh=0 d=10 + 1: p=0 st=32 o=0 sh=0 d=10 + 2: p=0 st=32 o=20 sh=0 d=10 +xv36: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuv][le][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits {16:16/4} {0:16/4} {32:16/4} {} + Regular: planes=1 compbytes=2 bitpad=4 chroma=1x1 ctype=uint + 0: {2, 1, 3, 0} + AVD: name=xv36le chroma=0:0 flags=0x0 + 0: p=0 st=8 o=2 sh=4 d=12 + 1: p=0 st=8 o=0 sh=4 d=12 + 2: p=0 st=8 o=4 sh=4 d=12 +xv36be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuv][be][uint] + planes=1, chroma=0:0 align=1:1 + {64/[0:0] } + 0: 64bits endian_bytes=2 {16:16/4} {0:16/4} {32:16/4} {} + AVD: name=xv36be chroma=0:0 flags=0x1 [be] + 0: p=0 st=8 o=2 sh=4 d=12 + 1: p=0 st=8 o=0 sh=4 d=12 + 2: p=0 st=8 o=4 sh=4 d=12 +xvmc: [GENERIC] ctype=unknown + Basic desc: [le][be][hw] + planes=0, chroma=0:0 align=1:1 + {} + AVD: name=xvmc chroma=0:0 flags=0x8 [hw] +xyz12: [GENERIC] fcsp=xyz ctype=uint + Basic desc: [ba][bb][xyz][le][uint] + planes=1, chroma=0:0 align=1:1 + {48/[0:0] } + 0: 48bits {0:16/4} {16:16/4} {32:16/4} {} + Regular: planes=1 compbytes=2 bitpad=4 chroma=1x1 ctype=uint + 0: {1, 2, 3} + AVD: name=xyz12le chroma=0:0 flags=0x0 + 0: p=0 st=6 o=0 sh=4 d=12 + 1: p=0 st=6 o=2 sh=4 d=12 + 2: p=0 st=6 o=4 sh=4 d=12 +xyz12be: [GENERIC] fcsp=xyz ctype=uint + Basic desc: [ba][bb][xyz][be][uint] + planes=1, chroma=0:0 align=1:1 + {48/[0:0] } + 0: 48bits endian_bytes=2 {0:16/4} {16:16/4} {32:16/4} {} + AVD: name=xyz12be chroma=0:0 flags=0x1 [be] + 0: p=0 st=6 o=0 sh=4 d=12 + 1: p=0 st=6 o=2 sh=4 d=12 + 2: p=0 st=6 o=4 sh=4 d=12 +y1: fcsp=rgb ctype=uint + Basic desc: [ba][bb][rgb][gray][le][uint] + planes=1, chroma=0:0 align=1:1 + {8/[0:0] } + 0: 8bits {0:8/-7} {} {} {} + Regular: planes=1 compbytes=1 bitpad=-7 chroma=1x1 ctype=uint + 0: {1} +y210: [GENERIC] ctype=uint + Basic desc: [ba][yuv][le][uint] + planes=1, chroma=1:0 align=2:1 + {32/[0:0] } + 0: 32bits {0:16/6} {16:16/6} {48:16/6} {} + luma_offsets=[ 0 32] + AVD: name=y210le chroma=1:0 flags=0x0 + 0: p=0 st=4 o=0 sh=6 d=10 + 1: p=0 st=8 o=2 sh=6 d=10 + 2: p=0 st=8 o=6 sh=6 d=10 +y210be: [GENERIC] ctype=uint + Basic desc: [ba][yuv][be][uint] + planes=1, chroma=1:0 align=2:1 + {32/[0:0] } + 0: 32bits endian_bytes=2 {0:16/6} {16:16/6} {48:16/6} {} + luma_offsets=[ 0 32] + AVD: name=y210be chroma=1:0 flags=0x1 [be] + 0: p=0 st=4 o=0 sh=6 d=10 + 1: p=0 st=8 o=2 sh=6 d=10 + 2: p=0 st=8 o=6 sh=6 d=10 +y212: [GENERIC] ctype=uint + Basic desc: [ba][yuv][le][uint] + planes=1, chroma=1:0 align=2:1 + {32/[0:0] } + 0: 32bits {0:16/4} {16:16/4} {48:16/4} {} + luma_offsets=[ 0 32] + AVD: name=y212le chroma=1:0 flags=0x0 + 0: p=0 st=4 o=0 sh=4 d=12 + 1: p=0 st=8 o=2 sh=4 d=12 + 2: p=0 st=8 o=6 sh=4 d=12 +y212be: [GENERIC] ctype=uint + Basic desc: [ba][yuv][be][uint] + planes=1, chroma=1:0 align=2:1 + {32/[0:0] } + 0: 32bits endian_bytes=2 {0:16/4} {16:16/4} {48:16/4} {} + luma_offsets=[ 0 32] + AVD: name=y212be chroma=1:0 flags=0x1 [be] + 0: p=0 st=4 o=0 sh=4 d=12 + 1: p=0 st=8 o=2 sh=4 d=12 + 2: p=0 st=8 o=6 sh=4 d=12 +ya16: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuv][gray][le][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits {0:16} {} {} {16:16} + Regular: planes=1 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1, 4} + AVD: name=ya16le chroma=0:0 flags=0x80 [alpha] + 0: p=0 st=4 o=0 sh=0 d=16 + 1: p=0 st=4 o=2 sh=0 d=16 +ya16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuv][gray][be][uint] + planes=1, chroma=0:0 align=1:1 + {32/[0:0] } + 0: 32bits endian_bytes=2 {0:16} {} {} {16:16} + AVD: name=ya16be chroma=0:0 flags=0x81 [be][alpha] + 0: p=0 st=4 o=0 sh=0 d=16 + 1: p=0 st=4 o=2 sh=0 d=16 +ya8: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuv][gray][le][be][uint] + planes=1, chroma=0:0 align=1:1 + {16/[0:0] } + 0: 16bits {0:8} {} {} {8:8} + Regular: planes=1 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1, 4} + AVD: name=ya8 chroma=0:0 flags=0x80 [alpha] + 0: p=0 st=2 o=0 sh=0 d=8 + 1: p=0 st=2 o=1 sh=0 d=8 +yap16: ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][gray][le][uint] + planes=2, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] } + 0: 16bits {0:16} {} {} {} + 1: 16bits {} {} {} {0:16} + Regular: planes=2 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {4} +yap8: ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][gray][le][uint] + planes=2, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {} {} {0:8} + Regular: planes=2 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {4} +yuv410p: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=2:2 align=4:4 + {8/[0:0] 8/[2:2] 8/[2:2] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=4x4 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv410p chroma=2:2 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 +yuv410pf: ctype=float + Basic desc: [ba][bb][yuv][le][float] + planes=3, chroma=2:2 align=4:4 + {32/[0:0] 32/[2:2] 32/[2:2] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + Regular: planes=3 compbytes=4 bitpad=0 chroma=4x4 ctype=float + 0: {1} + 1: {2} + 2: {3} +yuv411p: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=2:0 align=4:1 + {8/[0:0] 8/[2:0] 8/[2:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=4x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv411p chroma=2:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 +yuv411pf: ctype=float + Basic desc: [ba][bb][yuv][le][float] + planes=3, chroma=2:0 align=4:1 + {32/[0:0] 32/[2:0] 32/[2:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + Regular: planes=3 compbytes=4 bitpad=0 chroma=4x1 ctype=float + 0: {1} + 1: {2} + 2: {3} +yuv420p: ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=1:1 align=2:2 + {8/[0:0] 8/[1:1] 8/[1:1] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv420p chroma=1:1 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 + Ambiguous alias: yuvj420p +yuv420p10: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits {0:16/-6} {} {} {} + 1: 16bits {} {0:16/-6} {} {} + 2: 16bits {} {} {0:16/-6} {} + Regular: planes=3 compbytes=2 bitpad=-6 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv420p10le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv420p10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-6} {} + AVD: name=yuv420p10be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv420p12: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits {0:16/-4} {} {} {} + 1: 16bits {} {0:16/-4} {} {} + 2: 16bits {} {} {0:16/-4} {} + Regular: planes=3 compbytes=2 bitpad=-4 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv420p12le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv420p12be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits endian_bytes=2 {0:16/-4} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-4} {} + AVD: name=yuv420p12be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv420p14: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits {0:16/-2} {} {} {} + 1: 16bits {} {0:16/-2} {} {} + 2: 16bits {} {} {0:16/-2} {} + Regular: planes=3 compbytes=2 bitpad=-2 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv420p14le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=14 + 1: p=1 st=2 o=0 sh=0 d=14 + 2: p=2 st=2 o=0 sh=0 d=14 +yuv420p14be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits endian_bytes=2 {0:16/-2} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-2} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-2} {} + AVD: name=yuv420p14be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=14 + 1: p=1 st=2 o=0 sh=0 d=14 + 2: p=2 st=2 o=0 sh=0 d=14 +yuv420p16: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits {0:16} {} {} {} + 1: 16bits {} {0:16} {} {} + 2: 16bits {} {} {0:16} {} + Regular: planes=3 compbytes=2 bitpad=0 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv420p16le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 +yuv420p16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16} {} + AVD: name=yuv420p16be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 +yuv420p9: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits {0:16/-7} {} {} {} + 1: 16bits {} {0:16/-7} {} {} + 2: 16bits {} {} {0:16/-7} {} + Regular: planes=3 compbytes=2 bitpad=-7 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv420p9le chroma=1:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 +yuv420p9be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] } + 0: 16bits endian_bytes=2 {0:16/-7} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-7} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-7} {} + AVD: name=yuv420p9be chroma=1:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 +yuv420pf: ctype=float + Basic desc: [ba][bb][yuv][le][float] + planes=3, chroma=1:1 align=2:2 + {32/[0:0] 32/[1:1] 32/[1:1] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + Regular: planes=3 compbytes=4 bitpad=0 chroma=2x2 ctype=float + 0: {1} + 1: {2} + 2: {3} +yuv422p: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=1:0 align=2:1 + {8/[0:0] 8/[1:0] 8/[1:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv422p chroma=1:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 +yuv422p10: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits {0:16/-6} {} {} {} + 1: 16bits {} {0:16/-6} {} {} + 2: 16bits {} {} {0:16/-6} {} + Regular: planes=3 compbytes=2 bitpad=-6 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv422p10le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv422p10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-6} {} + AVD: name=yuv422p10be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv422p12: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits {0:16/-4} {} {} {} + 1: 16bits {} {0:16/-4} {} {} + 2: 16bits {} {} {0:16/-4} {} + Regular: planes=3 compbytes=2 bitpad=-4 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv422p12le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv422p12be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits endian_bytes=2 {0:16/-4} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-4} {} + AVD: name=yuv422p12be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv422p14: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits {0:16/-2} {} {} {} + 1: 16bits {} {0:16/-2} {} {} + 2: 16bits {} {} {0:16/-2} {} + Regular: planes=3 compbytes=2 bitpad=-2 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv422p14le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=14 + 1: p=1 st=2 o=0 sh=0 d=14 + 2: p=2 st=2 o=0 sh=0 d=14 +yuv422p14be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits endian_bytes=2 {0:16/-2} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-2} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-2} {} + AVD: name=yuv422p14be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=14 + 1: p=1 st=2 o=0 sh=0 d=14 + 2: p=2 st=2 o=0 sh=0 d=14 +yuv422p16: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits {0:16} {} {} {} + 1: 16bits {} {0:16} {} {} + 2: 16bits {} {} {0:16} {} + Regular: planes=3 compbytes=2 bitpad=0 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv422p16le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 +yuv422p16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16} {} + AVD: name=yuv422p16be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 +yuv422p9: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits {0:16/-7} {} {} {} + 1: 16bits {} {0:16/-7} {} {} + 2: 16bits {} {} {0:16/-7} {} + Regular: planes=3 compbytes=2 bitpad=-7 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv422p9le chroma=1:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 +yuv422p9be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] } + 0: 16bits endian_bytes=2 {0:16/-7} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-7} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-7} {} + AVD: name=yuv422p9be chroma=1:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 +yuv422pf: ctype=float + Basic desc: [ba][bb][yuv][le][float] + planes=3, chroma=1:0 align=2:1 + {32/[0:0] 32/[1:0] 32/[1:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + Regular: planes=3 compbytes=4 bitpad=0 chroma=2x1 ctype=float + 0: {1} + 1: {2} + 2: {3} +yuv440p: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=0:1 align=1:2 + {8/[0:0] 8/[0:1] 8/[0:1] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=1x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv440p chroma=0:1 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 +yuv440p10: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=0:1 align=1:2 + {16/[0:0] 16/[0:1] 16/[0:1] } + 0: 16bits {0:16/-6} {} {} {} + 1: 16bits {} {0:16/-6} {} {} + 2: 16bits {} {} {0:16/-6} {} + Regular: planes=3 compbytes=2 bitpad=-6 chroma=1x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv440p10le chroma=0:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv440p10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=0:1 align=1:2 + {16/[0:0] 16/[0:1] 16/[0:1] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-6} {} + AVD: name=yuv440p10be chroma=0:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv440p12: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=0:1 align=1:2 + {16/[0:0] 16/[0:1] 16/[0:1] } + 0: 16bits {0:16/-4} {} {} {} + 1: 16bits {} {0:16/-4} {} {} + 2: 16bits {} {} {0:16/-4} {} + Regular: planes=3 compbytes=2 bitpad=-4 chroma=1x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv440p12le chroma=0:1 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv440p12be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=0:1 align=1:2 + {16/[0:0] 16/[0:1] 16/[0:1] } + 0: 16bits endian_bytes=2 {0:16/-4} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-4} {} + AVD: name=yuv440p12be chroma=0:1 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv440pf: ctype=float + Basic desc: [ba][bb][yuv][le][float] + planes=3, chroma=0:1 align=1:2 + {32/[0:0] 32/[0:1] 32/[0:1] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + Regular: planes=3 compbytes=4 bitpad=0 chroma=1x2 ctype=float + 0: {1} + 1: {2} + 2: {3} +yuv444p: ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv444p chroma=0:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 + Ambiguous alias: yuvj444p +yuv444p10: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16/-6} {} {} {} + 1: 16bits {} {0:16/-6} {} {} + 2: 16bits {} {} {0:16/-6} {} + Regular: planes=3 compbytes=2 bitpad=-6 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv444p10le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv444p10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-6} {} + AVD: name=yuv444p10be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 +yuv444p12: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16/-4} {} {} {} + 1: 16bits {} {0:16/-4} {} {} + 2: 16bits {} {} {0:16/-4} {} + Regular: planes=3 compbytes=2 bitpad=-4 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv444p12le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv444p12be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-4} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-4} {} + AVD: name=yuv444p12be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 +yuv444p14: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16/-2} {} {} {} + 1: 16bits {} {0:16/-2} {} {} + 2: 16bits {} {} {0:16/-2} {} + Regular: planes=3 compbytes=2 bitpad=-2 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv444p14le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=14 + 1: p=1 st=2 o=0 sh=0 d=14 + 2: p=2 st=2 o=0 sh=0 d=14 +yuv444p14be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-2} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-2} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-2} {} + AVD: name=yuv444p14be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=14 + 1: p=1 st=2 o=0 sh=0 d=14 + 2: p=2 st=2 o=0 sh=0 d=14 +yuv444p16: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16} {} {} {} + 1: 16bits {} {0:16} {} {} + 2: 16bits {} {} {0:16} {} + Regular: planes=3 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv444p16le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 +yuv444p16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16} {} + AVD: name=yuv444p16be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 +yuv444p9: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16/-7} {} {} {} + 1: 16bits {} {0:16/-7} {} {} + 2: 16bits {} {} {0:16/-7} {} + Regular: planes=3 compbytes=2 bitpad=-7 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuv444p9le chroma=0:0 flags=0x10 [planar] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 +yuv444p9be: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][be][uint] + planes=3, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-7} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-7} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-7} {} + AVD: name=yuv444p9be chroma=0:0 flags=0x11 [be][planar] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 +yuv444pf: ctype=float + Basic desc: [ba][bb][yuv][le][float] + planes=3, chroma=0:0 align=1:1 + {32/[0:0] 32/[0:0] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + Regular: planes=3 compbytes=4 bitpad=0 chroma=1x1 ctype=float + 0: {1} + 1: {2} + 2: {3} +yuva410pf: ctype=float + Basic desc: [ba][bb][a][yuv][le][float] + planes=4, chroma=2:2 align=4:4 + {32/[0:0] 32/[2:2] 32/[2:2] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + 3: 32bits {} {} {} {0:32} + Regular: planes=4 compbytes=4 bitpad=0 chroma=4x4 ctype=float + 0: {1} + 1: {2} + 2: {3} + 3: {4} +yuva411pf: ctype=float + Basic desc: [ba][bb][a][yuv][le][float] + planes=4, chroma=2:0 align=4:1 + {32/[0:0] 32/[2:0] 32/[2:0] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + 3: 32bits {} {} {} {0:32} + Regular: planes=4 compbytes=4 bitpad=0 chroma=4x1 ctype=float + 0: {1} + 1: {2} + 2: {3} + 3: {4} +yuva420p: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][be][uint] + planes=4, chroma=1:1 align=2:2 + {8/[0:0] 8/[1:1] 8/[1:1] 8/[0:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + 3: 8bits {} {} {} {0:8} + Regular: planes=4 compbytes=1 bitpad=0 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva420p chroma=1:1 flags=0x90 [planar][alpha] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 + 3: p=3 st=1 o=0 sh=0 d=8 +yuva420p10: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] 16/[0:0] } + 0: 16bits {0:16/-6} {} {} {} + 1: 16bits {} {0:16/-6} {} {} + 2: 16bits {} {} {0:16/-6} {} + 3: 16bits {} {} {} {0:16/-6} + Regular: planes=4 compbytes=2 bitpad=-6 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva420p10le chroma=1:1 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +yuva420p10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-6} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-6} + AVD: name=yuva420p10be chroma=1:1 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +yuva420p16: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] 16/[0:0] } + 0: 16bits {0:16} {} {} {} + 1: 16bits {} {0:16} {} {} + 2: 16bits {} {} {0:16} {} + 3: 16bits {} {} {} {0:16} + Regular: planes=4 compbytes=2 bitpad=0 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva420p16le chroma=1:1 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +yuva420p16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16} + AVD: name=yuva420p16be chroma=1:1 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +yuva420p9: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] 16/[0:0] } + 0: 16bits {0:16/-7} {} {} {} + 1: 16bits {} {0:16/-7} {} {} + 2: 16bits {} {} {0:16/-7} {} + 3: 16bits {} {} {} {0:16/-7} + Regular: planes=4 compbytes=2 bitpad=-7 chroma=2x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva420p9le chroma=1:1 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 + 3: p=3 st=2 o=0 sh=0 d=9 +yuva420p9be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=1:1 align=2:2 + {16/[0:0] 16/[1:1] 16/[1:1] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-7} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-7} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-7} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-7} + AVD: name=yuva420p9be chroma=1:1 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 + 3: p=3 st=2 o=0 sh=0 d=9 +yuva420pf: ctype=float + Basic desc: [ba][bb][a][yuv][le][float] + planes=4, chroma=1:1 align=2:2 + {32/[0:0] 32/[1:1] 32/[1:1] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + 3: 32bits {} {} {} {0:32} + Regular: planes=4 compbytes=4 bitpad=0 chroma=2x2 ctype=float + 0: {1} + 1: {2} + 2: {3} + 3: {4} +yuva422p: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][be][uint] + planes=4, chroma=1:0 align=2:1 + {8/[0:0] 8/[1:0] 8/[1:0] 8/[0:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + 3: 8bits {} {} {} {0:8} + Regular: planes=4 compbytes=1 bitpad=0 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva422p chroma=1:0 flags=0x90 [planar][alpha] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 + 3: p=3 st=1 o=0 sh=0 d=8 +yuva422p10: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits {0:16/-6} {} {} {} + 1: 16bits {} {0:16/-6} {} {} + 2: 16bits {} {} {0:16/-6} {} + 3: 16bits {} {} {} {0:16/-6} + Regular: planes=4 compbytes=2 bitpad=-6 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva422p10le chroma=1:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +yuva422p10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-6} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-6} + AVD: name=yuva422p10be chroma=1:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +yuva422p12: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits {0:16/-4} {} {} {} + 1: 16bits {} {0:16/-4} {} {} + 2: 16bits {} {} {0:16/-4} {} + 3: 16bits {} {} {} {0:16/-4} + Regular: planes=4 compbytes=2 bitpad=-4 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva422p12le chroma=1:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 + 3: p=3 st=2 o=0 sh=0 d=12 +yuva422p12be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-4} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-4} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-4} + AVD: name=yuva422p12be chroma=1:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 + 3: p=3 st=2 o=0 sh=0 d=12 +yuva422p16: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits {0:16} {} {} {} + 1: 16bits {} {0:16} {} {} + 2: 16bits {} {} {0:16} {} + 3: 16bits {} {} {} {0:16} + Regular: planes=4 compbytes=2 bitpad=0 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva422p16le chroma=1:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +yuva422p16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16} + AVD: name=yuva422p16be chroma=1:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +yuva422p9: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits {0:16/-7} {} {} {} + 1: 16bits {} {0:16/-7} {} {} + 2: 16bits {} {} {0:16/-7} {} + 3: 16bits {} {} {} {0:16/-7} + Regular: planes=4 compbytes=2 bitpad=-7 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva422p9le chroma=1:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 + 3: p=3 st=2 o=0 sh=0 d=9 +yuva422p9be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=1:0 align=2:1 + {16/[0:0] 16/[1:0] 16/[1:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-7} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-7} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-7} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-7} + AVD: name=yuva422p9be chroma=1:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 + 3: p=3 st=2 o=0 sh=0 d=9 +yuva422pf: ctype=float + Basic desc: [ba][bb][a][yuv][le][float] + planes=4, chroma=1:0 align=2:1 + {32/[0:0] 32/[1:0] 32/[1:0] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + 3: 32bits {} {} {} {0:32} + Regular: planes=4 compbytes=4 bitpad=0 chroma=2x1 ctype=float + 0: {1} + 1: {2} + 2: {3} + 3: {4} +yuva440pf: ctype=float + Basic desc: [ba][bb][a][yuv][le][float] + planes=4, chroma=0:1 align=1:2 + {32/[0:0] 32/[0:1] 32/[0:1] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + 3: 32bits {} {} {} {0:32} + Regular: planes=4 compbytes=4 bitpad=0 chroma=1x2 ctype=float + 0: {1} + 1: {2} + 2: {3} + 3: {4} +yuva444p: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][be][uint] + planes=4, chroma=0:0 align=1:1 + {8/[0:0] 8/[0:0] 8/[0:0] 8/[0:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + 3: 8bits {} {} {} {0:8} + Regular: planes=4 compbytes=1 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva444p chroma=0:0 flags=0x90 [planar][alpha] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 + 3: p=3 st=1 o=0 sh=0 d=8 +yuva444p10: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16/-6} {} {} {} + 1: 16bits {} {0:16/-6} {} {} + 2: 16bits {} {} {0:16/-6} {} + 3: 16bits {} {} {} {0:16/-6} + Regular: planes=4 compbytes=2 bitpad=-6 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva444p10le chroma=0:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +yuva444p10be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-6} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-6} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-6} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-6} + AVD: name=yuva444p10be chroma=0:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=10 + 1: p=1 st=2 o=0 sh=0 d=10 + 2: p=2 st=2 o=0 sh=0 d=10 + 3: p=3 st=2 o=0 sh=0 d=10 +yuva444p12: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16/-4} {} {} {} + 1: 16bits {} {0:16/-4} {} {} + 2: 16bits {} {} {0:16/-4} {} + 3: 16bits {} {} {} {0:16/-4} + Regular: planes=4 compbytes=2 bitpad=-4 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva444p12le chroma=0:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 + 3: p=3 st=2 o=0 sh=0 d=12 +yuva444p12be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-4} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-4} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-4} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-4} + AVD: name=yuva444p12be chroma=0:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=12 + 1: p=1 st=2 o=0 sh=0 d=12 + 2: p=2 st=2 o=0 sh=0 d=12 + 3: p=3 st=2 o=0 sh=0 d=12 +yuva444p16: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16} {} {} {} + 1: 16bits {} {0:16} {} {} + 2: 16bits {} {} {0:16} {} + 3: 16bits {} {} {} {0:16} + Regular: planes=4 compbytes=2 bitpad=0 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva444p16le chroma=0:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +yuva444p16be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16} + AVD: name=yuva444p16be chroma=0:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=16 + 1: p=1 st=2 o=0 sh=0 d=16 + 2: p=2 st=2 o=0 sh=0 d=16 + 3: p=3 st=2 o=0 sh=0 d=16 +yuva444p9: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][le][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits {0:16/-7} {} {} {} + 1: 16bits {} {0:16/-7} {} {} + 2: 16bits {} {} {0:16/-7} {} + 3: 16bits {} {} {} {0:16/-7} + Regular: planes=4 compbytes=2 bitpad=-7 chroma=1x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + 3: {4} + AVD: name=yuva444p9le chroma=0:0 flags=0x90 [planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 + 3: p=3 st=2 o=0 sh=0 d=9 +yuva444p9be: [GENERIC] ctype=uint + Basic desc: [ba][bb][a][yuvp][yuv][be][uint] + planes=4, chroma=0:0 align=1:1 + {16/[0:0] 16/[0:0] 16/[0:0] 16/[0:0] } + 0: 16bits endian_bytes=2 {0:16/-7} {} {} {} + 1: 16bits endian_bytes=2 {} {0:16/-7} {} {} + 2: 16bits endian_bytes=2 {} {} {0:16/-7} {} + 3: 16bits endian_bytes=2 {} {} {} {0:16/-7} + AVD: name=yuva444p9be chroma=0:0 flags=0x91 [be][planar][alpha] + 0: p=0 st=2 o=0 sh=0 d=9 + 1: p=1 st=2 o=0 sh=0 d=9 + 2: p=2 st=2 o=0 sh=0 d=9 + 3: p=3 st=2 o=0 sh=0 d=9 +yuva444pf: ctype=float + Basic desc: [ba][bb][a][yuv][le][float] + planes=4, chroma=0:0 align=1:1 + {32/[0:0] 32/[0:0] 32/[0:0] 32/[0:0] } + 0: 32bits {0:32} {} {} {} + 1: 32bits {} {0:32} {} {} + 2: 32bits {} {} {0:32} {} + 3: 32bits {} {} {} {0:32} + Regular: planes=4 compbytes=4 bitpad=0 chroma=1x1 ctype=float + 0: {1} + 1: {2} + 2: {3} + 3: {4} +yuvj411p: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=2:0 align=4:1 + {8/[0:0] 8/[2:0] 8/[2:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=4x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuvj411p chroma=2:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 +yuvj422p: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=1:0 align=2:1 + {8/[0:0] 8/[1:0] 8/[1:0] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=2x1 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuvj422p chroma=1:0 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 +yuvj440p: [GENERIC] ctype=uint + Basic desc: [ba][bb][yuvp][yuv][le][be][uint] + planes=3, chroma=0:1 align=1:2 + {8/[0:0] 8/[0:1] 8/[0:1] } + 0: 8bits {0:8} {} {} {} + 1: 8bits {} {0:8} {} {} + 2: 8bits {} {} {0:8} {} + Regular: planes=3 compbytes=1 bitpad=0 chroma=1x2 ctype=uint + 0: {1} + 1: {2} + 2: {3} + AVD: name=yuvj440p chroma=0:1 flags=0x10 [planar] + 0: p=0 st=1 o=0 sh=0 d=8 + 1: p=1 st=1 o=0 sh=0 d=8 + 2: p=2 st=1 o=0 sh=0 d=8 +yuyv422: [GENERIC] ctype=uint + Basic desc: [ba][yuv][le][be][uint] + planes=1, chroma=1:0 align=2:1 + {16/[0:0] } + 0: 16bits {0:8} {8:8} {24:8} {} + luma_offsets=[ 0 16] + AVD: name=yuyv422 chroma=1:0 flags=0x0 + 0: p=0 st=2 o=0 sh=0 d=8 + 1: p=0 st=4 o=1 sh=0 d=8 + 2: p=0 st=4 o=3 sh=0 d=8 +yvyu422: [GENERIC] ctype=uint + Basic desc: [ba][yuv][le][be][uint] + planes=1, chroma=1:0 align=2:1 + {16/[0:0] } + 0: 16bits {0:8} {24:8} {8:8} {} + luma_offsets=[ 0 16] + AVD: name=yvyu422 chroma=1:0 flags=0x0 + 0: p=0 st=2 o=0 sh=0 d=8 + 1: p=0 st=4 o=3 sh=0 d=8 + 2: p=0 st=4 o=1 sh=0 d=8 diff --git a/test/ref/repack.txt b/test/ref/repack.txt new file mode 100644 index 0000000..89b29be --- /dev/null +++ b/test/ref/repack.txt @@ -0,0 +1,385 @@ +0bgr => [pa] [un] gbrp | a=1:1 [tu] [tp] +0bgr => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +0rgb => [pa] [un] gbrp | a=1:1 [tu] [tp] +0rgb => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +abgr => [pa] [un] gbrap | a=1:1 [tu] [tp] +abgr => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +argb => [pa] [un] gbrap | a=1:1 [tu] [tp] +argb => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +ayuv64 => [pa] [un] yuva444p16 | a=1:1 [tu] [tp] +ayuv64 => [pa] [un] yuva444pf | a=1:1 [planar-f32] +ayuv64be => [pa] [un] yuva444p16 | a=1:1 [tu] [tp] +ayuv64be => [pa] [un] yuva444pf | a=1:1 [planar-f32] +bayer_bggr16 => no +bayer_bggr16be => no +bayer_bggr8 => no +bayer_gbrg16 => no +bayer_gbrg16be => no +bayer_gbrg8 => no +bayer_grbg16 => no +bayer_grbg16be => no +bayer_grbg8 => no +bayer_rggb16 => no +bayer_rggb16be => no +bayer_rggb8 => no +bgr0 => [pa] [un] gbrp | a=1:1 [tu] [tp] +bgr0 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr24 => [pa] [un] gbrp | a=1:1 [tu] [tp] +bgr24 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr4 => no +bgr444 => [pa] [un] gbrp4 | a=1:1 +bgr444 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr444 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr444be => [pa] [un] gbrp4 | a=1:1 +bgr444be => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr444be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr48 => [pa] [un] gbrp16 | a=1:1 [tu] [tp] +bgr48 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr48be => [pa] [un] gbrp16 | a=1:1 [tu] [tp] +bgr48be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr4_byte => [pa] [un] gbrp2 | a=1:1 +bgr4_byte => [pa] [un] gbrp1 | a=1:1 [round-down] +bgr4_byte => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr4_byte => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr555 => [pa] [un] gbrp5 | a=1:1 +bgr555 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr555 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr555be => [pa] [un] gbrp5 | a=1:1 +bgr555be => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr555be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr565 => [pa] [un] gbrp6 | a=1:1 +bgr565 => [pa] [un] gbrp5 | a=1:1 [round-down] +bgr565 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr565 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr565be => [pa] [un] gbrp6 | a=1:1 +bgr565be => [pa] [un] gbrp5 | a=1:1 [round-down] +bgr565be => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr565be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgr8 => [pa] [un] gbrp3 | a=1:1 +bgr8 => [pa] [un] gbrp2 | a=1:1 [round-down] +bgr8 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +bgr8 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +bgra => [pa] [un] gbrap | a=1:1 [tu] [tp] +bgra => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +bgra64 => [pa] [un] gbrap16 | a=1:1 [tu] [tp] +bgra64 => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +bgra64be => [pa] [un] gbrap16 | a=1:1 [tu] [tp] +bgra64be => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +cuda => no +d3d11 => no +d3d11va_vld => no +drm_prime => no +dxva2_vld => no +gbrap => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap10 => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap10be => [pa] [un] gbrap10 | a=1:1 +gbrap10be => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap12 => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap12be => [pa] [un] gbrap12 | a=1:1 +gbrap12be => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap14 => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap14be => [pa] [un] gbrap14 | a=1:1 +gbrap14be => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap16 => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrap16be => [pa] [un] gbrap16 | a=1:1 +gbrap16be => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +gbrapf32be => [pa] [un] gbrapf32 | a=1:1 +gbrp => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp1 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp10 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp10be => [pa] [un] gbrp10 | a=1:1 +gbrp10be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp12 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp12be => [pa] [un] gbrp12 | a=1:1 +gbrp12be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp14 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp14be => [pa] [un] gbrp14 | a=1:1 +gbrp14be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp16 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp16be => [pa] [un] gbrp16 | a=1:1 +gbrp16be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp2 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp3 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp4 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp5 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp6 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp9 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrp9be => [pa] [un] gbrp9 | a=1:1 +gbrp9be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +gbrpf32be => [pa] [un] gbrpf32 | a=1:1 +gray => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray10 => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray10be => [pa] [un] gray10 | a=1:1 +gray10be => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray12 => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray12be => [pa] [un] gray12 | a=1:1 +gray12be => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray14 => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray14be => [pa] [un] gray14 | a=1:1 +gray14be => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray16 => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray16be => [pa] [un] gray16 | a=1:1 +gray16be => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray9 => [pa] [un] grayf32 | a=1:1 [planar-f32] +gray9be => [pa] [un] gray9 | a=1:1 +gray9be => [pa] [un] grayf32 | a=1:1 [planar-f32] +grayf32be => [pa] [un] grayf32 | a=1:1 +mediacodec => no +mmal => no +monob => [pa] [un] y1 | a=8:1 [tu] [tp] +monob => [pa] [un] gray | a=8:1 [expand-8bit] +monow => [pa] [un] y1 | a=8:1 [tu] [tp] +monow => [pa] [un] gray | a=8:1 [expand-8bit] +nv12 => [pa] [un] yuv420p | a=2:2 [tu] [tp] +nv12 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +nv16 => [pa] [un] yuv422p | a=2:1 +nv16 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +nv20 => [pa] [un] yuv422p10 | a=2:1 +nv20 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +nv20be => [pa] [un] yuv422p10 | a=2:1 +nv20be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +nv21 => [pa] [un] yuv420p | a=2:2 [tu] [tp] +nv21 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +nv24 => [pa] [un] yuv444p | a=1:1 +nv24 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +nv42 => [pa] [un] yuv444p | a=1:1 +nv42 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +opencl => no +p010 => [pa] [un] yuv420p16 | a=2:2 +p010 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +p010be => [pa] [un] yuv420p16 | a=2:2 +p010be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +p012 => [pa] [un] yuv420p16 | a=2:2 +p012 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +p012be => [pa] [un] yuv420p16 | a=2:2 +p012be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +p016 => [pa] [un] yuv420p16 | a=2:2 +p016 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +p016be => [pa] [un] yuv420p16 | a=2:2 +p016be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +p210 => [pa] [un] yuv422p16 | a=2:1 +p210 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +p210be => [pa] [un] yuv422p16 | a=2:1 +p210be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +p212 => [pa] [un] yuv422p16 | a=2:1 +p212 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +p212be => [pa] [un] yuv422p16 | a=2:1 +p212be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +p216 => [pa] [un] yuv422p16 | a=2:1 +p216 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +p216be => [pa] [un] yuv422p16 | a=2:1 +p216be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +p410 => [pa] [un] yuv444p16 | a=1:1 +p410 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +p410be => [pa] [un] yuv444p16 | a=1:1 +p410be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +p412 => [pa] [un] yuv444p16 | a=1:1 +p412 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +p412be => [pa] [un] yuv444p16 | a=1:1 +p412be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +p416 => [pa] [un] yuv444p16 | a=1:1 +p416 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +p416be => [pa] [un] yuv444p16 | a=1:1 +p416be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +pal8 => [un] gbrap | a=1:1 +pal8 => [un] gbrapf32 | a=1:1 [planar-f32] +qsv => no +rgb0 => [pa] [un] gbrp | a=1:1 [tu] [tp] +rgb0 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb24 => [pa] [un] gbrp | a=1:1 [tu] [tp] +rgb24 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb30 => [pa] [un] gbrp10 | a=1:1 [tu] [tp] +rgb30 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb4 => no +rgb444 => [pa] [un] gbrp4 | a=1:1 +rgb444 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb444 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb444be => [pa] [un] gbrp4 | a=1:1 +rgb444be => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb444be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb48 => [pa] [un] gbrp16 | a=1:1 [tu] [tp] +rgb48 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb48be => [pa] [un] gbrp16 | a=1:1 [tu] [tp] +rgb48be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb4_byte => [pa] [un] gbrp2 | a=1:1 +rgb4_byte => [pa] [un] gbrp1 | a=1:1 [round-down] +rgb4_byte => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb4_byte => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb555 => [pa] [un] gbrp5 | a=1:1 +rgb555 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb555 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb555be => [pa] [un] gbrp5 | a=1:1 +rgb555be => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb555be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb565 => [pa] [un] gbrp6 | a=1:1 +rgb565 => [pa] [un] gbrp5 | a=1:1 [round-down] +rgb565 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb565 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb565be => [pa] [un] gbrp6 | a=1:1 +rgb565be => [pa] [un] gbrp5 | a=1:1 [round-down] +rgb565be => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb565be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgb8 => [pa] [un] gbrp3 | a=1:1 +rgb8 => [pa] [un] gbrp2 | a=1:1 [round-down] +rgb8 => [pa] [un] gbrp | a=1:1 [expand-8bit] [tu] [tp] +rgb8 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +rgba => [pa] [un] gbrap | a=1:1 [tu] [tp] +rgba => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +rgba64 => [pa] [un] gbrap16 | a=1:1 [tu] [tp] +rgba64 => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +rgba64be => [pa] [un] gbrap16 | a=1:1 [tu] [tp] +rgba64be => [pa] [un] gbrapf32 | a=1:1 [planar-f32] +rgbaf16 => no +rgbaf16be => no +rgbaf32 => no +rgbaf32be => no +rgbf32 => no +rgbf32be => no +uyvy422 => [pa] [un] yuv422p | a=2:1 [tu] [tp] +uyvy422 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +uyyvyy411 => [pa] [un] yuv411p | a=4:1 [tu] [tp] +uyyvyy411 => [pa] [un] yuv411pf | a=4:1 [planar-f32] +vaapi => no +vdpau => no +vdpau_output => no +videotoolbox => no +vulkan => no +vuya => [pa] [un] yuva444p | a=1:1 +vuya => [pa] [un] yuva444pf | a=1:1 [planar-f32] +vuyx => [pa] [un] yuv444p | a=1:1 +vuyx => [pa] [un] yuv444pf | a=1:1 [planar-f32] +x2bgr10 => [pa] [un] gbrp10 | a=1:1 +x2bgr10 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +x2bgr10be => [pa] [un] gbrp10 | a=1:1 +x2bgr10be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +x2rgb10be => [pa] [un] gbrp10 | a=1:1 [tu] [tp] +x2rgb10be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +xv30 => [pa] [un] yuv444p10 | a=1:1 +xv30 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +xv30be => [pa] [un] yuv444p10 | a=1:1 +xv30be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +xv36 => [pa] [un] yuv444p16 | a=1:1 +xv36 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +xv36be => [pa] [un] yuv444p16 | a=1:1 +xv36be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +xvmc => no +xyz12 => [pa] [un] gbrp16 | a=1:1 [tu] [tp] +xyz12 => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +xyz12be => [pa] [un] gbrp16 | a=1:1 [tu] [tp] +xyz12be => [pa] [un] gbrpf32 | a=1:1 [planar-f32] +y210 => [pa] [un] yuv422p16 | a=2:1 [tu] [tp] +y210 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +y210be => [pa] [un] yuv422p16 | a=2:1 [tu] [tp] +y210be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +y212 => [pa] [un] yuv422p16 | a=2:1 +y212 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +y212be => [pa] [un] yuv422p16 | a=2:1 +y212be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +ya16 => [pa] [un] yap16 | a=1:1 [tu] [tp] +ya16 => [pa] [un] grayaf32 | a=1:1 [planar-f32] +ya16be => [pa] [un] yap16 | a=1:1 +ya16be => [pa] [un] grayaf32 | a=1:1 [planar-f32] +ya8 => [pa] [un] yap8 | a=1:1 [tu] [tp] +ya8 => [pa] [un] grayaf32 | a=1:1 [planar-f32] +yap16 => [pa] [un] grayaf32 | a=1:1 [planar-f32] +yap8 => [pa] [un] grayaf32 | a=1:1 [planar-f32] +yuv410p => [pa] [un] yuv410pf | a=4:4 [planar-f32] +yuv411p => [pa] [un] yuv411pf | a=4:1 [planar-f32] +yuv420p => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p10 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p10be => [pa] [un] yuv420p10 | a=2:2 +yuv420p10be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p12 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p12be => [pa] [un] yuv420p12 | a=2:2 +yuv420p12be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p14 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p14be => [pa] [un] yuv420p14 | a=2:2 +yuv420p14be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p16 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p16be => [pa] [un] yuv420p16 | a=2:2 +yuv420p16be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p9 => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv420p9be => [pa] [un] yuv420p9 | a=2:2 +yuv420p9be => [pa] [un] yuv420pf | a=2:2 [planar-f32] +yuv422p => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p10 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p10be => [pa] [un] yuv422p10 | a=2:1 +yuv422p10be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p12 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p12be => [pa] [un] yuv422p12 | a=2:1 +yuv422p12be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p14 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p14be => [pa] [un] yuv422p14 | a=2:1 +yuv422p14be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p16 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p16be => [pa] [un] yuv422p16 | a=2:1 [tu] [tp] +yuv422p16be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p9 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv422p9be => [pa] [un] yuv422p9 | a=2:1 +yuv422p9be => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuv440p => [pa] [un] yuv440pf | a=1:2 [planar-f32] +yuv440p10 => [pa] [un] yuv440pf | a=1:2 [planar-f32] +yuv440p10be => [pa] [un] yuv440p10 | a=1:2 +yuv440p10be => [pa] [un] yuv440pf | a=1:2 [planar-f32] +yuv440p12 => [pa] [un] yuv440pf | a=1:2 [planar-f32] +yuv440p12be => [pa] [un] yuv440p12 | a=1:2 +yuv440p12be => [pa] [un] yuv440pf | a=1:2 [planar-f32] +yuv444p => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p10 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p10be => [pa] [un] yuv444p10 | a=1:1 +yuv444p10be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p12 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p12be => [pa] [un] yuv444p12 | a=1:1 +yuv444p12be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p14 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p14be => [pa] [un] yuv444p14 | a=1:1 +yuv444p14be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p16 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p16be => [pa] [un] yuv444p16 | a=1:1 +yuv444p16be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p9 => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuv444p9be => [pa] [un] yuv444p9 | a=1:1 +yuv444p9be => [pa] [un] yuv444pf | a=1:1 [planar-f32] +yuva420p => [pa] [un] yuva420pf | a=2:2 [planar-f32] +yuva420p10 => [pa] [un] yuva420pf | a=2:2 [planar-f32] +yuva420p10be => [pa] [un] yuva420p10 | a=2:2 +yuva420p10be => [pa] [un] yuva420pf | a=2:2 [planar-f32] +yuva420p16 => [pa] [un] yuva420pf | a=2:2 [planar-f32] +yuva420p16be => [pa] [un] yuva420p16 | a=2:2 +yuva420p16be => [pa] [un] yuva420pf | a=2:2 [planar-f32] +yuva420p9 => [pa] [un] yuva420pf | a=2:2 [planar-f32] +yuva420p9be => [pa] [un] yuva420p9 | a=2:2 +yuva420p9be => [pa] [un] yuva420pf | a=2:2 [planar-f32] +yuva422p => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p10 => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p10be => [pa] [un] yuva422p10 | a=2:1 +yuva422p10be => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p12 => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p12be => [pa] [un] yuva422p12 | a=2:1 +yuva422p12be => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p16 => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p16be => [pa] [un] yuva422p16 | a=2:1 +yuva422p16be => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p9 => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva422p9be => [pa] [un] yuva422p9 | a=2:1 +yuva422p9be => [pa] [un] yuva422pf | a=2:1 [planar-f32] +yuva444p => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p10 => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p10be => [pa] [un] yuva444p10 | a=1:1 +yuva444p10be => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p12 => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p12be => [pa] [un] yuva444p12 | a=1:1 +yuva444p12be => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p16 => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p16be => [pa] [un] yuva444p16 | a=1:1 +yuva444p16be => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p9 => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuva444p9be => [pa] [un] yuva444p9 | a=1:1 +yuva444p9be => [pa] [un] yuva444pf | a=1:1 [planar-f32] +yuvj411p => [pa] [un] yuv411pf | a=4:1 [planar-f32] +yuvj422p => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yuvj440p => [pa] [un] yuv440pf | a=1:2 [planar-f32] +yuyv422 => [pa] [un] yuv422p | a=2:1 [tu] [tp] +yuyv422 => [pa] [un] yuv422pf | a=2:1 [planar-f32] +yvyu422 => [pa] [un] yuv422p | a=2:1 [tu] [tp] +yvyu422 => [pa] [un] yuv422pf | a=2:1 [planar-f32] diff --git a/test/ref/repack_sws.log b/test/ref/repack_sws.log new file mode 100644 index 0000000..2f5a7e9 --- /dev/null +++ b/test/ref/repack_sws.log @@ -0,0 +1,18 @@ +0bgr using gbrp +0rgb using gbrp +abgr using gbrap +argb using gbrap +bgr0 using gbrp +bgr24 using gbrp +bgr48 using gbrp16 +bgr48be using gbrp16 +bgra using gbrap +bgra64 using gbrap16 +bgra64be using gbrap16 +rgb0 using gbrp +rgb24 using gbrp +rgb48 using gbrp16 +rgb48be using gbrp16 +rgba using gbrap +rgba64 using gbrap16 +rgba64be using gbrap16 diff --git a/test/ref/repack_zimg.log b/test/ref/repack_zimg.log new file mode 100644 index 0000000..2f5a7e9 --- /dev/null +++ b/test/ref/repack_zimg.log @@ -0,0 +1,18 @@ +0bgr using gbrp +0rgb using gbrp +abgr using gbrap +argb using gbrap +bgr0 using gbrp +bgr24 using gbrp +bgr48 using gbrp16 +bgr48be using gbrp16 +bgra using gbrap +bgra64 using gbrap16 +bgra64be using gbrap16 +rgb0 using gbrp +rgb24 using gbrp +rgb48 using gbrp16 +rgb48be using gbrp16 +rgba using gbrap +rgba64 using gbrap16 +rgba64be using gbrap16 diff --git a/test/ref/zimg_formats.txt b/test/ref/zimg_formats.txt new file mode 100644 index 0000000..6c199b1 --- /dev/null +++ b/test/ref/zimg_formats.txt @@ -0,0 +1,249 @@ + 0bgr Zin Zout SWSin SWSout | + 0rgb Zin Zout SWSin SWSout | + abgr Zin Zout SWSin SWSout | + argb Zin Zout SWSin SWSout | + ayuv64 Zin Zout SWSin SWSout | + ayuv64be Zin Zout | + bayer_bggr16 SWSin | + bayer_bggr16be SWSin | + bayer_bggr8 SWSin | + bayer_gbrg16 SWSin | + bayer_gbrg16be SWSin | + bayer_gbrg8 SWSin | + bayer_grbg16 SWSin | + bayer_grbg16be SWSin | + bayer_grbg8 SWSin | + bayer_rggb16 SWSin | + bayer_rggb16be SWSin | + bayer_rggb8 SWSin | + bgr0 Zin Zout SWSin SWSout | + bgr24 Zin Zout SWSin SWSout | + bgr4 SWSout | + bgr444 Zin Zout SWSin SWSout | + bgr444be Zin Zout SWSin SWSout | + bgr48 Zin Zout SWSin SWSout | + bgr48be Zin Zout SWSin SWSout | + bgr4_byte Zin Zout SWSin SWSout | + bgr555 Zin Zout SWSin SWSout | + bgr555be Zin Zout SWSin SWSout | + bgr565 Zin Zout SWSin SWSout | + bgr565be Zin Zout SWSin SWSout | + bgr8 Zin Zout SWSin SWSout | + bgra Zin Zout SWSin SWSout | + bgra64 Zin Zout SWSin SWSout | + bgra64be Zin Zout SWSin SWSout | + cuda | + d3d11 | + d3d11va_vld | + drm_prime | + dxva2_vld | + gbrap Zin Zout SWSin SWSout | + gbrap10 Zin Zout SWSin SWSout | + gbrap10be Zin Zout SWSin SWSout | + gbrap12 Zin Zout SWSin SWSout | + gbrap12be Zin Zout SWSin SWSout | + gbrap14 Zin Zout SWSin SWSout | + gbrap14be Zin Zout SWSin SWSout | + gbrap16 Zin Zout SWSin SWSout | + gbrap16be Zin Zout SWSin SWSout | + gbrapf32 Zin Zout SWSin SWSout | + gbrapf32be Zin Zout SWSin SWSout | + gbrp Zin Zout SWSin SWSout | + gbrp1 Zin Zout | + gbrp10 Zin Zout SWSin SWSout | + gbrp10be Zin Zout SWSin SWSout | + gbrp12 Zin Zout SWSin SWSout | + gbrp12be Zin Zout SWSin SWSout | + gbrp14 Zin Zout SWSin SWSout | + gbrp14be Zin Zout SWSin SWSout | + gbrp16 Zin Zout SWSin SWSout | + gbrp16be Zin Zout SWSin SWSout | + gbrp2 Zin Zout | + gbrp3 Zin Zout | + gbrp4 Zin Zout | + gbrp5 Zin Zout | + gbrp6 Zin Zout | + gbrp9 Zin Zout SWSin SWSout | + gbrp9be Zin Zout SWSin SWSout | + gbrpf32 Zin Zout SWSin SWSout | + gbrpf32be Zin Zout SWSin SWSout | + gray Zin Zout SWSin SWSout | + gray10 Zin Zout SWSin SWSout | + gray10be Zin Zout SWSin SWSout | + gray12 Zin Zout SWSin SWSout | + gray12be Zin Zout SWSin SWSout | + gray14 Zin Zout SWSin SWSout | + gray14be Zin Zout SWSin SWSout | + gray16 Zin Zout SWSin SWSout | + gray16be Zin Zout SWSin SWSout | + gray9 Zin Zout SWSin SWSout | + gray9be Zin Zout SWSin SWSout | + grayaf32 Zin Zout | + grayf32 Zin Zout SWSin SWSout | + grayf32be Zin Zout SWSin SWSout | + mediacodec | + mmal | + monob Zin Zout SWSin SWSout | + monow Zin Zout SWSin SWSout | + nv12 Zin Zout SWSin SWSout | + nv16 Zin Zout SWSin SWSout | + nv20 Zin Zout | + nv20be Zin Zout | + nv21 Zin Zout SWSin SWSout | + nv24 Zin Zout SWSin SWSout | + nv42 Zin Zout SWSin SWSout | + opencl | + p010 Zin Zout SWSin SWSout | + p010be Zin Zout SWSin SWSout | + p012 Zin Zout SWSin SWSout | + p012be Zin Zout SWSin SWSout | + p016 Zin Zout SWSin SWSout | + p016be Zin Zout SWSin SWSout | + p210 Zin Zout SWSin SWSout | + p210be Zin Zout SWSin SWSout | + p212 Zin Zout SWSin SWSout | + p212be Zin Zout SWSin SWSout | + p216 Zin Zout SWSin SWSout | + p216be Zin Zout SWSin SWSout | + p410 Zin Zout SWSin SWSout | + p410be Zin Zout SWSin SWSout | + p412 Zin Zout SWSin SWSout | + p412be Zin Zout SWSin SWSout | + p416 Zin Zout SWSin SWSout | + p416be Zin Zout SWSin SWSout | + pal8 Zin SWSin | + qsv | + rgb0 Zin Zout SWSin SWSout | + rgb24 Zin Zout SWSin SWSout | + rgb30 Zin Zout SWSin SWSout | + rgb4 SWSout | + rgb444 Zin Zout SWSin SWSout | + rgb444be Zin Zout SWSin SWSout | + rgb48 Zin Zout SWSin SWSout | + rgb48be Zin Zout SWSin SWSout | + rgb4_byte Zin Zout SWSin SWSout | + rgb555 Zin Zout SWSin SWSout | + rgb555be Zin Zout SWSin SWSout | + rgb565 Zin Zout SWSin SWSout | + rgb565be Zin Zout SWSin SWSout | + rgb8 Zin Zout SWSin SWSout | + rgba Zin Zout SWSin SWSout | + rgba64 Zin Zout SWSin SWSout | + rgba64be Zin Zout SWSin SWSout | + rgbaf16 SWSin | + rgbaf16be SWSin | + rgbaf32 | + rgbaf32be | + rgbf32 | + rgbf32be | + uyvy422 Zin Zout SWSin SWSout | + uyyvyy411 Zin Zout | + vaapi | + vdpau | + vdpau_output | + videotoolbox | + vulkan | + vuya Zin Zout SWSin SWSout | + vuyx Zin Zout SWSin SWSout | + x2bgr10 Zin Zout SWSin SWSout | + x2bgr10be Zin Zout | + x2rgb10be Zin Zout | + xv30 Zin Zout SWSin SWSout | + xv30be Zin Zout | + xv36 Zin Zout SWSin SWSout | + xv36be Zin Zout | + xvmc | + xyz12 Zin Zout SWSin SWSout | + xyz12be Zin Zout SWSin SWSout | + y1 Zin Zout | + y210 Zin Zout SWSin SWSout | + y210be Zin Zout | + y212 Zin Zout SWSin SWSout | + y212be Zin Zout | + ya16 Zin Zout SWSin SWSout | + ya16be Zin Zout SWSin SWSout | + ya8 Zin Zout SWSin SWSout | + yap16 Zin Zout | + yap8 Zin Zout | + yuv410p Zin Zout SWSin SWSout | + yuv410pf Zin Zout | + yuv411p Zin Zout SWSin SWSout | + yuv411pf Zin Zout | + yuv420p Zin Zout SWSin SWSout | + yuv420p10 Zin Zout SWSin SWSout | + yuv420p10be Zin Zout SWSin SWSout | + yuv420p12 Zin Zout SWSin SWSout | + yuv420p12be Zin Zout SWSin SWSout | + yuv420p14 Zin Zout SWSin SWSout | + yuv420p14be Zin Zout SWSin SWSout | + yuv420p16 Zin Zout SWSin SWSout | + yuv420p16be Zin Zout SWSin SWSout | + yuv420p9 Zin Zout SWSin SWSout | + yuv420p9be Zin Zout SWSin SWSout | + yuv420pf Zin Zout | + yuv422p Zin Zout SWSin SWSout | + yuv422p10 Zin Zout SWSin SWSout | + yuv422p10be Zin Zout SWSin SWSout | + yuv422p12 Zin Zout SWSin SWSout | + yuv422p12be Zin Zout SWSin SWSout | + yuv422p14 Zin Zout SWSin SWSout | + yuv422p14be Zin Zout SWSin SWSout | + yuv422p16 Zin Zout SWSin SWSout | + yuv422p16be Zin Zout SWSin SWSout | + yuv422p9 Zin Zout SWSin SWSout | + yuv422p9be Zin Zout SWSin SWSout | + yuv422pf Zin Zout | + yuv440p Zin Zout SWSin SWSout | + yuv440p10 Zin Zout SWSin SWSout | + yuv440p10be Zin Zout SWSin SWSout | + yuv440p12 Zin Zout SWSin SWSout | + yuv440p12be Zin Zout SWSin SWSout | + yuv440pf Zin Zout | + yuv444p Zin Zout SWSin SWSout | + yuv444p10 Zin Zout SWSin SWSout | + yuv444p10be Zin Zout SWSin SWSout | + yuv444p12 Zin Zout SWSin SWSout | + yuv444p12be Zin Zout SWSin SWSout | + yuv444p14 Zin Zout SWSin SWSout | + yuv444p14be Zin Zout SWSin SWSout | + yuv444p16 Zin Zout SWSin SWSout | + yuv444p16be Zin Zout SWSin SWSout | + yuv444p9 Zin Zout SWSin SWSout | + yuv444p9be Zin Zout SWSin SWSout | + yuv444pf Zin Zout | + yuva410pf Zin Zout | + yuva411pf Zin Zout | + yuva420p Zin Zout SWSin SWSout | + yuva420p10 Zin Zout SWSin SWSout | + yuva420p10be Zin Zout SWSin SWSout | + yuva420p16 Zin Zout SWSin SWSout | + yuva420p16be Zin Zout SWSin SWSout | + yuva420p9 Zin Zout SWSin SWSout | + yuva420p9be Zin Zout SWSin SWSout | + yuva420pf Zin Zout | + yuva422p Zin Zout SWSin SWSout | + yuva422p10 Zin Zout SWSin SWSout | + yuva422p10be Zin Zout SWSin SWSout | + yuva422p12 Zin Zout SWSin SWSout | + yuva422p12be Zin Zout SWSin SWSout | + yuva422p16 Zin Zout SWSin SWSout | + yuva422p16be Zin Zout SWSin SWSout | + yuva422p9 Zin Zout SWSin SWSout | + yuva422p9be Zin Zout SWSin SWSout | + yuva422pf Zin Zout | + yuva440pf Zin Zout | + yuva444p Zin Zout SWSin SWSout | + yuva444p10 Zin Zout SWSin SWSout | + yuva444p10be Zin Zout SWSin SWSout | + yuva444p12 Zin Zout SWSin SWSout | + yuva444p12be Zin Zout SWSin SWSout | + yuva444p16 Zin Zout SWSin SWSout | + yuva444p16be Zin Zout SWSin SWSout | + yuva444p9 Zin Zout SWSin SWSout | + yuva444p9be Zin Zout SWSin SWSout | + yuva444pf Zin Zout | + yuvj411p Zin Zout SWSin SWSout | + yuvj422p Zin Zout SWSin SWSout | + yuvj440p Zin Zout SWSin SWSout | + yuyv422 Zin Zout SWSin SWSout | + yvyu422 Zin Zout SWSin SWSout | diff --git a/test/repack.c b/test/repack.c new file mode 100644 index 0000000..a37559b --- /dev/null +++ b/test/repack.c @@ -0,0 +1,532 @@ +#include <limits.h> + +#include <libavutil/pixfmt.h> + +#include "common/common.h" +#include "common/global.h" +#include "img_utils.h" +#include "sub/draw_bmp.h" +#include "sub/osd.h" +#include "test_utils.h" +#include "video/fmt-conversion.h" +#include "video/mp_image.h" +#include "video/img_format.h" +#include "video/repack.h" +#include "video/sws_utils.h" +#include "video/zimg.h" + +// Excuse the utter stupidity. +#define UNFUCK(v) ((v) > 0 ? (v) : pixfmt2imgfmt(-(v))) +static_assert(IMGFMT_START > 0, ""); +#define IMGFMT_GBRP (-AV_PIX_FMT_GBRP) +#define IMGFMT_GBRAP (-AV_PIX_FMT_GBRAP) + +struct entry { + int w, h; + int fmt_a; + const void *const a[4]; + int fmt_b; + const void *const b[4]; + int flags; +}; + +#define P8(...) (const uint8_t[]){__VA_ARGS__} +#define P16(...) (const uint16_t[]){__VA_ARGS__} +#define P32(...) (const uint32_t[]){__VA_ARGS__} +#define SW16(v) ((((v) & 0xFF) << 8) | ((v) >> 8)) +#define SW32(v) ((SW16((v) & 0xFFFFu) << 16) | (SW16(((v) | 0u) >> 16))) + +#define ZIMG_IMAGE_DIMENSION_MAX ((size_t)(1) << (CHAR_BIT * sizeof(size_t) / 2 - 2)) + +// Warning: only entries that match existing conversions are tested. +static const struct entry repack_tests[] = { + // Note: the '0' tests rely on 0 being written, although by definition the + // contents of this padding is undefined. The repacker always writes + // it this way, though. + {1, 1, IMGFMT_RGB0, {P8(1, 2, 3, 0)}, + IMGFMT_GBRP, {P8(2), P8(3), P8(1)}}, + {1, 1, IMGFMT_BGR0, {P8(1, 2, 3, 0)}, + IMGFMT_GBRP, {P8(2), P8(1), P8(3)}}, + {1, 1, IMGFMT_0RGB, {P8(0, 1, 2, 3)}, + IMGFMT_GBRP, {P8(2), P8(3), P8(1)}}, + {1, 1, IMGFMT_0BGR, {P8(0, 1, 2, 3)}, + IMGFMT_GBRP, {P8(2), P8(1), P8(3)}}, + {1, 1, IMGFMT_RGBA, {P8(1, 2, 3, 4)}, + IMGFMT_GBRAP, {P8(2), P8(3), P8(1), P8(4)}}, + {1, 1, IMGFMT_BGRA, {P8(1, 2, 3, 4)}, + IMGFMT_GBRAP, {P8(2), P8(1), P8(3), P8(4)}}, + {1, 1, IMGFMT_ARGB, {P8(4, 1, 2, 3)}, + IMGFMT_GBRAP, {P8(2), P8(3), P8(1), P8(4)}}, + {1, 1, IMGFMT_ABGR, {P8(4, 1, 2, 3)}, + IMGFMT_GBRAP, {P8(2), P8(1), P8(3), P8(4)}}, + {1, 1, IMGFMT_BGR24, {P8(1, 2, 3)}, + IMGFMT_GBRP, {P8(2), P8(1), P8(3)}}, + {1, 1, IMGFMT_RGB24, {P8(1, 2, 3)}, + IMGFMT_GBRP, {P8(2), P8(3), P8(1)}}, + {1, 1, IMGFMT_RGBA64, {P16(0x1a1b, 0x2a2b, 0x3a3b, 0x4a4b)}, + -AV_PIX_FMT_GBRAP16, {P16(0x2a2b), P16(0x3a3b), + P16(0x1a1b), P16(0x4a4b)}}, + {1, 1, -AV_PIX_FMT_BGRA64LE, {P16(0x1a1b, 0x2a2b, 0x3a3b, 0x4a4b)}, + -AV_PIX_FMT_GBRAP16, {P16(0x2a2b), P16(0x1a1b), + P16(0x3a3b), P16(0x4a4b)}}, + {1, 1, -AV_PIX_FMT_RGBA64BE, {P16(0x1b1a, 0x2b2a, 0x3b3a, 0x4b4a)}, + -AV_PIX_FMT_GBRAP16, {P16(0x2a2b), P16(0x3a3b), + P16(0x1a1b), P16(0x4a4b)}}, + {1, 1, -AV_PIX_FMT_BGRA64BE, {P16(0x1b1a, 0x2b2a, 0x3b3a, 0x4b4a)}, + -AV_PIX_FMT_GBRAP16, {P16(0x2a2b), P16(0x1a1b), + P16(0x3a3b), P16(0x4a4b)}}, + {1, 1, -AV_PIX_FMT_RGB48BE, {P16(0x1a1b, 0x2a2b, 0x3a3b)}, + -AV_PIX_FMT_GBRP16, {P16(0x2b2a), P16(0x3b3a), P16(0x1b1a)}}, + {1, 1, -AV_PIX_FMT_RGB48LE, {P16(0x1a1b, 0x2a2b, 0x3a3b)}, + -AV_PIX_FMT_GBRP16, {P16(0x2a2b), P16(0x3a3b), P16(0x1a1b)}}, + {1, 1, -AV_PIX_FMT_BGR48BE, {P16(0x1a1b, 0x2a2b, 0x3a3b)}, + -AV_PIX_FMT_GBRP16, {P16(0x2b2a), P16(0x1b1a), P16(0x3b3a)}}, + {1, 1, -AV_PIX_FMT_BGR48LE, {P16(0x1a1b, 0x2a2b, 0x3a3b)}, + -AV_PIX_FMT_GBRP16, {P16(0x2a2b), P16(0x1a1b), P16(0x3a3b)}}, + {1, 1, -AV_PIX_FMT_XYZ12LE, {P16(0x1a1b, 0x2a2b, 0x3a3b)}, + -AV_PIX_FMT_GBRP16, {P16(0x2a2b), P16(0x3a3b), P16(0x1a1b)}}, + {1, 1, -AV_PIX_FMT_XYZ12BE, {P16(0x1b1a, 0x2b2a, 0x3b3a)}, + -AV_PIX_FMT_GBRP16, {P16(0x2a2b), P16(0x3a3b), P16(0x1a1b)}}, + {3, 1, -AV_PIX_FMT_BGR8, {P8(7, (7 << 3), (3 << 6))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB8, {P8(3, (7 << 2), (7 << 5))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_BGR4_BYTE, {P8(1, (3 << 1), (1 << 3))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB4_BYTE, {P8(1, (3 << 1), (1 << 3))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB565LE, {P16((31), (63 << 5), (31 << 11))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB565BE, {P16(SW16(31), SW16(63 << 5), SW16(31 << 11))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_BGR565LE, {P16((31), (63 << 5), (31 << 11))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_BGR565BE, {P16(SW16(31), SW16(63 << 5), SW16(31 << 11))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB555LE, {P16((31), (31 << 5), (31 << 10))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB555BE, {P16(SW16(31), SW16(31 << 5), SW16(31 << 10))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_BGR555LE, {P16((31), (31 << 5), (31 << 10))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_BGR555BE, {P16(SW16(31), SW16(31 << 5), SW16(31 << 10))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB444LE, {P16((15), (15 << 4), (15 << 8))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_RGB444BE, {P16(SW16(15), SW16(15 << 4), SW16(15 << 8))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0xFF,0,0), P8(0,0,0xFF)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_BGR444LE, {P16((15), (15 << 4), (15 << 8))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {3, 1, -AV_PIX_FMT_BGR444BE, {P16(SW16(15), SW16(15 << 4), SW16(15 << 8))}, + IMGFMT_GBRP, {P8(0,0xFF,0), P8(0,0,0xFF), P8(0xFF,0,0)}, + .flags = REPACK_CREATE_EXPAND_8BIT}, + {1, 1, IMGFMT_RGB30, {P32((3 << 20) | (2 << 10) | 1)}, + -AV_PIX_FMT_GBRP10, {P16(2), P16(1), P16(3)}}, + {1, 1, -AV_PIX_FMT_X2RGB10BE, {P32(SW32((3 << 20) | (2 << 10) | 1))}, + -AV_PIX_FMT_GBRP10, {P16(2), P16(1), P16(3)}}, + {8, 1, -AV_PIX_FMT_MONOWHITE, {P8(0xAA)}, + IMGFMT_Y1, {P8(0, 1, 0, 1, 0, 1, 0, 1)}}, + {8, 1, -AV_PIX_FMT_MONOBLACK, {P8(0xAA)}, + IMGFMT_Y1, {P8(1, 0, 1, 0, 1, 0, 1, 0)}}, + {2, 2, IMGFMT_NV12, {P8(1, 2, 3, 4), P8(5, 6)}, + IMGFMT_420P, {P8(1, 2, 3, 4), P8(5), P8(6)}}, + {2, 2, -AV_PIX_FMT_NV21, {P8(1, 2, 3, 4), P8(5, 6)}, + IMGFMT_420P, {P8(1, 2, 3, 4), P8(6), P8(5)}}, + {1, 1, -AV_PIX_FMT_AYUV64LE, {P16(1, 2, 3, 4)}, + -AV_PIX_FMT_YUVA444P16, {P16(2), P16(3), P16(4), P16(1)}}, + {1, 1, -AV_PIX_FMT_AYUV64BE, {P16(0x0100, 0x0200, 0x0300, 0x0400)}, + -AV_PIX_FMT_YUVA444P16, {P16(2), P16(3), P16(4), P16(1)}}, + {4, 1, -AV_PIX_FMT_YUYV422, {P8(1, 2, 3, 4, 5, 6, 7, 8)}, + -AV_PIX_FMT_YUV422P, {P8(1, 3, 5, 7), P8(2, 6), P8(4, 8)}}, + {2, 1, -AV_PIX_FMT_YVYU422, {P8(1, 2, 3, 4)}, + -AV_PIX_FMT_YUV422P, {P8(1, 3), P8(4), P8(2)}}, + {2, 1, -AV_PIX_FMT_UYVY422, {P8(1, 2, 3, 4)}, + -AV_PIX_FMT_YUV422P, {P8(2, 4), P8(1), P8(3)}}, + {2, 1, -AV_PIX_FMT_Y210LE, {P16(0x1a1b, 0x2a2b, 0x3a3b, 0x4a4b)}, + -AV_PIX_FMT_YUV422P16, {P16(0x1a1b, 0x3a3b), P16(0x2a2b), P16(0x4a4b)}}, + {2, 1, -AV_PIX_FMT_Y210BE, {P16(0x1b1a, 0x2b2a, 0x3b3a, 0x4b4a)}, + -AV_PIX_FMT_YUV422P16, {P16(0x1a1b, 0x3a3b), P16(0x2a2b), P16(0x4a4b)}}, + {1, 1, -AV_PIX_FMT_YA8, {P8(1, 2)}, + IMGFMT_YAP8, {P8(1), P8(2)}}, + {1, 1, -AV_PIX_FMT_YA16, {P16(0x1a1b, 0x2a2b)}, + IMGFMT_YAP16, {P16(0x1a1b), P16(0x2a2b)}}, + {2, 1, -AV_PIX_FMT_YUV422P16BE, {P16(0x1a1b, 0x2a2b), P16(0x3a3b), + P16(0x4a4b)}, + -AV_PIX_FMT_YUV422P16, {P16(0x1b1a, 0x2b2a), P16(0x3b3a), + P16(0x4b4a)}}, + {8, 1, -AV_PIX_FMT_UYYVYY411, {P8(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)}, + -AV_PIX_FMT_YUV411P, {P8(2, 3, 5, 6, 8, 9, 11, 12), + P8(1, 7), P8(4, 10)}}, +}; + +static bool is_true_planar(int imgfmt) +{ + struct mp_regular_imgfmt desc; + if (!mp_get_regular_imgfmt(&desc, imgfmt)) + return false; + + for (int n = 0; n < desc.num_planes; n++) { + if (desc.planes[n].num_components != 1) + return false; + } + + return true; +} + +static int try_repack(FILE *f, int imgfmt, int flags, int not_if_fmt) +{ + char *head = mp_tprintf(80, "%-15s =>", mp_imgfmt_to_name(imgfmt)); + struct mp_repack *un = mp_repack_create_planar(imgfmt, false, flags); + struct mp_repack *pa = mp_repack_create_planar(imgfmt, true, flags); + + // If both exists, they must be always symmetric. + if (un && pa) { + assert(mp_repack_get_format_src(pa) == mp_repack_get_format_dst(un)); + assert(mp_repack_get_format_src(un) == mp_repack_get_format_dst(pa)); + assert(mp_repack_get_align_x(pa) == mp_repack_get_align_x(un)); + assert(mp_repack_get_align_y(pa) == mp_repack_get_align_y(un)); + } + + int a = 0; + int b = 0; + if (un) { + a = mp_repack_get_format_src(un); + b = mp_repack_get_format_dst(un); + } else if (pa) { + a = mp_repack_get_format_dst(pa); + b = mp_repack_get_format_src(pa); + } + + // Skip the identity ones because they're uninteresting, and add too much + // noise. But still make sure they behave as expected. + if (a == imgfmt && b == imgfmt) { + assert(is_true_planar(imgfmt)); + // (note that we require alpha-enabled zimg) + assert(mp_zimg_supports_in_format(imgfmt)); + assert(un && pa); + talloc_free(pa); + talloc_free(un); + return b; + } + + struct mp_repack *rp = pa ? pa : un; + if (!rp) { + if (!flags) + fprintf(f, "%s no\n", head); + return 0; + } + + assert(a == imgfmt); + if (b && b == not_if_fmt) { + talloc_free(pa); + talloc_free(un); + return 0; + } + + fprintf(f, "%s %4s %4s %-15s |", head, pa ? "[pa]" : "", un ? "[un]" : "", + mp_imgfmt_to_name(b)); + + fprintf(f, " a=%d:%d", mp_repack_get_align_x(rp), mp_repack_get_align_y(rp)); + + if (flags & REPACK_CREATE_PLANAR_F32) + fprintf(f, " [planar-f32]"); + if (flags & REPACK_CREATE_ROUND_DOWN) + fprintf(f, " [round-down]"); + if (flags & REPACK_CREATE_EXPAND_8BIT) + fprintf(f, " [expand-8bit]"); + + // LCM of alignment of all packers. + int ax = mp_repack_get_align_x(rp); + int ay = mp_repack_get_align_y(rp); + if (pa && un) { + ax = MPMAX(mp_repack_get_align_x(pa), mp_repack_get_align_x(un)); + ay = MPMAX(mp_repack_get_align_y(pa), mp_repack_get_align_y(un)); + } + + for (int n = 0; n < MP_ARRAY_SIZE(repack_tests); n++) { + const struct entry *e = &repack_tests[n]; + int fmt_a = UNFUCK(e->fmt_a); + int fmt_b = UNFUCK(e->fmt_b); + if (!(fmt_a == a && fmt_b == b && e->flags == flags)) + continue; + + // We convert a "random" macro pixel to catch potential addressing bugs + // that might be ignored with (0, 0) origins. + struct mp_image *ia = mp_image_alloc(fmt_a, e->w * 5 * ax, e->h * 5 * ay); + struct mp_image *ib = mp_image_alloc(fmt_b, e->w * 7 * ax, e->h * 6 * ay); + int sx = 4 * ax, sy = 3 * ay, dx = 3 * ax, dy = 2 * ay; + + assert(ia && ib); + + mp_image_params_guess_csp(&ia->params); + mp_image_params_guess_csp(&ib->params); + + for (int pack = 0; pack < 2; pack++) { + struct mp_repack *repacker = pack ? pa : un; + if (!repacker) + continue; + + mp_image_clear(ia, 0, 0, ia->w, ia->h); + mp_image_clear(ib, 0, 0, ib->w, ib->h); + + const void *const *dstd = pack ? e->a : e->b; + const void *const *srcd = pack ? e->b : e->a; + struct mp_image *dsti = pack ? ia : ib; + struct mp_image *srci = pack ? ib : ia; + + bool r = repack_config_buffers(repacker, 0, dsti, 0, srci, NULL); + assert(r); + + for (int p = 0; p < srci->num_planes; p++) { + uint8_t *ptr = mp_image_pixel_ptr(srci, p, sx, sy); + for (int y = 0; y < e->h >> srci->fmt.ys[p]; y++) { + int wb = mp_image_plane_bytes(srci, p, 0, e->w); + const void *cptr = (uint8_t *)srcd[p] + wb * y; + memcpy(ptr + srci->stride[p] * y, cptr, wb); + } + } + + repack_line(repacker, dx, dy, sx, sy, e->w); + + for (int p = 0; p < dsti->num_planes; p++) { + uint8_t *ptr = mp_image_pixel_ptr(dsti, p, dx, dy); + for (int y = 0; y < e->h >> dsti->fmt.ys[p]; y++) { + int wb = mp_image_plane_bytes(dsti, p, 0, e->w); + const void *cptr = (uint8_t *)dstd[p] + wb * y; + assert_memcmp(ptr + dsti->stride[p] * y, cptr, wb); + } + } + + fprintf(f, " [t%s]", pack ? "p" : "u"); + } + + talloc_free(ia); + talloc_free(ib); + } + + fprintf(f, "\n"); + + talloc_free(pa); + talloc_free(un); + return b; +} + +static void check_float_repack(int imgfmt, enum mp_csp csp, + enum mp_csp_levels levels) +{ + imgfmt = UNFUCK(imgfmt); + + struct mp_regular_imgfmt desc = {0}; + mp_get_regular_imgfmt(&desc, imgfmt); + int bpp = desc.component_size; + int comp_bits = desc.component_size * 8 + MPMIN(desc.component_pad, 0); + + assert(bpp == 1 || bpp == 2); + + int w = 1 << (bpp * 8); + + if (w > ZIMG_IMAGE_DIMENSION_MAX) { + printf("Image dimension (%d) exceeded maximum allowed by zimg (%zu)." + " Skipping test...\n", w, ZIMG_IMAGE_DIMENSION_MAX); + return; + } + + struct mp_image *src = mp_image_alloc(imgfmt, w, 1); + assert(src); + + src->params.color.space = csp; + src->params.color.levels = levels; + mp_image_params_guess_csp(&src->params); + // mpv may not allow all combinations + assert(src->params.color.space == csp); + assert(src->params.color.levels == levels); + + for (int p = 0; p < src->num_planes; p++) { + int val = 0; + for (int x = 0; x < w >> src->fmt.xs[p]; x++) { + val = MPMIN(val, (1 << comp_bits) - 1); + void *pixel = mp_image_pixel_ptr(src, p, x, 0); + if (bpp == 1) { + *(uint8_t *)pixel = val; + } else { + *(uint16_t *)pixel = val; + } + val++; + } + } + + struct mp_repack *to_f = + mp_repack_create_planar(src->imgfmt, false, REPACK_CREATE_PLANAR_F32); + struct mp_repack *from_f = + mp_repack_create_planar(src->imgfmt, true, REPACK_CREATE_PLANAR_F32); + assert(to_f && from_f); + + struct mp_image *z_f = mp_image_alloc(mp_repack_get_format_dst(to_f), w, 1); + struct mp_image *r_f = mp_image_alloc(z_f->imgfmt, w, 1); + struct mp_image *z_i = mp_image_alloc(src->imgfmt, w, 1); + struct mp_image *r_i = mp_image_alloc(src->imgfmt, w, 1); + assert(z_f && r_f && z_i && r_i); + + z_f->params.color = r_f->params.color = z_i->params.color = + r_i->params.color = src->params.color; + + // The idea is to use zimg to cross-check conversion. + struct mp_sws_context *s = mp_sws_alloc(NULL); + s->force_scaler = MP_SWS_ZIMG; + struct zimg_opts opts = zimg_opts_defaults; + opts.dither = ZIMG_DITHER_NONE; + s->zimg_opts = &opts; + int ret = mp_sws_scale(s, z_f, src); + assert_true(ret >= 0); + ret = mp_sws_scale(s, z_i, z_f); + assert_true(ret >= 0); + talloc_free(s); + + repack_config_buffers(to_f, 0, r_f, 0, src, NULL); + repack_line(to_f, 0, 0, 0, 0, w); + repack_config_buffers(from_f, 0, r_i, 0, r_f, NULL); + repack_line(from_f, 0, 0, 0, 0, w); + + for (int p = 0; p < src->num_planes; p++) { + for (int x = 0; x < w >> src->fmt.xs[p]; x++) { + uint32_t src_val, z_i_val, r_i_val; + if (bpp == 1) { + src_val = *(uint8_t *)mp_image_pixel_ptr(src, p, x, 0); + z_i_val = *(uint8_t *)mp_image_pixel_ptr(z_i, p, x, 0); + r_i_val = *(uint8_t *)mp_image_pixel_ptr(r_i, p, x, 0); + } else { + src_val = *(uint16_t *)mp_image_pixel_ptr(src, p, x, 0); + z_i_val = *(uint16_t *)mp_image_pixel_ptr(z_i, p, x, 0); + r_i_val = *(uint16_t *)mp_image_pixel_ptr(r_i, p, x, 0); + } + float z_f_val = *(float *)mp_image_pixel_ptr(z_f, p, x, 0); + float r_f_val = *(float *)mp_image_pixel_ptr(r_f, p, x, 0); + + assert_int_equal(src_val, z_i_val); + assert_int_equal(src_val, r_i_val); + double tolerance = 1.0 / (1 << (bpp * 8)) / 4; + assert_float_equal(r_f_val, z_f_val, tolerance); + } + } + + talloc_free(src); + talloc_free(z_i); + talloc_free(z_f); + talloc_free(r_i); + talloc_free(r_f); + talloc_free(to_f); + talloc_free(from_f); +} + +static bool try_draw_bmp(FILE *f, int imgfmt) +{ + bool ok = false; + + struct mp_image *dst = mp_image_alloc(imgfmt, 64, 64); + if (!dst) + goto done; + + struct sub_bitmap sb = { + .bitmap = &(uint8_t[]){123}, + .stride = 1, + .x = 1, + .y = 1, + .w = 1, .dw = 1, + .h = 1, .dh = 1, + + .libass = { .color = 0xDEDEDEDE }, + }; + struct sub_bitmaps sbs = { + .format = SUBBITMAP_LIBASS, + .parts = &sb, + .num_parts = 1, + .change_id = 1, + }; + struct sub_bitmap_list sbs_list = { + .change_id = 1, + .w = dst->w, + .h = dst->h, + .items = (struct sub_bitmaps *[]){&sbs}, + .num_items = 1, + }; + + struct mp_draw_sub_cache *c = mp_draw_sub_alloc_test(dst); + if (mp_draw_sub_bitmaps(c, dst, &sbs_list)) { + char *info = mp_draw_sub_get_dbg_info(c); + fprintf(f, "%s\n", info); + talloc_free(info); + ok = true; + } + + talloc_free(c); + talloc_free(dst); + +done: + if (!ok) + fprintf(f, "no\n"); + return ok; +} + +int main(int argc, char *argv[]) +{ + const char *refdir = argv[1]; + const char *outdir = argv[2]; + FILE *f = test_open_out(outdir, "repack.txt"); + + init_imgfmts_list(); + for (int n = 0; n < num_imgfmts; n++) { + int imgfmt = imgfmts[n]; + + int other = try_repack(f, imgfmt, 0, 0); + try_repack(f, imgfmt, REPACK_CREATE_ROUND_DOWN, other); + try_repack(f, imgfmt, REPACK_CREATE_EXPAND_8BIT, other); + try_repack(f, imgfmt, REPACK_CREATE_PLANAR_F32, other); + } + + fclose(f); + + assert_text_files_equal(refdir, outdir, "repack.txt", + "This can fail if FFmpeg/libswscale adds or removes pixfmts."); + + check_float_repack(-AV_PIX_FMT_GBRAP, MP_CSP_RGB, MP_CSP_LEVELS_PC); + check_float_repack(-AV_PIX_FMT_GBRAP10, MP_CSP_RGB, MP_CSP_LEVELS_PC); + check_float_repack(-AV_PIX_FMT_GBRAP16, MP_CSP_RGB, MP_CSP_LEVELS_PC); + check_float_repack(-AV_PIX_FMT_YUVA444P, MP_CSP_BT_709, MP_CSP_LEVELS_PC); + check_float_repack(-AV_PIX_FMT_YUVA444P, MP_CSP_BT_709, MP_CSP_LEVELS_TV); + check_float_repack(-AV_PIX_FMT_YUVA444P10, MP_CSP_BT_709, MP_CSP_LEVELS_PC); + check_float_repack(-AV_PIX_FMT_YUVA444P10, MP_CSP_BT_709, MP_CSP_LEVELS_TV); + check_float_repack(-AV_PIX_FMT_YUVA444P16, MP_CSP_BT_709, MP_CSP_LEVELS_PC); + check_float_repack(-AV_PIX_FMT_YUVA444P16, MP_CSP_BT_709, MP_CSP_LEVELS_TV); + + // Determine the list of possible draw_bmp input formats. Do this here + // because it mostly depends on repack and imgformat stuff. + f = test_open_out(outdir, "draw_bmp.txt"); + + for (int n = 0; n < num_imgfmts; n++) { + int imgfmt = imgfmts[n]; + + fprintf(f, "%-12s= ", mp_imgfmt_to_name(imgfmt)); + try_draw_bmp(f, imgfmt); + } + + fclose(f); + + assert_text_files_equal(refdir, outdir, "draw_bmp.txt", + "This can fail if FFmpeg/libswscale adds or removes pixfmts."); + return 0; +} diff --git a/test/scale_sws.c b/test/scale_sws.c new file mode 100644 index 0000000..c9f5e31 --- /dev/null +++ b/test/scale_sws.c @@ -0,0 +1,42 @@ +// Test scaling using libswscale. +// Note: libswscale is already tested in FFmpeg. This code serves mostly to test +// the functionality scale_test.h using the already tested libswscale as +// reference. + +#include "scale_test.h" +#include "video/sws_utils.h" + +static bool scale(void *pctx, struct mp_image *dst, struct mp_image *src) +{ + struct mp_sws_context *ctx = pctx; + return mp_sws_scale(ctx, dst, src) >= 0; +} + +static bool supports_fmts(void *pctx, int imgfmt_dst, int imgfmt_src) +{ + struct mp_sws_context *ctx = pctx; + return mp_sws_supports_formats(ctx, imgfmt_dst, imgfmt_src); +} + +static const struct scale_test_fns fns = { + .scale = scale, + .supports_fmts = supports_fmts, +}; + +int main(int argc, char *argv[]) +{ + struct mp_sws_context *sws = mp_sws_alloc(NULL); + + struct scale_test *stest = talloc_zero(NULL, struct scale_test); + stest->fns = &fns; + stest->fns_priv = sws; + stest->test_name = "repack_sws"; + stest->refdir = talloc_strdup(stest, argv[1]); + stest->outdir = talloc_strdup(stest, argv[2]); + + repack_test_run(stest); + + talloc_free(stest); + talloc_free(sws); + return 0; +} diff --git a/test/scale_test.c b/test/scale_test.c new file mode 100644 index 0000000..f919dca --- /dev/null +++ b/test/scale_test.c @@ -0,0 +1,192 @@ +#include <libavcodec/avcodec.h> + +#include "scale_test.h" +#include "video/image_writer.h" +#include "video/sws_utils.h" + +static struct mp_image *gen_repack_test_img(int w, int h, int bytes, bool rgb, + bool alpha) +{ + struct mp_regular_imgfmt planar_desc = { + .component_type = MP_COMPONENT_TYPE_UINT, + .component_size = bytes, + .forced_csp = rgb ? MP_CSP_RGB : 0, + .num_planes = alpha ? 4 : 3, + .planes = { + {1, {rgb ? 2 : 1}}, + {1, {rgb ? 3 : 2}}, + {1, {rgb ? 1 : 3}}, + {1, {4}}, + }, + }; + int mpfmt = mp_find_regular_imgfmt(&planar_desc); + assert(mpfmt); + struct mp_image *mpi = mp_image_alloc(mpfmt, w, h); + assert(mpi); + + // Well, I have no idea what makes a good test image. So here's some crap. + // This contains bars/tiles of solid colors. For each of R/G/B, it toggles + // though 0/100% range, so 2*2*2 = 8 combinations (16 with alpha). + int b_h = 16, b_w = 16; + + for (int y = 0; y < h; y++) { + for (int p = 0; p < mpi->num_planes; p++) { + void *line = mpi->planes[p] + mpi->stride[p] * (ptrdiff_t)y; + + for (int x = 0; x < w; x += b_w) { + unsigned i = x / b_w + y / b_h * 2; + int c = ((i >> p) & 1); + if (bytes == 1) { + c *= (1 << 8) - 1; + for (int xs = x; xs < x + b_w; xs++) + ((uint8_t *)line)[xs] = c; + } else if (bytes == 2) { + c *= (1 << 16) - 1; + for (int xs = x; xs < x + b_w; xs++) + ((uint16_t *)line)[xs] = c; + } + } + } + } + + return mpi; +} + +static void dump_image(struct scale_test *stest, const char *name, + struct mp_image *img) +{ + char *path = mp_tprintf(4096, "%s/%s.png", stest->outdir, name); + + struct image_writer_opts opts = image_writer_opts_defaults; + opts.format = AV_CODEC_ID_PNG; + + if (!write_image(img, &opts, path, NULL, NULL)) { + printf("Failed to write '%s'.\n", path); + abort(); + } +} + +// Compare 2 images (same format and size) for exact pixel data match. +// Does generally not work with formats that include undefined padding. +// Does not work with non-byte aligned formats. +static void assert_imgs_equal(struct scale_test *stest, FILE *f, + struct mp_image *ref, struct mp_image *new) +{ + assert(ref->imgfmt == new->imgfmt); + assert(ref->w == new->w); + assert(ref->h == new->h); + + assert(ref->fmt.flags & MP_IMGFLAG_BYTE_ALIGNED); + assert(ref->fmt.bpp[0]); + + for (int p = 0; p < ref->num_planes; p++) { + for (int y = 0; y < ref->h; y++) { + void *line_r = ref->planes[p] + ref->stride[p] * (ptrdiff_t)y; + void *line_o = new->planes[p] + new->stride[p] * (ptrdiff_t)y; + size_t size = mp_image_plane_bytes(ref, p, 0, new->w); + + bool ok = memcmp(line_r, line_o, size) == 0; + if (!ok) { + stest->fail += 1; + char *fn_a = mp_tprintf(80, "img%d_ref", stest->fail); + char *fn_b = mp_tprintf(80, "img%d_new", stest->fail); + fprintf(f, "Images mismatching, dumping to %s/%s\n", fn_a, fn_b); + dump_image(stest, fn_a, ref); + dump_image(stest, fn_b, new); + return; + } + } + } +} + +void repack_test_run(struct scale_test *stest) +{ + char *logname = mp_tprintf(80, "%s.log", stest->test_name); + FILE *f = test_open_out(stest->outdir, logname); + + if (!stest->sws) { + init_imgfmts_list(); + + stest->sws = mp_sws_alloc(stest); + + stest->img_repack_rgb8 = gen_repack_test_img(256, 128, 1, true, false); + stest->img_repack_rgba8 = gen_repack_test_img(256, 128, 1, true, true); + stest->img_repack_rgb16 = gen_repack_test_img(256, 128, 2, true, false); + stest->img_repack_rgba16 = gen_repack_test_img(256, 128, 2, true, true); + + talloc_steal(stest, stest->img_repack_rgb8); + talloc_steal(stest, stest->img_repack_rgba8); + talloc_steal(stest, stest->img_repack_rgb16); + talloc_steal(stest, stest->img_repack_rgba16); + } + + for (int a = 0; a < num_imgfmts; a++) { + int mpfmt = imgfmts[a]; + struct mp_imgfmt_desc fmtdesc = mp_imgfmt_get_desc(mpfmt); + struct mp_regular_imgfmt rdesc; + if (!mp_get_regular_imgfmt(&rdesc, mpfmt)) { + int ofmt = mp_find_other_endian(mpfmt); + if (!mp_get_regular_imgfmt(&rdesc, ofmt)) + continue; + } + if (rdesc.num_planes > 1 || rdesc.forced_csp != MP_CSP_RGB) + continue; + + struct mp_image *test_img = NULL; + bool alpha = fmtdesc.flags & MP_IMGFLAG_ALPHA; + bool hidepth = rdesc.component_size > 1; + if (alpha) { + test_img = hidepth ? stest->img_repack_rgba16 : stest->img_repack_rgba8; + } else { + test_img = hidepth ? stest->img_repack_rgb16 : stest->img_repack_rgb8; + } + + if (test_img->imgfmt == mpfmt) + continue; + + if (!stest->fns->supports_fmts(stest->fns_priv, mpfmt, test_img->imgfmt)) + continue; + + if (!mp_sws_supports_formats(stest->sws, mpfmt, test_img->imgfmt)) + continue; + + fprintf(f, "%s using %s\n", mp_imgfmt_to_name(mpfmt), + mp_imgfmt_to_name(test_img->imgfmt)); + + struct mp_image *dst = mp_image_alloc(mpfmt, test_img->w, test_img->h); + assert(dst); + + // This tests packing. + bool ok = stest->fns->scale(stest->fns_priv, dst, test_img); + assert(ok); + + // Cross-check with swscale in the other direction. + // (Mostly so we don't have to worry about padding.) + struct mp_image *src2 = + mp_image_alloc(test_img->imgfmt, test_img->w, test_img->h); + assert(src2); + ok = mp_sws_scale(stest->sws, src2, dst) >= 0; + assert_imgs_equal(stest, f, test_img, src2); + + // Assume the other conversion direction also works. + assert(stest->fns->supports_fmts(stest->fns_priv, test_img->imgfmt, mpfmt)); + + struct mp_image *back = mp_image_alloc(test_img->imgfmt, dst->w, dst->h); + assert(back); + + // This tests unpacking. + ok = stest->fns->scale(stest->fns_priv, back, dst); + assert(ok); + + assert_imgs_equal(stest, f, test_img, back); + + talloc_free(back); + talloc_free(src2); + talloc_free(dst); + } + + fclose(f); + + assert_text_files_equal(stest->refdir, stest->outdir, logname, + "This can fail if FFmpeg adds or removes pixfmts."); +} diff --git a/test/scale_test.h b/test/scale_test.h new file mode 100644 index 0000000..5c83786 --- /dev/null +++ b/test/scale_test.h @@ -0,0 +1,30 @@ +#pragma once + +#include "img_utils.h" +#include "test_utils.h" +#include "video/mp_image.h" + +struct scale_test_fns { + bool (*scale)(void *ctx, struct mp_image *dst, struct mp_image *src); + bool (*supports_fmts)(void *ctx, int imgfmt_dst, int imgfmt_src); +}; + +struct scale_test { + // To be filled in by user. + const struct scale_test_fns *fns; + void *fns_priv; + const char *test_name; + const char *refdir; + const char *outdir; + + // Private. + struct mp_image *img_repack_rgb8; + struct mp_image *img_repack_rgba8; + struct mp_image *img_repack_rgb16; + struct mp_image *img_repack_rgba16; + struct mp_sws_context *sws; + int fail; +}; + +// Test color repacking between packed formats (typically RGB). +void repack_test_run(struct scale_test *stest); diff --git a/test/scale_zimg.c b/test/scale_zimg.c new file mode 100644 index 0000000..57894be --- /dev/null +++ b/test/scale_zimg.c @@ -0,0 +1,56 @@ +#include <libswscale/swscale.h> + +#include "scale_test.h" +#include "video/fmt-conversion.h" +#include "video/zimg.h" + +static bool scale(void *pctx, struct mp_image *dst, struct mp_image *src) +{ + struct mp_zimg_context *ctx = pctx; + return mp_zimg_convert(ctx, dst, src); +} + +static bool supports_fmts(void *pctx, int imgfmt_dst, int imgfmt_src) +{ + return mp_zimg_supports_in_format(imgfmt_src) && + mp_zimg_supports_out_format(imgfmt_dst); +} + +static const struct scale_test_fns fns = { + .scale = scale, + .supports_fmts = supports_fmts, +}; + +int main(int argc, char *argv[]) +{ + struct mp_zimg_context *zimg = mp_zimg_alloc(); + zimg->opts.threads = 1; + + struct scale_test *stest = talloc_zero(NULL, struct scale_test); + stest->fns = &fns; + stest->fns_priv = zimg; + stest->test_name = "repack_zimg"; + stest->refdir = talloc_strdup(stest, argv[1]); + stest->outdir = talloc_strdup(stest, argv[2]); + + repack_test_run(stest); + + FILE *f = test_open_out(stest->outdir, "zimg_formats.txt"); + for (int n = 0; n < num_imgfmts; n++) { + int imgfmt = imgfmts[n]; + fprintf(f, "%15s%7s%7s%7s%8s |\n", mp_imgfmt_to_name(imgfmt), + mp_zimg_supports_in_format(imgfmt) ? " Zin" : "", + mp_zimg_supports_out_format(imgfmt) ? " Zout" : "", + sws_isSupportedInput(imgfmt2pixfmt(imgfmt)) ? " SWSin" : "", + sws_isSupportedOutput(imgfmt2pixfmt(imgfmt)) ? " SWSout" : ""); + + } + fclose(f); + + assert_text_files_equal(stest->refdir, stest->outdir, "zimg_formats.txt", + "This can fail if FFmpeg/libswscale adds or removes pixfmts."); + + talloc_free(stest); + talloc_free(zimg); + return 0; +} diff --git a/test/test_utils.c b/test/test_utils.c new file mode 100644 index 0000000..b80caf8 --- /dev/null +++ b/test/test_utils.c @@ -0,0 +1,111 @@ +#include <libavutil/common.h> + +#include "common/msg.h" +#include "options/m_option.h" +#include "options/path.h" +#include "osdep/subprocess.h" +#include "test_utils.h" + +#ifdef NDEBUG +static_assert(false, "don't define NDEBUG for tests"); +#endif + +void assert_int_equal_impl(const char *file, int line, int64_t a, int64_t b) +{ + if (a != b) { + printf("%s:%d: %"PRId64" != %"PRId64"\n", file, line, a, b); + abort(); + } +} + +void assert_string_equal_impl(const char *file, int line, + const char *a, const char *b) +{ + if (strcmp(a, b) != 0) { + printf("%s:%d: '%s' != '%s'\n", file, line, a, b); + abort(); + } +} + +void assert_float_equal_impl(const char *file, int line, + double a, double b, double tolerance) +{ + if (fabs(a - b) > tolerance) { + printf("%s:%d: %f != %f\n", file, line, a, b); + abort(); + } +} + +FILE *test_open_out(const char *outdir, const char *name) +{ + mp_mkdirp(outdir); + assert(mp_path_isdir(outdir)); + char *path = mp_tprintf(4096, "%s/%s", outdir, name); + FILE *f = fopen(path, "wb"); + if (!f) { + printf("Could not open '%s' for writing: %s\n", path, + mp_strerror(errno)); + abort(); + } + return f; +} + +void assert_text_files_equal_impl(const char *file, int line, + const char *refdir, const char *outdir, + const char *ref, const char *new, + const char *err) +{ + char *path_ref = mp_tprintf(4096, "%s/%s", refdir, ref); + char *path_new = mp_tprintf(4096, "%s/%s", outdir, new); + + struct mp_subprocess_opts opts = { + .exe = "diff", + .args = (char*[]){"diff", "-u", "--", path_ref, path_new, 0}, + .fds = { {0, .src_fd = 0}, {1, .src_fd = 1}, {2, .src_fd = 2} }, + .num_fds = 3, + }; + + struct mp_subprocess_result res; + mp_subprocess2(&opts, &res); + + if (res.error || res.exit_status) { + if (res.error) + printf("Note: %s\n", mp_subprocess_err_str(res.error)); + printf("Giving up.\n"); + abort(); + } +} + +static void hexdump(const uint8_t *d, size_t size) +{ + printf("|"); + while (size--) { + printf(" %02x", d[0]); + d++; + } + printf(" |\n"); +} + +void assert_memcmp_impl(const char *file, int line, + const void *a, const void *b, size_t size) +{ + if (memcmp(a, b, size) == 0) + return; + + printf("%s:%d: mismatching data:\n", file, line); + hexdump(a, size); + hexdump(b, size); + abort(); +} + +/* Stubs: see test_utils.h */ +struct mp_log *const mp_null_log; +const char *mp_help_text; + +void mp_msg(struct mp_log *log, int lev, const char *format, ...) {}; +int mp_msg_find_level(const char *s) {return 0;}; +int mp_msg_level(struct mp_log *log) {return 0;}; +void mp_write_console_ansi(void) {}; +void mp_set_avdict(AVDictionary **dict, char **kv) {}; +struct mp_log *mp_log_new(void *talloc_ctx, struct mp_log *parent, + const char *name) { return NULL; }; diff --git a/test/test_utils.h b/test/test_utils.h new file mode 100644 index 0000000..66615d3 --- /dev/null +++ b/test/test_utils.h @@ -0,0 +1,56 @@ +#pragma once + +#include <float.h> +#include <inttypes.h> +#include <math.h> + +#include "common/common.h" + +#define assert_true(x) assert(x) +#define assert_false(x) assert(!(x)) +#define assert_int_equal(a, b) \ + assert_int_equal_impl(__FILE__, __LINE__, (a), (b)) +#define assert_string_equal(a, b) \ + assert_string_equal_impl(__FILE__, __LINE__, (a), (b)) +#define assert_float_equal(a, b, tolerance) \ + assert_float_equal_impl(__FILE__, __LINE__, (a), (b), (tolerance)) + +// Assert that memcmp(a,b,s)==0, or hexdump output on failure. +#define assert_memcmp(a, b, s) \ + assert_memcmp_impl(__FILE__, __LINE__, (a), (b), (s)) + +// Require that the files "ref" and "new" are the same. The paths can be +// relative to ref_path and out_path respectively. If they're not the same, +// the output of "diff" is shown, the err message (if not NULL), and the test +// fails. +#define assert_text_files_equal(refdir, outdir, name, err) \ + assert_text_files_equal_impl(__FILE__, __LINE__, (refdir), (outdir), (name), (name), (err)) + +void assert_int_equal_impl(const char *file, int line, int64_t a, int64_t b); +void assert_string_equal_impl(const char *file, int line, + const char *a, const char *b); +void assert_float_equal_impl(const char *file, int line, + double a, double b, double tolerance); +void assert_text_files_equal_impl(const char *file, int line, + const char *refdir, const char *outdir, + const char *ref, const char *new, + const char *err); +void assert_memcmp_impl(const char *file, int line, + const void *a, const void *b, size_t size); + +// Open a new file in the build dir path. Always succeeds. +FILE *test_open_out(const char *outdir, const char *name); + +/* Stubs */ + +// Files commonly import common/msg.h which requires these to be +// defined. We don't actually need mpv's logging system here so +// just define these as stubs that do nothing. +struct mp_log; +void mp_msg(struct mp_log *log, int lev, const char *format, ...) + PRINTF_ATTRIBUTE(3, 4); +int mp_msg_find_level(const char *s); +int mp_msg_level(struct mp_log *log); +void mp_write_console_ansi(void); +typedef struct AVDictionary AVDictionary; +void mp_set_avdict(AVDictionary **dict, char **kv); diff --git a/test/timer.c b/test/timer.c new file mode 100644 index 0000000..f85009c --- /dev/null +++ b/test/timer.c @@ -0,0 +1,41 @@ +#include "common/common.h" +#include "osdep/timer.h" +#include "test_utils.h" + +#include <time.h> +#include <sys/time.h> +#include <limits.h> + +int main(void) +{ + mp_time_init(); + + /* timekeeping */ + { + int64_t now = mp_time_ns(); + assert_true(now > 0); + + mp_sleep_ns(MP_TIME_MS_TO_NS(10)); + + int64_t now2 = mp_time_ns(); + assert_true(now2 > now); + + mp_sleep_ns(MP_TIME_MS_TO_NS(10)); + + double now3 = mp_time_sec(); + assert_true(now3 > MP_TIME_NS_TO_S(now2)); + } + + /* arithmetic */ + { + const int64_t test = 123456; + assert_int_equal(mp_time_ns_add(test, 1.0), test + MP_TIME_S_TO_NS(1)); + assert_int_equal(mp_time_ns_add(test, DBL_MAX), INT64_MAX); + assert_int_equal(mp_time_ns_add(test, -1e13), 1); + + const int64_t test2 = INT64_MAX - MP_TIME_S_TO_NS(20); + assert_int_equal(mp_time_ns_add(test2, 20.44), INT64_MAX); + } + + return 0; +} |