[Vorbis-dev] Updated comment padding patches

Michael Gold mgold at ncf.ca
Thu Dec 18 15:05:48 PST 2008


I've attached updated patches (against vorbis-tools 1.3.0b3.5) to
support comment padding. No changes to libvorbis are necessary. The
padding is added in the same way as oggenc2 (null bytes within the
packet, at the end) and shouldn't cause problems with any reasonable
decoder or comment editor implementations.

Padding is enabled by default, except for small files (less than 30 s
for oggenc, or less than 256 KB for vorbiscomment). When enabled, the
comment packet is padded to a multiple of some blocksize so that the
packet size won't depend too much on the initial comment size. An extra
block is added if less than half a block remains free.

Oggenc now has a --comment-padding=n option, and vorbiscomment has a
similar --padding=n option. n=0 disables padding, n=1 forces it with an
automatically-chosen blocksize, and any other value sets the blocksize.
The auto-selected blocksize is
  512 bytes when (nominal bitrate > 0 and < 96000)
            or padding is forced on a small file
  4096 bytes otherwise
(though vorbiscomment's new in-place editing feature will work with any
amount of padding, as long as the data will fit).

-- Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oggenc-pad-2.diff
Type: text/x-diff
Size: 6292 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20081218/34fafa4c/attachment-0002.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcomment-pad-2.diff
Type: text/x-diff
Size: 46487 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20081218/34fafa4c/attachment-0003.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20081218/34fafa4c/attachment-0001.pgp 


More information about the Vorbis-dev mailing list