summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-10-19 13:46:44 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-10-19 16:45:35 +0200
commit865a46b193e7e83030f2c73e8366e4240ae26551 (patch)
tree28b943fa1f1eff1f60bd7c50ae7c3f015e2b6829 /gst-libs
parent08b4aaa7fa821d163d5f35aead668be8053686b9 (diff)
libs: decoder: vp9: 0xff segment pred probs if no temporal update
According to the spec (6.2.11 Segmentation params syntax) segmentation_pred_prob[i] ast to be 0xff if not temporal_update. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/400>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vp9.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
index 134a0317..3862cc26 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
@@ -383,8 +383,14 @@ fill_picture (GstVaapiDecoderVp9 * decoder, GstVaapiPicture * picture)
memcpy (pic_param->mb_segment_tree_probs, parser->mb_segment_tree_probs,
sizeof (parser->mb_segment_tree_probs));
- memcpy (pic_param->segment_pred_probs, parser->segment_pred_probs,
- sizeof (parser->segment_pred_probs));
+
+ if (frame_hdr->segmentation.temporal_update) {
+ memcpy (pic_param->segment_pred_probs, parser->segment_pred_probs,
+ sizeof (parser->segment_pred_probs));
+ } else {
+ memset (pic_param->segment_pred_probs, 255,
+ sizeof (pic_param->segment_pred_probs));
+ }
return TRUE;
}