aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2010-07-23 06:41:35 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2010-07-23 06:41:35 +0000
commit0087aa47d0a46cb9919d3fe480be99fb77443446 (patch)
tree32f6244eb0ec7d94ae039c7118dfbb4c52eeed65
parent3ae079a3c8be54cc3c9c7e68c8b2324f3a4e4253 (diff)
downloadffmpeg-0087aa47d0a46cb9919d3fe480be99fb77443446.tar.gz
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. Originally committed as revision 24456 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/vp8.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 744627c932..8ff6fbad99 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -557,7 +557,8 @@ static void find_near_mvs(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y,
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);\