summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2021-05-17 19:06:34 +0800
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2021-05-25 12:11:05 +0200
commitc4bb5f06c9be56f5e9ee92ff8c1f2408b28e3444 (patch)
tree5b4d31b7338e26c3ed85ba8e1b413f2d90ae10b3 /sys
parentceb2df17510d5226087dcdcac4db78feaf1b6b82 (diff)
downloadgstreamer-plugins-bad-c4bb5f06c9be56f5e9ee92ff8c1f2408b28e3444.tar.gz
va: h265dec: Add current picture into reference list for SCC.
The current picture is not in the DPB, so we need to add it manually to the reference list when SCC is enabled. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2255>
Diffstat (limited to 'sys')
-rw-r--r--sys/va/gstvah265dec.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/va/gstvah265dec.c b/sys/va/gstvah265dec.c
index 795e87de4..1e60e6b5d 100644
--- a/sys/va/gstvah265dec.c
+++ b/sys/va/gstvah265dec.c
@@ -760,6 +760,20 @@ gst_va_h265_dec_start_picture (GstH265Decoder * decoder,
}
g_array_unref (ref_list);
+ /* 7.4.3.3.3, the current decoded picture is marked as "used for
+ long-term reference". Current picture is not in the DPB now. */
+ if (pps->pps_scc_extension_params.pps_curr_pic_ref_enabled_flag && i < 15) {
+ pic_param->base.ReferenceFrames[i].picture_id =
+ gst_va_decode_picture_get_surface (gst_h265_picture_get_user_data
+ (picture));
+ pic_param->base.ReferenceFrames[i].pic_order_cnt = picture->pic_order_cnt;
+ pic_param->base.ReferenceFrames[i].flags |=
+ VA_PICTURE_HEVC_LONG_TERM_REFERENCE;
+ pic_param->base.ReferenceFrames[i].flags |=
+ _find_frame_rps_type (decoder, picture);
+ i++;
+ }
+
for (; i < 15; i++)
_init_vaapi_pic (&pic_param->base.ReferenceFrames[i]);
}