[Ffmpeg-devel] [PATCH] fix 2 ac3 bit allocation bugs
Sun Sep 3 18:00:28 CEST 2006
Michael Niedermayer wrote:
> On Sat, Sep 02, 2006 at 06:28:51PM -0400, Justin Ruggles wrote:
>>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.
>>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.
>>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 = -2048, which encodes and decodes properly.
> patch looks ok (assuming regression tests pass)
applied. and yes, regression tests pass since neither table value is
More information about the ffmpeg-devel