changeset 12242:a2f6d8c61b9c libavcodec

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.
author darkshikari
date Fri, 23 Jul 2010 06:41:35 +0000
parents c7f6ddcc5c01
children 788445bf10c0
files vp8.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vp8.c	Fri Jul 23 06:02:52 2010 +0000
+++ b/vp8.c	Fri Jul 23 06:41:35 2010 +0000
@@ -557,7 +557,8 @@
             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);\