From ed9a70839787dfbaf252d43804805c3f06d93ae4 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Thu, 17 Sep 2020 16:47:43 +0800 Subject: libs: decoder: h265: fill missing predictor_palette_size field. The predictor_palette_size of VAPictureParameterBufferHEVCScc is forgotten and need to be filled when streams have palettes. Part-of: --- gst-libs/gst/vaapi/gstvaapidecoder_h265.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gst-libs') diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c index 6ec0f5ca..fcbe5ce7 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c @@ -2121,11 +2121,15 @@ fill_picture (GstVaapiDecoderH265 * decoder, GstVaapiPictureH265 * picture) num_comps = sps->chroma_format_idc ? 3 : 1; if (pps_scc->pps_palette_predictor_initializers_present_flag) { + pic_scc_param->predictor_palette_size = + pps_scc->pps_num_palette_predictor_initializer; for (n = 0; n < num_comps; n++) for (i = 0; i < pps_scc->pps_num_palette_predictor_initializer; i++) pic_scc_param->predictor_palette_entries[n][i] = (uint16_t) pps_scc->pps_palette_predictor_initializer[n][i]; } else if (sps_scc->sps_palette_predictor_initializers_present_flag) { + pic_scc_param->predictor_palette_size = + sps_scc->sps_num_palette_predictor_initializer_minus1 + 1; for (n = 0; n < num_comps; n++) for (i = 0; i < sps_scc->sps_num_palette_predictor_initializer_minus1 + 1; i++) -- cgit v1.2.3