mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
x264enc: Correctly pass interlacing/TFF information
Give the interlacing information correctly to the encoder. Also parse TFF/BFF information from the caps and pass it too. https://bugzilla.gnome.org/show_bug.cgi?id=775411
This commit is contained in:
parent
f7d82312bb
commit
dae49907e2
1 changed files with 12 additions and 6 deletions
|
@ -1822,6 +1822,18 @@ gst_x264_enc_init_encoder (GstX264Enc * encoder)
|
|||
}
|
||||
}
|
||||
|
||||
if (GST_VIDEO_INFO_IS_INTERLACED (info)) {
|
||||
encoder->x264param.b_interlaced = TRUE;
|
||||
if (GST_VIDEO_INFO_FIELD_ORDER (info) ==
|
||||
GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST) {
|
||||
encoder->x264param.b_tff = TRUE;
|
||||
} else {
|
||||
encoder->x264param.b_tff = FALSE;
|
||||
}
|
||||
} else {
|
||||
encoder->x264param.b_interlaced = FALSE;
|
||||
}
|
||||
|
||||
/* Set 3D frame packing */
|
||||
if (encoder->frame_packing != GST_VIDEO_MULTIVIEW_MODE_NONE)
|
||||
encoder->x264param.i_frame_packing = encoder->frame_packing;
|
||||
|
@ -2264,12 +2276,6 @@ gst_x264_enc_set_format (GstVideoEncoder * video_enc,
|
|||
|
||||
gst_caps_unref (template_caps);
|
||||
|
||||
if (GST_VIDEO_INFO_IS_INTERLACED (&state->info))
|
||||
g_string_append_printf (encoder->option_string, ":interlaced=%d", TRUE);
|
||||
else
|
||||
g_string_append_printf (encoder->option_string, ":interlaced=%d",
|
||||
encoder->interlaced);
|
||||
|
||||
if (!gst_x264_enc_init_encoder (encoder))
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue