mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
qsvh264enc: Always specify field order
qsv runtime will report error when encoding interlaced stream if session was initialized with unknown field order but tff/bff is specified in per frame encoding parameter. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5835>
This commit is contained in:
parent
ef71c1319a
commit
1a7c85a261
1 changed files with 5 additions and 10 deletions
|
@ -1435,16 +1435,11 @@ gst_qsv_h264_enc_set_format (GstQsvEncoder * encoder,
|
|||
frame_info->Width = GST_ROUND_UP_16 (info->width);
|
||||
if (GST_VIDEO_INFO_IS_INTERLACED (info)) {
|
||||
frame_info->Height = GST_ROUND_UP_32 (info->height);
|
||||
switch (GST_VIDEO_INFO_FIELD_ORDER (info)) {
|
||||
case GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST:
|
||||
frame_info->PicStruct = MFX_PICSTRUCT_FIELD_TFF;
|
||||
break;
|
||||
case GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST:
|
||||
frame_info->PicStruct = MFX_PICSTRUCT_FIELD_BFF;
|
||||
break;
|
||||
default:
|
||||
frame_info->PicStruct = MFX_PICSTRUCT_UNKNOWN;
|
||||
break;
|
||||
if (GST_VIDEO_INFO_FIELD_ORDER (info) ==
|
||||
GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST) {
|
||||
frame_info->PicStruct = MFX_PICSTRUCT_FIELD_TFF;
|
||||
} else {
|
||||
frame_info->PicStruct = MFX_PICSTRUCT_FIELD_BFF;
|
||||
}
|
||||
} else {
|
||||
frame_info->Height = GST_ROUND_UP_16 (info->height);
|
||||
|
|
Loading…
Reference in a new issue