msdk: Don't set extended coding options for JPEG encode

MJPEG doesn't have support for extended coding options

https://bugzilla.gnome.org/show_bug.cgi?id=793873
This commit is contained in:
Sreerenj Balachandran 2018-03-29 11:56:19 -08:00
parent 9c415083b6
commit f1f148fe7c
6 changed files with 16 additions and 5 deletions

View file

@ -194,8 +194,8 @@ ensure_bitrate_control (GstMsdkEnc * thiz)
}
}
static void
ensure_extended_coding_options (GstMsdkEnc * thiz)
void
gst_msdkenc_ensure_extended_coding_options (GstMsdkEnc * thiz)
{
mfxExtCodingOption2 *option2 = &thiz->option2;
mfxExtCodingOption3 *option3 = &thiz->option3;
@ -380,9 +380,6 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
/* ensure bitrate control parameters */
ensure_bitrate_control (thiz);
/* Enable ExtCodingOption2 */
ensure_extended_coding_options (thiz);
/* allow subclass configure further */
if (klass->configure) {
if (!klass->configure (thiz))

View file

@ -184,6 +184,8 @@ gst_msdkenc_set_common_property (GObject * object, guint prop_id,
gboolean
gst_msdkenc_get_common_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
void
gst_msdkenc_ensure_extended_coding_options (GstMsdkEnc * thiz);
G_END_DECLS

View file

@ -303,6 +303,9 @@ gst_msdkh264enc_configure (GstMsdkEnc * encoder)
encoder->param.mfx.GopRefDist = 0;
}
/* Enable Extended coding options */
gst_msdkenc_ensure_extended_coding_options (encoder);
return TRUE;
}

View file

@ -98,6 +98,9 @@ gst_msdkh265enc_configure (GstMsdkEnc * encoder)
* "i-frames" by incrementing the value by one in each case*/
encoder->param.mfx.IdrInterval += 1;
/* Enable Extended coding options */
gst_msdkenc_ensure_extended_coding_options (encoder);
return TRUE;
}

View file

@ -111,6 +111,9 @@ gst_msdkmpeg2enc_configure (GstMsdkEnc * encoder)
encoder->param.mfx.CodecProfile = thiz->profile;
encoder->param.mfx.CodecLevel = 0;
/* Enable Extended Coding options */
gst_msdkenc_ensure_extended_coding_options (encoder);
return TRUE;
}

View file

@ -135,6 +135,9 @@ gst_msdkvp8enc_configure (GstMsdkEnc * encoder)
encoder->param.mfx.CodecProfile = thiz->profile;
encoder->param.mfx.CodecLevel = 0;
/* Enable Extended Coding options */
gst_msdkenc_ensure_extended_coding_options (encoder);
return TRUE;
}