ok,
I looked into clutter-gst-video-sink.c , found and fixed the issue...
I hope, changes in Red:
-----------------------------
static void
clutter_gst_yv12_upload (ClutterGstVideoSink *sink,
GstBuffer *buffer)
{
ClutterGstVideoSinkPrivate *priv = sink->priv;
gint width_2r4 = GST_ROUND_UP_4(priv->width / 2); /* Round up
rowstride to 4 bytes for U and V planes */
CoglHandle y_tex = cogl_texture_new_from_data (priv->width,
priv->height,
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_G_8,
COGL_PIXEL_FORMAT_G_8,
priv->width,
GST_BUFFER_DATA
(buffer));
clutter_texture_set_cogl_texture (priv->texture, y_tex);
cogl_texture_unref (y_tex);
if (priv->u_tex)
cogl_texture_unref (priv->u_tex);
if (priv->v_tex)
cogl_texture_unref (priv->v_tex);
priv->v_tex = cogl_texture_new_from_data (priv->width / 2,
priv->height / 2,
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_G_8,
COGL_PIXEL_FORMAT_G_8,
width_2r4, // RP FIX
GST_BUFFER_DATA (buffer) +
(priv->width * priv-
>height));
priv->u_tex = cogl_texture_new_from_data (priv->width / 2,
priv->height / 2,
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_G_8,
COGL_PIXEL_FORMAT_G_8,
width_2r4, // RP FIX
GST_BUFFER_DATA (buffer)
+ (priv->width * priv-
>height)
+ (width_2r4 * priv-
>height / 2));
}
-------------
Roland
On 28.08.2009, at 20:55, Roland Peffer wrote:
Hi Damien,
I had a moment to check out under what condition the movies do not
work and found this:
FOURCC is always I420
If movie width is 636 picture is messed up!
If movie width is 640 picture is good!
Maybe that information helps to find the mistake in color conversion!
Cheers,
Roland
On 24.08.2009, at 14:01, Damien Lespiau wrote:
On Mon, 2009-08-24 at 06:40 +0100, Roland Peffer wrote:
Hello all,
Hi,
I am currently working with the clutter-gst videosink / texture.
I have a messed up picture with wrong colors and diagonal lines when I
play various mp4 videos.
Some are good others not.
To figure out if this is a gstreamer problem or clutter-gst problem I
run some tests, that indicate that there is a
mistake in the clutter-gst display part. I guess its a mistake about
data alignement in the conversion / shader routines.
E.g. if I force gstreamer to convert the colorspace by
ffmpegcolorspace to RGB in advance, picture is fine.
If needed I can upload the critical video file to an ftp adress for
testing purposes. It's to big for email delivery.
I would love to have that video file to investigate the issue, opening a
bug in http://bugzilla.openedhand.com (Clutter product, clutter-gst
component) could help tracking progress on the bug.
Thanks for reporting this.
--
Damien
--
To unsubscribe send a mail to [email protected]