GNOME Bugzilla – Bug 793787
[gstreamer-msdk-master][SKL] some cases mjpeg decoding fail with error message "jpegparse0: Internal data stream error".
Last modified: 2018-04-16 21:45:52 UTC
Test Env: ============================================ Platform: SKL Arch: x86_64 CentOS Linux release 7.3.1611 (Core) Kernel: 4.4.0 libva MediaServerStudioEssentials2017R3.tar.gz (libva 1.67.0.pre1) media_driver MediaServerStudioEssentials2017R3.tar.gz 16.5.2.64009- ubit gstreamer master branch 91798e16cc09420163684d13779f13f374164ea2 gst-bad master branch 1c81bf4bdc67b518d6b3bbc22398c17fe8ced1da Reproduce Steps: ============================================ take one case for example 1. build enc as above lists 2. gst-launch-1.0 filesrc location=/media/JPEG_RefCompare/400_f_11014777_vbypseclj6jfkjhgn5wsiidtrm5j0ukm.jpg '!' jpegparse '!' msdkmjpegdec '!' videoconvert '!' video/x-raw,format=I420 '!' filesink location=400_f_11014777_vbypseclj6jfkjhgn5wsiidtrm5j0ukm.jpg.yuv 3. decoding fails and error message occurs. error info ot context from element 'msdkmjpegdec0': gst.msdk.Context=context, gst.msdk.Context=(GstMsdkContext)"\(GstMsdkContext\)\ msdkcontext0"; Redistribute latency... 0:00:00.033336237 13613 0x8948f0 ERROR msdkdec gstmsdkdec.c:723:gst_msdkdec_handle_frame:<msdkmjpegdec0> DecodeFrameAsync failed (device operation failure) ERROR: from element /GstPipeline:pipeline0/GstJpegParse:jpegparse0: Internal data stream error. Additional debug info: gstbaseparse.c(3611): gst_base_parse_loop (): /GstPipeline:pipeline0/GstJpegParse:jpegparse0: streaming stopped, reason error (-5)
Created attachment 368914 [details] jpeg decoding stream
Created attachment 370316 [details] [review] jpegdec: Fix non-interleaved sample decode
@wang: Could you please have try with the attached patch? Please make sure that other conformance test samples are not failing due to this patch. If this patch causing any regression, then we need a fix from Msdk + some other changes in the decoder.
Hi Sree after apply this patch, it still has 13 cases which will fail failed cases decode_jpeg/010309_0800_4680_nshs.jpg DECODEFAIL decode_jpeg/126296226_bf7eba45c21.jpg DECODEFAIL decode_jpeg/127746-fb.jpg DECODEFAIL decode_jpeg/1-gbb-peace-389.jpg DECODEFAIL decode_jpeg/1_lifeplus_01.jpg_l.jpg DECODEFAIL decode_jpeg/230400-kerala-girl-0.jpg DECODEFAIL decode_jpeg/27022005_198.sized.jpg DECODEFAIL decode_jpeg/29-4673tourists-rice-boat-on-the-backwaters-near-kayamkulam-kerala-india-posters.jpg DECODEFAIL decode_jpeg/29-725.jpg DECODEFAIL decode_jpeg/3245_by_chris_johansen-thumb.jpg DECODEFAIL decode_jpeg/34tew40.jpg DECODEFAIL decode_jpeg/390-2377.jpg DECODEFAIL decode_jpeg/394939.jpg DECODEFAIL error info: ERROR: from element /GstPipeline:pipeline0/GstJpegParse:jpegparse0: Internal data stream error. Additional debug info: gstbaseparse.c(3611): gst_base_parse_loop (): /GstPipeline:pipeline0/GstJpegParse:jpegparse0: streaming stopped, reason not-negotiated (-4)
The issue is that jpeg parser is not reading the header and decoder is not getting the width/height information from caps. Providing width/height in capsfilter will fix the issue for conformance testing. eg: gst-launch-1.0 filesrc location= 394939.jpg ! jpegparse ! image/jpeg, width=500, height=330 ! msdkmjpegdec ! videoconvert ! ximagesink The proper fix can be done in two ways: 1: Investigate why jpegparser is failing and get a fix in parser so that we don't need to add anything in decoder side. Pros: decoder code will be simple, no need to header parsing with msdk which will help to avoid start-up(if any) delay. Cons: always will have a tight dependency to parser. 2: Use MSDK routines to extract headers from jpeg stream without relying on parser output. This requires changes in current decoder code flow. Pros: No dependency on parser output Cons: Will make the decoder implementation bit more complicated.
@zj,wang, Please have a test with the patch attached in :https://bugzilla.gnome.org/show_bug.cgi?id=795117
Hi Sree after apply the patch "0001-msdk-jpegdec-Fix-non-interleaved-sample-decode.patch" and "0001-jpegparse-Fix-APP1-marker-segment-parsing.patch", this issue will be fixed.
Review of attachment 370316 [details] [review]: pushed as commit 142ad9dbad7a4f0e0af7e033d01e22b069d4ace9