After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733240 - mpeg4: iq_matrix should be allocated in every cases
mpeg4: iq_matrix should be allocated in every cases
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-16 09:19 UTC by Fabrice Bellet
Modified: 2018-05-04 12:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabrice Bellet 2014-07-16 09:19:38 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;
     }
Comment 1 sreerenj 2016-03-24 16:53:35 UTC
Moving to Product:GStreamer, Component:gstreamer-vaapi
Comment 2 Víctor Manuel Jáquez Leal 2018-05-04 12:42:13 UTC
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.