From 5ece17ecbd06b244f8c1c6805e5c46c59484b8c6 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 5 May 2020 12:01:21 -0400 Subject: v4l2slvp8dec: Flip the meaning of segment_feature_mode In section 9.3.4 a), segment_feature_mode have 0 for absolute and 1 for delta, while in 19.2, it says the opposite. But the reference code, which usually rules over the text state that 1 means absolute: if (hdr->update_data) { hdr->abs = bool_get_bit(bool); And uses it with that meaning to decide weither to override the existing value or just add the detla. This fixes multiple decoding issues. Part-of: --- sys/v4l2codecs/gstv4l2codecvp8dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/v4l2codecs') diff --git a/sys/v4l2codecs/gstv4l2codecvp8dec.c b/sys/v4l2codecs/gstv4l2codecvp8dec.c index 92c102c1e..4fab7fa49 100644 --- a/sys/v4l2codecs/gstv4l2codecvp8dec.c +++ b/sys/v4l2codecs/gstv4l2codecvp8dec.c @@ -264,7 +264,7 @@ gst_v4l2_codec_vp8_dec_fill_segment_header (struct v4l2_vp8_segment_header (segmentation->segmentation_enabled ? V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED : 0) | (segmentation->update_mb_segmentation_map ? V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP : 0) | (segmentation->update_segment_feature_data ? V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA : 0) | - (segmentation->segment_feature_mode == 1 ? V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE : 0); + (segmentation->segment_feature_mode ? 0 : V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE); /* *INDENT-ON* */ for (i = 0; i < 4; i++) { -- cgit v1.2.1