[Vorbis-dev] Large Packets and page size...

Monty xiphmont at xiph.org
Wed Sep 22 09:50:36 PDT 2004




On Thu, Sep 23, 2004 at 07:04:24PM +0800, illiminable wrote:
> I'm just wondering about some guidelines on page size... For example if you 
> have a stream where all packets are consistently of size > 40,000 bytes 
> (but less than 65000), is it appropriate to just put them 1 per page ie 
> have large pages.

Guidelines for page size are 'what makes the most sense'.  The 4kB
rule of thumb was for Vorbis, not other codecs.  Generally you want to
choose page size with overhead, latency and mux granularity in mind.

> Packets in this range incur the page overhead about 10 times each... and 
> most of the pages have no useful information.

right.
 
> What are the pro's and cons of 10x 4k pages per packet (~1.5% overhead) vs 
> 1x 40k page per packet (~0.5% overhead)

As described, your case wants the larger pages.  I can think of a few
cases where smaller would be better (you can too), but re-pagination
in mux for specialized cases was always the intent.

> As for pro's i can think of...
> 
> Less buffer manipulation reconstructing packets.
> Less overhead
> Less seek misses.

right

> Why the recommendation of 4k pages... it makes sense in terms of small 
> packets... but does this justification for this recommendation still hold 
> when packets are very large.

Only if some other design consideration makes it more useful.  In most
cases, large packets == large pages.

Monty


More information about the Vorbis-dev mailing list