diff --git a/src/types.h b/src/types.h index cbf5d3571..6b59d888f 100644 --- a/src/types.h +++ b/src/types.h @@ -98,6 +98,7 @@ typedef enum { CFHD, ///< Cineform RG48, ///< Cineform 16-bit RGB AV1, ///< AOMedia Video 1 + I420, ///< planar YCbCr 4:2:0 VIDEO_CODEC_COUNT, ///< count of known video codecs (including VIDEO_CODEC_NONE) VIDEO_CODEC_END = VIDEO_CODEC_COUNT } codec_t; diff --git a/src/video_codec.c b/src/video_codec.c index b61b13393..8e8ff9910 100644 --- a/src/video_codec.c +++ b/src/video_codec.c @@ -118,7 +118,7 @@ struct codec_info_t { ///< when display gets requestes compressed codec ///< (otherwise division by zero occurs). int bits_per_channel; ///< Number of bits per color channel - int block_size; ///< Bytes per pixel block (pixelformats only) + int block_size; ///< Bytes per pixel block (packed pixelformats only) unsigned rgb:1; ///< Whether pixelformat is RGB unsigned opaque:1; ///< If codec is opaque (= compressed) unsigned interframe:1; ///< Indicates if compression is interframe @@ -187,6 +187,8 @@ static const struct codec_info_t codec_info[] = { to_fourcc('R','G','4','8'), 1, 6.0, 16, 3, TRUE, FALSE, FALSE, FALSE, "rg48"}, [AV1] = {"AV1", "AOMedia Video 1", to_fourcc('a','v','0','1'), 0, 1.0, 8, 0, FALSE, TRUE, TRUE, FALSE, "av1"}, + [I420] = {"I420", "I420", + to_fourcc('I','4','2','0'), 2, 3.0/2.0, 8, 0, FALSE, FALSE, FALSE, FALSE, "i420"}, }; /** diff --git a/src/video_display/dummy.cpp b/src/video_display/dummy.cpp index 64ab233fa..00ef2b042 100644 --- a/src/video_display/dummy.cpp +++ b/src/video_display/dummy.cpp @@ -99,7 +99,7 @@ static int display_dummy_putf(void *state, struct video_frame * /* frame */, int static int display_dummy_get_property(void *, int property, void *val, size_t *len) { - codec_t codecs[] = {UYVY, YUYV, v210, R12L, RGBA, RGB, BGR}; + codec_t codecs[] = {I420, UYVY, YUYV, v210, R12L, RGBA, RGB, BGR}; switch (property) { case DISPLAY_PROPERTY_CODECS: