[FFmpeg-devel] [PATCH] FLAC parser

Michael Niedermayer michaelni
Sun Sep 26 04:29:10 CEST 2010


On Sun, Sep 26, 2010 at 03:00:06AM +0300, Felipe Contreras wrote:
> On Sun, Sep 26, 2010 at 2:47 AM, Felipe Contreras
> <felipe.contreras at gmail.com> wrote:
> > On Fri, Aug 20, 2010 at 10:32 AM, Michael Chinen <mchinen at gmail.com> wrote:
> >> On Wed, Aug 18, 2010 at 7:29 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> [...]
> >>>> Putting in MN's suggestion to concatenate sequential valid CRCs instead of checking them twice.
> >>>
> >>> elaborate on what you do here please
> >>
> >> When a new header candidate (FLACHeaderMarker) is found and added as
> >> the nth header a linked list, CRC is verified from the start of the
> >> n-1 header to the nth. ?If this check fails, the n-2 header to n CRC
> >> is computed up to n-kth header, where k is the
> >> FLAC_MAX_SEQUENTIAL_HEADERS constant. ?If a check succeeds the (m-1)
> >> bit of the N-mth FLACHeaderMarker's crc_valid is set. ?Then all
> >> headers that came before it and within the max distance are marked
> >> valid to the nth header by having the appropriate bit of crc_valid set
> >> if they are marked valid to the N-mth header.
> >>
> >> This means that if CRCs verify no byte will be double checked. ?If a
> >> header's crc fails, then they will. ? This could be removed at the
> >> cost of tracking non zero CRC remainders for those that fail, but
> >> since this does not happen often, I thought it was a not a good
> >> optimization.
> >
> > These don't work for me, I just get a bunch of:
> > Error while decoding stream #0.0
> > [flac @ 0x933d6a0] invalid frame header: frame sync error
> > [flac @ 0x933d6a0] decode_frame() failed
> >
> > Oh, and BTW, other projects put the patch series changes in the
> > diffstat of the patch (so it's not part of the commit message).
> 
> Ah, I needed CONFIG_FLAC_PARSER.
> 
> Since now the decoder doesn't work without the parser, wouldn't a
> dependency should somehow be specified?

the decoder doesnt work if it is feeded with correctly framed input?


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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100926/046db919/attachment.pgp>



More information about the ffmpeg-devel mailing list