[Ffmpeg-devel] [PATCH] DTS decoder

Michael Niedermayer michaelni
Sat Feb 24 18:49:47 CET 2007


Hi

On Sat, Feb 24, 2007 at 03:29:18PM +0200, Kostya wrote:
[...]
> [...] 
> > > +    /* Select decimation filter */
> > > +    if (decimation_select == 1) {
> > > +        decifactor = 128;
> > > +        prCoeff = (float *) lfe_fir_128;
> > > +    } else {
> > > +        decifactor = 64;
> > > +        prCoeff = (float *) lfe_fir_64;
> > 
> > what are the float * casts good for?
> 
> for hiding gcc warning, dropped them

prCoeff should be const float then theres no cast and no warning


[...]
> > [...]
> > > +#define IS_MARKER(state, i, buf, buf_size) \
> > > + ((state == DCA_MARKER_14B_LE && (i < buf_size-2) && (buf[i+1] & 0xF0) == 0xF0 && buf[i+2] == 0x07) \
> > > + || (state == DCA_MARKER_14B_BE && (i < buf_size-2) && buf[i+1] == 0x07 && (buf[i+2] & 0xF0) == 0xF0) \
> > > + || state == DCA_MARKER_RAW_LE || state == DCA_MARKER_RAW_BE)
> > 
> > cant that be simplified? in its current form its a little slow i guess
> > they way its used ...
> 
> I don't think so. DT$ designers allow 4 bitstream formats (raw/14bits BE/LE),
> each has its own marker (4 bytes for raw, 5.5 bytes for 14bits bitstream)

but
1. does this work at all? i mean lets say the parser gets 1 byte packets,
wont the buf[i+1] and buf[i+2] be split ...
2. can the state change between 2 frames? if not then theres no sense in
checking for all a simple state64 & mask == last_state or so should do

ill review the new patch in a minute (or hour or day ...)

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070224/566ed952/attachment.pgp>



More information about the ffmpeg-devel mailing list