codecparsers: vp9statefulparser: Fix the gst_vp9_get_qindex clamp issue.

The alternate quantizer is a delta value and should be int type.
We mark it wrongly as uint, that will make CLAMP (data, 0, 255)
always choose 255 rather than 0 if the data < 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2369>
This commit is contained in:
He Junyan 2021-06-30 15:23:15 +08:00 committed by GStreamer Marge Bot
parent f38d944c0f
commit 17e8fea158

View file

@ -1137,7 +1137,7 @@ gst_vp9_get_qindex (const GstVp9SegmentationParams * segmentation_params,
if (gst_vp9_seg_feature_active (segmentation_params, segment_id, if (gst_vp9_seg_feature_active (segmentation_params, segment_id,
GST_VP9_SEG_LVL_ALT_Q)) { GST_VP9_SEG_LVL_ALT_Q)) {
guint data = gint data =
segmentation_params->feature_data[segment_id][GST_VP9_SEG_LVL_ALT_Q]; segmentation_params->feature_data[segment_id][GST_VP9_SEG_LVL_ALT_Q];
if (!segmentation_params->segmentation_abs_or_delta_update) if (!segmentation_params->segmentation_abs_or_delta_update)