projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79aec75
)
avoid conditional and division in chroma MV calculation
author
Stefan Gehrer
<stefan.gehrer@gmx.de>
Wed, 23 Jun 2010 21:45:26 +0000
(21:45 +0000)
committer
Stefan Gehrer
<stefan.gehrer@gmx.de>
Wed, 23 Jun 2010 21:45:26 +0000
(21:45 +0000)
Originally committed as revision 23745 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/vp8.c
patch
|
blob
|
history
diff --git
a/libavcodec/vp8.c
b/libavcodec/vp8.c
index
b1c40e8
..
3d735e5
100644
(file)
--- a/
libavcodec/vp8.c
+++ b/
libavcodec/vp8.c
@@
-989,8
+989,8
@@
static void inter_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb,
mb->bmv[ 2*y * 4 + 2*x+1].y +
mb->bmv[(2*y+1) * 4 + 2*x ].y +
mb->bmv[(2*y+1) * 4 + 2*x+1].y;
- uvmv.x = (uvmv.x +
(uvmv.x < 0 ? -2 : 2)) / 4
;
- uvmv.y = (uvmv.y +
(uvmv.y < 0 ? -2 : 2)) / 4
;
+ uvmv.x = (uvmv.x +
2 + (uvmv.x >> (INT_BIT-1))) >> 2
;
+ uvmv.y = (uvmv.y +
2 + (uvmv.y >> (INT_BIT-1))) >> 2
;
if (s->profile == 3) {
uvmv.x &= ~7;
uvmv.y &= ~7;