From ef0fc06c87357f613cbee705f81e46d8af7c9f48 Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Thu, 4 Aug 2016 14:10:11 +0300 Subject: encoder: h264: Enable direct_spatial_mv_pred_flag for SVC b-frames Enable direct_spatial_mv_pred_flag for all B-frames in SVC mode which is mandatory for scalable-high profile http://bugzilla.gnome.org/show_bug.cgi?id=725536 --- gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index a9d0e8e4..63f3c2fe 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -2455,7 +2455,10 @@ add_slice_headers (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture, sizeof (slice_param->delta_pic_order_cnt)); /* only works for B frames */ - slice_param->direct_spatial_mv_pred_flag = FALSE; + if (encoder->is_svc && (slice_param->slice_type == 1)) + slice_param->direct_spatial_mv_pred_flag = TRUE; + else + slice_param->direct_spatial_mv_pred_flag = FALSE; /* default equal to picture parameters */ slice_param->num_ref_idx_active_override_flag = FALSE; if (picture->type != GST_VAAPI_PICTURE_TYPE_I && reflist_0_count > 0) -- cgit v1.2.3