[FFmpeg-devel] [PATCH] fix H.264 decoding on big-endian

Michael Niedermayer michaelni
Mon Feb 15 02:25:32 CET 2010


On Sun, Feb 14, 2010 at 10:47:49PM +0100, Michael Niedermayer wrote:
> On Sun, Feb 14, 2010 at 09:27:32PM +0100, Reimar D?ffinger wrote:
> > On Sun, Feb 14, 2010 at 09:21:10PM +0100, Reimar D?ffinger wrote:
> > > no idea what I am doing, but this seems to work:
> > 
> > Sorry, now the same against latest SVN:
> > Index: libavcodec/h264_direct.c
> > ===================================================================
> > --- libavcodec/h264_direct.c	(revision 21824)
> > +++ libavcodec/h264_direct.c	(working copy)
> > @@ -178,8 +178,13 @@
> >  
> >              int match_count= (left_ref==ref[list]) + (top_ref==ref[list]) + (refc==ref[list]);
> >              if(match_count > 1){ //most common
> > +#if HAVE_BIGENDIAN
> > +                mv[list]= (mid_pred(A[0], B[0], C[0])<<16)
> > +                         +(mid_pred(A[1], B[1], C[1])&0xFFFF);
> > +#else
> >                  mv[list]= (mid_pred(A[0], B[0], C[0])&0xFFFF)
> >                           +(mid_pred(A[1], B[1], C[1])<<16);
> > +#endif
> 
> should be pack16to32()

applied that

[...]
-- 
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: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100215/98b0f23f/attachment.pgp>



More information about the ffmpeg-devel mailing list