OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc77fce
)
Replace mvd>2 + mvd>32 by MIN((mvd+28)*17>>9, 2)
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 24 Feb 2010 16:16:08 +0000
(16:16 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 24 Feb 2010 16:16:08 +0000
(16:16 +0000)
same speed as far as i can meassure but it might have fewer branches on some
archs.
Idea from x264 / jason
Originally committed as revision 22027 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/h264_cabac.c
patch
|
blob
|
history
diff --git
a/libavcodec/h264_cabac.c
b/libavcodec/h264_cabac.c
index
576273c
..
708255c
100644
(file)
--- a/
libavcodec/h264_cabac.c
+++ b/
libavcodec/h264_cabac.c
@@
-915,7
+915,7
@@
static int decode_cabac_mb_mvd( H264Context *h, int list, int n, int l ) {
int ctxbase = (l == 0) ? 40 : 47;
int mvd;
- if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+
(amvd>2) + (amvd>3
2)]))
+ if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+
FFMIN(((amvd+28)*17)>>9,
2)]))
return 0;
mvd= 1;