[MPlayer-dev-eng] [PATCH] [TEST AFILTER] Encode ac3 at runtime using lavc

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Nov 24 17:29:15 CET 2007


On Sun, Nov 25, 2007 at 12:08:02AM +0800, Ulion wrote:
> 2007/11/24, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > > +    static const int default_sample_rate[AC3_MAX_CHANNELS+1] = \
> > > +        {0, 96000, 192000, 256000, 384000, 448000, 448000};
> >
> > That '\' is pointless.
> >
> > > +        s->expect_len    = AC3_FRAME_SIZE * data->nch * data->bps;
> > > +        if (s->add_iec61937_header)
> > > +            af->mul = (double)AC3_FRAME_SIZE * 2 * 2 / s->expect_len;
> > > +        else
> > > +            af->mul = (double)AC3_MAX_CODED_FRAME_SIZE / s->expect_len;
> >
> > still think it is better to always add the headers and add removal code
> > to ao_pcm if desired. That is assuming that the padding 0 do not hurt,
> > but I doubt they will.
> 
> removal code in ao_pcm is a plan, but indeed you will find it's a
> little hard to do that, and I'm not ready to do that by now.

Why doesn't reading the bit length from the header, converting it to
bytes, writing that many bytes (outburst is 65536 so all of it should be
in one play call) and returning the number of bytes written +  header
len not work?

> I'm sorry the second sentence you said 'That is assuming that the
> pendding 0 do not hurt', what's the 'That' mean? I didn't figure it
> out.

"That" refers to the sentence before, or maybe more precisely an
no-header mode being pointless.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list