[Vorbis-dev] Updated comment padding patches

Michael Gold mgold at ncf.ca
Thu Jan 1 22:11:57 PST 2009


[I'm resending this message with compressed attachments since the
original has been stuck in the moderation queue since 2008-12-18]

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.gz
Type: application/octet-stream
Size: 2045 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20090102/aff44348/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcomment-pad-2.diff.gz
Type: application/octet-stream
Size: 12682 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20090102/aff44348/attachment-0001.obj 
-------------- 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/20090102/aff44348/attachment.pgp 


More information about the Vorbis-dev mailing list