[FFmpeg-devel] MPEG Audio encoding

Michael Niedermayer michaelni
Fri Jan 25 19:49:16 CET 2008


On Fri, Jan 25, 2008 at 02:34:32PM +0100, John Sigler wrote:
> Michael Niedermayer wrote:
> 
> > On Fri, Jan 25, 2008 at 10:51:13AM +0100, John Sigler wrote:
> >
> >> [ This message was originally posted to ffmpeg-user ]
> > 
> > you want to send a patch? if not its the wrong list ...
> 
> Are you saying that asking whether a feature is implemented in
> libavcodec is off-topic here? I would think that, before writing
> a patch implementing a specific feature, one would need to make
> sure that this feature had not already been implemented, no?

its on topic if you plan to write a patch, its off topic if its just
a user question ...


> 
> >> I have a few questions concerning the MPEG Audio encoder in ffmpeg.
> >> ( mpegaudioenc.c )
> >>
> >> (I've been reading the corresponding Wikipedia articles.)
> >> http://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_I
> >> http://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II
> >>
> >> AFAICT mpegaudioenc.c implements MPEG-2 Layer II (i.e. MP2).
> >>
> >> Is there support for MPEG Audio Layer I in libavcodec?
> > 
> > why do you want "mp1" ?
> 
> I didn't say I wanted mp1, I am asking whether the current code
> implements layer I. (I don't think so, but I could be wrong.)

i dont think so either but i didnt write our mp2 encoder


> 
> > [...]
> 
> In the snipped part, I forgot to ask whether the current code
> implements both MPEG-1 layer II and MPEG-2 layer II. (I think
> so, but I could be wrong.)
> 
> >> On a related subject, the Wikipedia article states:
> >>
> >> The format is based on successive digital frames of 1152 sampling
> >> intervals with four possible formats:
> >>
> >>      * mono format
> >>      * stereo format
> >>      * joint stereo format (stereo irrelevance)
> >>      * dual channel (uncorrelated) format
> >>
> >> http://en.wikipedia.org/wiki/Joint_stereo
> >>
> >> And mpegaudio.h defines
> >>
> >> #define MPA_STEREO  0
> >> #define MPA_JSTEREO 1
> >> #define MPA_DUAL    2
> >> #define MPA_MONO    3
> >>
> >> But joint stereo and dual mono do not seem (??) to be supported by
> >> the encoder. Is that correct?
> > 
> > could be, if so send a patch implementing them!
> 
> I'm trying to determine the state of the current (MP2) code. I spent
> several hours reading it, to get a preliminary general understanding
> of it. I was hoping that a helpful developer would accept to share
> some clues to help speed up the learning process. (That developer
> does not have to be you if you do not feel like wasting your time
> on me.)

id awnser your questions if i would knew the awnsers for sure, but i would
have to read the source as well, and fabrice who wrote the mp2 encoder is too
busy to awnser (and possibly doesnt even read all mails here anymore)


> 
> >> Were joint stereo and dual mono actually defined for Layer II,
> >> or did they only show up later in Layer III?
> > 
> > greping the draft ...
> > "Joint Stereo coding can be added as an additional feature to any of
> > the layers."
> 
> Thanks for the information.
> 
> > I suggest you read it yourself next time instead of asking. You will
> > have to read it anyway to implement it and send a patch.
> 
> I concede that my last question was trivial, and that I should
> have anticipated that it would elicit an RTFM from a belligerent
> respondent. I grabbed 13818-3, and will try to educate myself.
> 
> In the mean time, could someone in a better disposition comment
> on the current implementation? Specifically, does the encoder
> support joint stereo (M/S stereo coding AFAIU) and dual mono
> (whatever that is)?

i think we dont support M/S nor intensity stereo in the encoder but thats
just from a quick look at the source ...
mp2 does not allow M/S but just intensity as has already been pointed out

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

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- 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/20080125/e9178ab7/attachment.pgp>



More information about the ffmpeg-devel mailing list