[FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.

Ivan Uskov ivan.uskov at nablet.com
Sat Jul 25 15:41:46 CEST 2015


Hello Hendrik,

Saturday, July 25, 2015, 3:13:38 PM, you wrote:

HL> I'm slightly confused by the entire concept here.

HL> - Why does the decoder need to re-init anyway?
Each time when I launch a command line like:
./ffmpeg -c:v h264_qsv -i hd.mp4 -y result.yuv
I can see that:
1. decoder opens,
2. decoding until stream detect performs,
3. decoder closes,
4. decoder opens,
5. normal decoding begins.
I still not big ffmpeg expert but I suspecting this behavior is by design.

HL> - You want the bsf to convert the bitstream to annexb, but not the
HL> extradata? Why not?
qsv* modules does not touch extradata at all.
But at step #5 above the bsf bumped to converted extradata which product of
bsf by itself at step #2. So at step #5 bsf confuses and fails.
So no mkv and mp4 decoding by h264_qsv at all currently.

HL> - Ideally, a decoder should support both bitstream syntax without the
HL> bsf, since the bsf is a hack for re-muxing, and many playback
HL> applications do not use the bsf since practically no decoder otherwise
HL> needs them.
Intel's QSV decoder does require annex-b stream, it is documented in
SDK reference.
I can implement necessary functions to generate annex-b prefixes just into
libavcodec/qsvdec_h264.c if Michael will agree this way.

-- 
Best regards,
 Ivan                            mailto:ivan.uskov at nablet.com



More information about the ffmpeg-devel mailing list