This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-utils.git tree:
Subject: libv4l1: Add a comment about VIDEO_PALETTE_RGB24 really being BGR24 Author: Hans de Goede <[email protected]> Date: Sun Jan 9 12:19:41 2011 +0100 Various people see problems with red and blue being swapped in some v4l1 apps and then end up sending libv4l1 patches. Explain (in the source) that they should be patching the apps instead :) Signed-off-by: Hans de Goede <[email protected]> lib/libv4l1/libv4l1.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=9c408d1cfbf79c6838ef39691ca0c72485fe61cb diff --git a/lib/libv4l1/libv4l1.c b/lib/libv4l1/libv4l1.c index cb53899..fee0fb7 100644 --- a/lib/libv4l1/libv4l1.c +++ b/lib/libv4l1/libv4l1.c @@ -87,6 +87,10 @@ static unsigned int palette_to_pixelformat(unsigned int palette) case VIDEO_PALETTE_RGB565: return V4L2_PIX_FMT_RGB565; case VIDEO_PALETTE_RGB24: + /* Yes v4l1 RGB24 really is BGR24, this is a weirdness in the + V4L1 API. Which unfortunately some V4L1 apps get wrong. + If you have an app which has r and b swapped and end up here + fix the app, this is not a libv4l1 bug */ return V4L2_PIX_FMT_BGR24; case VIDEO_PALETTE_RGB32: return V4L2_PIX_FMT_BGR32; @@ -119,6 +123,7 @@ static unsigned int pixelformat_to_palette(unsigned int pixelformat) case V4L2_PIX_FMT_RGB565: return VIDEO_PALETTE_RGB565; case V4L2_PIX_FMT_BGR24: + /* See the comment in palette_to_pixelformat above */ return VIDEO_PALETTE_RGB24; case V4L2_PIX_FMT_BGR32: return VIDEO_PALETTE_RGB32; _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
