[FFmpeg-devel] [PATCH] Use AVBufferPool in MOV
Ronald S. Bultje
rsbultje at gmail.com
Sat Nov 23 14:46:08 EET 2024
Hi Arnaud,
On Fri, Nov 22, 2024 at 1:08 PM Arnaud Masserann <arnaud1602 at gmail.com>
wrote:
> - Should the pools be per-stream (in MOVStreamContext) or per file (in
> MOVContext) ?
>
I'm assuming the per-stream is because their bitrates (and packet sizes)
will typically be substantially different. For example, video will have
much higher packet sizes than audio, especially in situations where the
video is only lightly compressed - like what we're talking about here. If
we mix video and audio pools, the audio will take half the video size, and
effective application size in a 1video+1audio stream will as much as double
in the worst case. So I think what you're doing here is better - per-stream
pools.
I don't know if the 32-stream (*pool[32]) limit is because of practical
limits or to prevent double allocations, but if latter, it seems iffy and
should maybe be double-allocated so it works for any-streamcount media,
even if > 32.
Question: does the pooling help with small packet sizes? If not, does it
make sense to only (by default) use pools for large-packet streams (if we
know this in advance)? Or for codecs known to generate large packets?
Ronald
More information about the ffmpeg-devel
mailing list