[FFmpeg-devel] [PATCH] TXD demuxer and decoder

Ivo ivop
Mon May 7 12:42:03 CEST 2007


On Monday 07 May 2007 11:57, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> > On Sun, May 06, 2007 at 09:44:36PM +0200, Ivo wrote:
> >> On Sunday 06 May 2007 18:15, Michael Niedermayer wrote:
> >> [..about stack based demuxer..]
> >>
> >> > and i dont like messy code being justified by (its not slower or
> >> > bigger and i know of no case where its needed but maybe there exist
> >> > some files which have a different structure which might benefit from
> >> > the messy code)
> >> >
> >> > messy code rather should be justified with (its smaller or its
> >> > faster or file xyz needs it)
> >>
> >> Ok, I stripped down the demuxer to its bare bones and it still demuxes
> >> the same GTA:SA files as it did before. I also added PAL8 and raw
> >> RGB32 support to the decoder and fixed a bug in the decoder. The patch
> >> also includes all your previous suggestions that I did not send to the
> >> list yet.
> >
> > [...]
> >
> >> +    for (by=0; by < h/4; by++, d += stride-w)
> >> +        for (bx=0; bx < w/4; bx++, s+=16, d+=4)
> >> +            dxt1_decode_pixels(s+8, d, qstride, 1,
> >> le2me_64(*(uint64_t *)s));
> >
> > i think s will not be aligned to 8 bytes here so this could crash non
> > x86
>
> We should add AV_[RW][BL]64 macros.

How about the attached patch?

If it is acceptable, I will apply it separately and use it in s3tc.c instead 
of le2me_64.

--Ivo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intreadwrite64.patch
Type: text/x-diff
Size: 3058 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070507/d6ed1001/attachment.patch>



More information about the ffmpeg-devel mailing list