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

Michael Niedermayer michael at niedermayer.cc
Sat Jul 25 19:21:44 CEST 2015

On Sat, Jul 25, 2015 at 07:00:00PM +0300, Ivan Uskov wrote:
> Hello Michael,
> Saturday, July 25, 2015, 6:14:20 PM, you wrote:
> >> I can implement necessary functions to generate annex-b prefixes just into
> >> libavcodec/qsvdec_h264.c if Michael will agree this way.
> MN> would this be faster ?
> MN> avoid a copy/malloc ?
> If it implemented inside libavcodec/qsvdec_h264.c then it will use
> about same code like current bsf implementation uses but with using of
> private buffer for sps/pps instead public extradata buf using.
> Here can  be the trick to write SPS/PPS directly to
> QSVContext::input_fifo which implemented recently into qsvdec.
> It will not solve memory copying necessity but it will solve possible twice memory
> copying issue when packet re-allocation perform into mp4toannexb filter then
> data copies again into input_fifo since qsv decoder did not consume
> previous packet in full. What do you think?

does this affect a large memcpy() on a common path ?

if it avoids just a rare or small case then its not worth it

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150725/1b2e235d/attachment.sig>

More information about the ffmpeg-devel mailing list