[FFmpeg-devel] [PATCH 3/3] apng: Add a basic APNG muxer

Michael Niedermayer michaelni at gmx.at
Wed Apr 1 15:23:33 CEST 2015


On Wed, Apr 01, 2015 at 01:17:50PM +0000, Donny Yang wrote:
> On 1 April 2015 at 23:28, Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > On Wed, Apr 01, 2015 at 12:07:46PM +0000, Donny Yang wrote:
> > > On 1 April 2015 at 22:57, Paul B Mahol <onemda at gmail.com> wrote:
> > >
> > > > On 4/1/15, Donny Yang <work at kota.moe> wrote:
> > > > > On 1 April 2015 at 17:03, Paul B Mahol <onemda at gmail.com> wrote:
> > > > >
> > > > >> Dana 31. 3. 2015. 22:59 osoba "Donny Yang" <work at kota.moe>
> > napisala je:
> > > > >> > +#include <zlib.h>
> > > > >>
> > > > >> This is missing dependency on zlib in configure.
> > > > >>
> > > > > Fixed
> > > > >
> > > > >
> > > >
> > > > But this is more appropriate for APNG encoder. APNG muxer seems to not
> > > > use zlib at all.
> > > >
> > > It's used for it's crc32 functions for editing/creating chunks.
> >
> > please use libavutil/crc*
> >
> 
> I applied the following patch to my code, but ffmpeg's functions seem to be
> producing the wrong crc32 value.
> 
> For example:
> $ crc32 <(printf "acTL\x00\x00\x00\x14\x00\x00\x00\x00")
> 1c2df152
> While a `av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0,
> "acTL\x00\x00\x00\x14\x00\x00\x00\x00", 12)` returns 0xf6f7ccdd.
> (using AV_CRC_32_IEEE_LE also produces an incorrect checksum)
> 
> What am I doing wrong?

http://www.w3.org/TR/PNG-CRCAppendix.html
says:

/* Update a running CRC with the bytes buf[0..len-1]--the CRC
      should be initialized to all 1's, and the transmitted value
      is the 1's complement of the final running CRC (see the
      crc() routine below)). */


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

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150401/c93940f2/attachment.asc>


More information about the ffmpeg-devel mailing list