[FFmpeg-cvslog] r22288 - trunk/libavcodec/avcodec.h

Reimar Döffinger Reimar.Doeffinger
Wed Mar 10 07:57:45 CET 2010


On Wed, Mar 10, 2010 at 12:10:43AM +0100, Michael Niedermayer wrote:
> the h264 spec mandates some size limit on MBs i think something around 400
> byte for 8bit 4:2:0 but thats just for valid streams, a crafted stream
> can go far beyond that size for a macro block.

Ok, I suspect padding with 0 is not going to help...
Of course it would be possible to switch to "careful mode" as soon as
we are close to the buffer end, but it would at least be an extra effort
and possibly not any more efficient.

> beyond that there is codec specific kbs of padding
> or
> dosable
> or
> killing small packet audio codecs.
> or
> 1%+ speed loss due to buffer checks in the inner loops
> 
> or an intermediate mix of them

Different values for audio and video codecs possible?
But I also want to note that huge padding for H.264 will not
just kill small packet audio codecs, it will also become
quite ugly with high-compression, low-resolution H.264,
and the codec-specific padding will not help there.
Although if we measure the amount of data wasted per second,
the problem with "small packet audio codecs" should not
be so big, if it wasn't for things like AVI demuxer that
creates tiny PCM packets.



More information about the ffmpeg-cvslog mailing list