openjpegenc: enable MCT for RGB video
authorAaron Boxer <boxerab@gmail.com>
Fri, 20 May 2016 21:28:52 +0000 (17:28 -0400)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 21 May 2016 06:44:22 +0000 (09:44 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=766732

ext/openjpeg/gstopenjpegenc.c

index 0c54f03..7a6e937 100644 (file)
@@ -856,6 +856,9 @@ gst_openjpeg_enc_handle_frame (GstVideoEncoder * encoder,
     goto fill_image_error;
   gst_video_frame_unmap (&vframe);
 
+  if (vframe.info.finfo->flags & GST_VIDEO_FORMAT_FLAG_RGB) {
+    self->params.tcp_mct = 1;
+  }
   opj_setup_encoder (enc, &self->params, image);
 
 #ifdef HAVE_OPENJPEG_1