GNOME Bugzilla – Bug 733240
mpeg4: iq_matrix should be allocated in every cases
Last modified: 2018-05-04 12:42:13 UTC
Hi! The code in ensure_quant_matrix() won't create a iq_matrix when vol_hdr.load_intra_quant_mat or priv->vol_hdr.load_non_intra_quant_mat is null. I think this should be modified, and the iq_matrix should be allocated in all cases, because theses flags that will tell the hardware if the iq_matrices should be loaded or not is in the struct itself (for example in vdpau-driver/src/vdpau-decode.c, translate_VAIQMatrixBufferMPEG4()) Suggested patch inspired from libavcodec vaapi_mpeg4.c: diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c index b461877..d9e1012 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c @@ -242,7 +242,9 @@ ensure_quant_matrix(GstVaapiDecoderMpeg4 *decoder, GstVaapiPicture *picture) GstVaapiDecoderMpeg4Private * const priv = &decoder->priv; VAIQMatrixBufferMPEG4 *iq_matrix; - if (!priv->vol_hdr.load_intra_quant_mat && !priv->vol_hdr.load_non_intra_quant_mat) { + /* Fill in VAIQMatrixBufferMPEG4 */ + /* Only the first inverse quantisation method uses the weighting matrices */ + if (!priv->vol_hdr.quant_type) { return GST_VAAPI_DECODER_STATUS_SUCCESS; }
Moving to Product:GStreamer, Component:gstreamer-vaapi
vdpau-va bridge is not supported anymore and I don't know any other va driver which supports mpeg4. If you could provide a patch with a driver supporting mpeg4, please reopen.