diff options
author | Jeffrey Knockel <jeff@jeffreyknockel.com> | 2024-01-14 10:08:55 -0500 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-01-16 01:34:57 +0100 |
commit | 0e20146db032cfd14524c038e5f963b993961095 (patch) | |
tree | e2209262af34d41cae04b14aefd017da8c6cb73c | |
parent | 278fea3664f328eadc1050c7d54b12c5bc7f0e74 (diff) | |
download | ffmpeg-0e20146db032cfd14524c038e5f963b993961095.tar.gz |
avutil/pixfmt: fix AV_PIX_FMT_RGB8 description
Previously AV_PIX_FMT_RGB8 was documented as "RGB 3:3:2,
(msb)2R 3G 3B(lsb)". While the RGB 3:3:2 part is correct, the latter
part should be: (msb)3R 3G 2B(lsb). This commit also updates the
format's pixdesc description to be (msb)3R 3G 2B(lsb).
Signed-off-by: Jeffrey Knockel <jeff@jeffreyknockel.com>
Reviewed-by: "Diederick C. Niehorster" <dcnieho@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavutil/pixdesc.c | 6 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 0db4167934..f6d4d01460 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -530,9 +530,9 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_w = 0, .log2_chroma_h = 0, .comp = { - { 0, 1, 0, 6, 2 }, /* R */ - { 0, 1, 0, 3, 3 }, /* G */ - { 0, 1, 0, 0, 3 }, /* B */ + { 0, 1, 0, 5, 3 }, /* R */ + { 0, 1, 0, 2, 3 }, /* G */ + { 0, 1, 0, 0, 2 }, /* B */ }, .flags = AV_PIX_FMT_FLAG_RGB, }, diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 58f9ad28bd..9c87571f49 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -83,7 +83,7 @@ enum AVPixelFormat { AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) AV_PIX_FMT_BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits AV_PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb) - AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb) + AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb) AV_PIX_FMT_RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits AV_PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb) AV_PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V) |