[FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.
ivan.uskov at nablet.com
Sat Jul 25 20:02:55 CEST 2015
Saturday, July 25, 2015, 8:21:44 PM, you wrote:
>> 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?
MN> does this affect a large memcpy() on a common path ?
MN> if it avoids just a rare or small case then its not worth it
I believe this trick will no give visible improvement in performance.
Just small win in some rare cases.
Ivan mailto:ivan.uskov at nablet.com
More information about the ffmpeg-devel