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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1245>
This commit is contained in:
Nicolas Dufresne 2020-05-05 12:01:21 -04:00 committed by GStreamer Merge Bot
parent 11c62eb015
commit 5ece17ecbd

View file

@ -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++) {