Skip to content

Commit

Permalink
msdk: jpegdec: Fix non-interleaved sample decode
Browse files Browse the repository at this point in the history
Using the default value (InterleavedDec == MFX_SCANTYPE_UNKNOWN)
causing issues with non-interleaved sample decode. Ideally the usage
of MFXVideoDECODE_DecodeHeader should fix these type of issue, but
it seems to be not. But hardcoding the InterleaveDec to
MFX_SCANTYPE_NONINTERLEAVED
is fixing the problem and fortunately msdk seems to be taking care of
Interleaved samples
too .So let's hardcode it for now.

https://bugzilla.gnome.org/show_bug.cgi?id=793787
  • Loading branch information
sreerenjb committed Apr 16, 2018
1 parent dc41c25 commit 3f90235
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sys/msdk/gstmsdkmjpegdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ static gboolean
gst_msdkmjpegdec_configure (GstMsdkDec * decoder)
{
decoder->param.mfx.CodecId = MFX_CODEC_JPEG;

/* HACK to make sure MSDK won't crash while handling non-interleaved samples */
/* setting MFX_SCANTYPE_UNKNOWN (== 0) causing issues for
non-interleaved samples. Usage of MFXVideoDECODE_DecodeHeader
also doesn't seems to fix the issue. But even if we hardcode
the InterleaveDec to MFX_SCANTYPE_NONINTERLEAVED, msdk seems to be taking care
of Interleaved samples, so let's hardcode it for now */
decoder->param.mfx.InterleavedDec = MFX_SCANTYPE_NONINTERLEAVED;
return TRUE;
}

Expand Down

0 comments on commit 3f90235

Please sign in to comment.