[Ffmpeg-devel] [PATCH] fix 2 ac3 bit allocation bugs

Michael Niedermayer michaelni
Sun Sep 3 10:08:37 CEST 2006


Hi

On Sat, Sep 02, 2006 at 06:28:51PM -0400, Justin Ruggles wrote:
> Hello,
> 
> In my attempts to adjust AC3 bit allocation parameters, I have come
> across 2 bugs.  They do not currently affect FFmpeg's output since they
> only involves table values which are not used right now, but I think
> they should be fixed anyway...especially since the tables could be
> reused in an FFmpeg AC-3 decoder.
> 
> bug #1:
> I ran into problems when increasing the bandwidth setting.  I found the
> issue to be the last table entry in bndtab.  It should be set to the
> next starting bin number, not zero.
> 
> bug #2:
> The floorcod table entries are copied directly from the spec, but when
> using floorcod of 7 it gives buggy output.  Also, the value of 63488
> doesn't make sense (it makes the masking curve flat...i think).  Anyway,
> I found the answer in the spec.
> 
> A/52A page 60, last paragraph:
> "...each step is definied exactly in terms of fixed-point integer
> operations and table lookups.  Throughout the discussion below, signed
> two's complement arithmetic is employed..."
> 
> So the table needs to be changed to signed 16-bit.  This makes
> floorcod[7] = -2048, which encodes and decodes properly.

patch looks ok (assuming regression tests pass)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list