x264: fix colour inversion with YV12 format
authorTim-Philipp Müller <tim@centricular.com>
Tue, 5 Aug 2014 18:47:26 +0000 (19:47 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 5 Aug 2014 18:47:26 +0000 (19:47 +0100)
It's the same as I420 but with the U/V planes swapped.

ext/x264/gstx264enc.c

index 3b67cda..a5a1e41 100644 (file)
@@ -1971,7 +1971,7 @@ gst_x264_enc_handle_frame (GstVideoEncoder * video_enc,
       gst_x264_enc_gst_to_x264_video_format (info->finfo->format, &nplanes);
   pic_in.img.i_plane = nplanes;
   for (i = 0; i < nplanes; i++) {
-    pic_in.img.plane[i] = GST_VIDEO_FRAME_PLANE_DATA (&fdata->vframe, i);
+    pic_in.img.plane[i] = GST_VIDEO_FRAME_COMP_DATA (&fdata->vframe, i);
     pic_in.img.i_stride[i] = GST_VIDEO_FRAME_COMP_STRIDE (&fdata->vframe, i);
   }