After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 402239 - totem-video-thumbnailer gives thumbnails with wrong colors
totem-video-thumbnailer gives thumbnails with wrong colors
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: xine-lib backend
2.17.x
Other All
: Normal normal
: ---
Assigned To: Maintainer alias for xine-lib component of Totem
Maintainer alias for xine-lib component of Totem
Depends on:
Blocks:
 
 
Reported: 2007-01-29 21:14 UTC by Frédéric Bellaiche
Modified: 2007-02-08 00:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Screenshot (67.01 KB, image/jpeg)
2007-01-29 21:14 UTC, Frédéric Bellaiche
  Details
exchange U and V components (469 bytes, patch)
2007-02-07 19:04 UTC, Götz Waschk
none Details | Review

Description Frédéric Bellaiche 2007-01-29 21:14:32 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
Comment 1 Frédéric Bellaiche 2007-01-29 21:14:59 UTC
Created attachment 81467 [details]
Screenshot
Comment 2 Bastien Nocera 2007-01-29 22:53:55 UTC
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.
Comment 3 Götz Waschk 2007-02-06 18:24:38 UTC
Same problem here on Mandriva with totem 2.17.90 and xine 1.1.4.
Comment 4 Götz Waschk 2007-02-06 18:51:34 UTC
To #2: indeed, svn release 3755 doesn't have the bug while 3756 has it.
Comment 5 Götz Waschk 2007-02-07 19:04:16 UTC
Created attachment 82098 [details] [review]
exchange U and V components

This patch fixes the wrong colours for me.
Comment 6 Bastien Nocera 2007-02-08 00:00:51 UTC
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 :)
Comment 7 Bastien Nocera 2007-02-08 00:08:28 UTC
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)