GNOME Bugzilla – Bug 402239
totem-video-thumbnailer gives thumbnails with wrong colors
Last modified: 2007-02-08 00:08:28 UTC
Please describe the problem: Previews generated by totem-video-thumbnailer are "blueish". See attached screenshot. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information: - Happends since totem 2.17.5. Worked fine before. - Videos played by totem are ok color-wise. - Totem: 2.17.90 + Backend = xine-lib 1.1.2 - Seems independent of video formats
Created attachment 81467 [details] Screenshot
It's probably that change: 2006-11-29 Bastien Nocera <hadess@hadess.net> * src/backend/bacon-video-widget-xine.c: (load_video_out_driver), (bacon_video_widget_realize), (bacon_video_widget_new): * src/backend/bacon-video-widget.h: * src/totem-video-thumbnailer.c: (main): Remove the useless "still image" metadata check, Make the xine-lib backend use xine_get_current_frame, so that we don't finish the playback before we could capture a frame (Closes: #325768) I guess that code might be a bit busted and/or we're converting using the wrong colourspace.
Same problem here on Mandriva with totem 2.17.90 and xine 1.1.4.
To #2: indeed, svn release 3755 doesn't have the bug while 3756 has it.
Created attachment 82098 [details] [review] exchange U and V components This patch fixes the wrong colours for me.
Comment on attachment 82098 [details] [review] exchange U and V components >--- totem-2.17.90/src/backend/bacon-video-widget-xine.c~ 2007-01-24 15:17:14.000000000 +0100 >+++ totem-2.17.90/src/backend/bacon-video-widget-xine.c 2007-02-07 17:28:22.000000000 +0100 >@@ -3997,8 +3997,8 @@ > break; > case XINE_IMGFMT_YV12: > y = yuv; >- u = yuv + width * height; >- v = yuv + width * height * 5 / 4; >+ v = yuv + width * height; >+ u = yuv + width * height * 5 / 4; > break; > default: > g_warning ("Format '%.4s' unsupported", (char *) &format); But that breaks it for the normal screenshot usage :)
Filed upstream to xine-lib: https://sourceforge.net/tracker/index.php?func=detail&aid=1654698&group_id=9655&atid=109655 Here's the committed patch: break; case XINE_IMGFMT_YV12: y = yuv; - u = yuv + width * height; - v = yuv + width * height * 5 / 4; + /* XXX Work-around xine-lib bug, u and v channels are swapped + * when using xine_get_current_frame */ + if (bvw->priv->type != BVW_USE_TYPE_CAPTURE) { + u = yuv + width * height; + v = yuv + width * height * 5 / 4; + } else { + v = yuv + width * height; + u = yuv + width * height * 5 / 4; + } break; default: g_warning ("Format '%.4s' unsupported", (char *) &format); 2007-02-08 Bastien Nocera <hadess@hadess.net> * src/backend/bacon-video-widget-xine.c: (bacon_video_widget_finalize), (bacon_video_widget_expose), (bacon_video_widget_get_current_frame): Fix compile-time warnings, Patch from Götz Waschk to fix the blue-ish images captured by the thumbnailer (Closes: #402239)