[FFmpeg-devel] [PATCH] E-AC-3 spectral extension

Michael Niedermayer michaelni
Tue Aug 4 00:29:11 CEST 2009


On Mon, Aug 03, 2009 at 06:08:52PM -0400, Justin Ruggles wrote:
> Michael Niedermayer wrote:
[...]
> >> +    int8_t spx_atten_code[AC3_MAX_CHANNELS];    ///< spx attenuation code                   (spxattencod)
> >> +    int spx_start_subband;                      ///< spx beginning frequency band           (spxbegf)
> > 
> >> +    int spx_start_freq;                         ///< spx start frequency bin
> >> +    int spx_end_freq;                           ///< spx end frequency bin
> > 
> > what are frequency bins?
> 
> MDCT coefficient index.  Frequency bin is the term that the (E-)AC-3
> spec uses throughout.

Please explain these terms somewhere, like at the top of the file.
And dont hesitate to add diagrams and ascii art to make all the relations
clear.


> 
> > 
> >> +    int spx_copy_start_freq;                    ///< spx starting frequency for copying     (copystartmant)
> > 
> > frequency in hz ?
> 
> bin number. fixed.

next clarify what starting frequency is
there surely is a source and a destination to every copy ...


> 
> 
> >> +    int num_spx_bands;                          ///< number of spx bands                    (nspxbnds)
> > 

> >> +    uint8_t spx_band_struct[SPX_MAX_BANDS];     ///< spectral extension band structure      (spxbndstrc)
> > 
> > what is a spectral extension band structure?
> 
> 
> determines how many subbands are in each band.  for each subband, 1
> means combine with previous band, 0 means start new band.  this is the
> same format as the coupling band structure, hence the shared function to
> decode it.  I just added more information to the current documentation
> for decode_band_structure().

Could you please explain this in the doxy of the variable,
someone reading the code who sees "spx_band_struct" would look up
the doxy in the struct first and only if the doxy that is supposed
to explain does not do that at all would he read the code using the
variable
you dont have to write all the details in the doxy but
"spectral extension band structure" says nothing unless one happens to
know the ac3 spec by heart and id love to not require that.
A person knowing how MDCT+VLC/RLE based audio coding works should be
able to make sense of such decoders in lavc and not have to read
through each individual spec

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

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090804/f587dfbf/attachment.pgp>



More information about the ffmpeg-devel mailing list