[FFmpeg-cvslog] r24456 - trunk/libavcodec/vp8.c

darkshikari subversion
Fri Jul 23 08:41:35 CEST 2010


Author: darkshikari
Date: Fri Jul 23 08:41:35 2010
New Revision: 24456

Log:
VP8: fix broken sign bias code in MV pred
Apparently the official conformance test vectors don't test this feature,
even though libvpx uses it.

Modified:
   trunk/libavcodec/vp8.c

Modified: trunk/libavcodec/vp8.c
==============================================================================
--- trunk/libavcodec/vp8.c	Fri Jul 23 08:02:52 2010	(r24455)
+++ trunk/libavcodec/vp8.c	Fri Jul 23 08:41:35 2010	(r24456)
@@ -557,7 +557,8 @@ static void find_near_mvs(VP8Context *s,
             if (mv) {\
                 if (cur_sign_bias != sign_bias[edge_ref]) {\
                     /* SWAR negate of the values in mv. */\
-                    mv = ((mv&0x80008000) + 0x00010001) ^ (mv&0x7fff7fff);\
+                    mv = ~mv;\
+                    mv = ((mv&0x7fff7fff) + 0x00010001) ^ (mv&0x80008000);\
                 }\
                 if (!n || mv != AV_RN32A(&near_mv[idx]))\
                     AV_WN32A(&near_mv[++idx], mv);\



More information about the ffmpeg-cvslog mailing list