[Bug 789739] Dark image, vaapijpegdec

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Nov 2 20:53:47 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=789739

--- Comment #2 from Nikolai <lubagov at gmail.com> ---
I am solve this bug self, but i think it is not good solution, in any case.
As it turned out, the quantization matrix is filled, even before the parsing of
the JPEG format, and reading the quantification table. In this case, the
default quantization matrix is used. But it is for this camera that it does not
work properly.

I really want to see good solution, in fact a bug very serious and unpleasant.



diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c
b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c
index bef1eb71..ccba6a45 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c
@@ -830,9 +830,9 @@ gst_vaapi_decoder_jpeg_start_frame (GstVaapiDecoder *
base_decoder,
   if (!fill_picture (decoder, picture, &priv->frame_hdr))
     return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;

-  status = fill_quantization_table (decoder, picture);
-  if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
-    return status;
+//  status = fill_quantization_table (decoder, picture);
+//  if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
+//    return status;

   /* Update presentation time */
   picture->pts = GST_VAAPI_DECODER_CODEC_FRAME (decoder)->pts;
@@ -845,6 +845,11 @@ gst_vaapi_decoder_jpeg_end_frame (GstVaapiDecoder *
base_decoder)
   GstVaapiDecoderJpeg *const decoder =
       GST_VAAPI_DECODER_JPEG_CAST (base_decoder);

+  GstVaapiDecoderJpegPrivate *const priv = &decoder->priv;
+  VAStatus status = fill_quantization_table (decoder, priv->current_picture);
+  if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
+    return status;
+
   return decode_current_picture (decoder);
 }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list