[FFmpeg-devel] [PATCH] Fix 4XM decoding on big-endian and unaligned reads

Michael Niedermayer michaelni
Thu Nov 11 14:03:37 CET 2010


On Thu, Nov 11, 2010 at 11:11:26AM +0100, Vitor Sessak wrote:
> $subj, see issue2195.
>
> -Vitor

>  4xm.c |   22 +++++++++++++++-------
>  1 file changed, 15 insertions(+), 7 deletions(-)
> 54479967536ec20908d3caa7d62b4e28fb8c2c3e  4xm.diff
> Index: libavcodec/4xm.c
> ===================================================================
> --- libavcodec/4xm.c	(revision 25108)
> +++ libavcodec/4xm.c	(working copy)
> @@ -260,6 +260,14 @@
>      }
>  }
>  
> +#define LE_CENTRIC_MUL(dst, src, scale, dc) \
> +    { \
> +        unsigned tmpval = ((src)[1] << 16) + (src)[0];  \
> +        tmpval = tmpval * (scale) + (dc);               \
> +        (dst)[0] = tmpval & 0xFFFF;                     \
> +        (dst)[1] = tmpval >> 16;                        \
> +    }

some ifdef so this doesnt slow down LE should be added

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

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/20101111/80b8b6fc/attachment.pgp>



More information about the ffmpeg-devel mailing list