diff options
author | Robert Bragg <robert@linux.intel.com> | 2010-08-10 14:35:42 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2010-08-18 16:39:12 +0100 |
commit | c0c04a4273fcd37fc7a9ae23073787e4014e8952 (patch) | |
tree | e3b78d996e7233a6171224ca0ebc0a42f7e5c63b | |
parent | b652a56f25d62958a259e2f836e6e36293b6ab9a (diff) |
sink: Fix variable names in clutter_gst_yv12_upload
It was a bit confusing that the u_tex and v_tex variables were actually
being used for the v and u planes respectively. YV12 is y followed by u
followed by v.
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index dc465ff..18ae1e8 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -516,7 +516,7 @@ static ClutterGstRenderer rgb32_renderer = /* * YV12 * - * 8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes. + * 8 bit Y plane followed by 8 bit 2x2 subsampled U and V planes. */ static void @@ -541,7 +541,7 @@ clutter_gst_yv12_upload (ClutterGstVideoSink *sink, clutter_texture_set_cogl_texture (priv->texture, y_tex); cogl_handle_unref (y_tex); - v_tex = cogl_texture_new_from_data (priv->width / 2, + u_tex = cogl_texture_new_from_data (priv->width / 2, priv->height / 2, CLUTTER_GST_TEXTURE_FLAGS, COGL_PIXEL_FORMAT_G_8, @@ -550,10 +550,10 @@ clutter_gst_yv12_upload (ClutterGstVideoSink *sink, GST_BUFFER_DATA (buffer) + (y_row_stride * priv->height)); - cogl_material_set_layer (material, 1, v_tex); - cogl_handle_unref (v_tex); + cogl_material_set_layer (material, 1, u_tex); + cogl_handle_unref (u_tex); - u_tex = cogl_texture_new_from_data (priv->width / 2, + v_tex = cogl_texture_new_from_data (priv->width / 2, priv->height / 2, CLUTTER_GST_TEXTURE_FLAGS, COGL_PIXEL_FORMAT_G_8, @@ -563,8 +563,8 @@ clutter_gst_yv12_upload (ClutterGstVideoSink *sink, + (y_row_stride * priv->height) + (uv_row_stride * priv->height / 2)); - cogl_material_set_layer (material, 2, u_tex); - cogl_handle_unref (u_tex); + cogl_material_set_layer (material, 2, v_tex); + cogl_handle_unref (v_tex); } static void |