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:
725b3da
)
Simplify suffix_length computation, same speed.
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 24 Jan 2010 18:18:08 +0000
(18:18 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 24 Jan 2010 18:18:08 +0000
(18:18 +0000)
Originally committed as revision 21430 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/h264_cavlc.c
patch
|
blob
|
history
diff --git
a/libavcodec/h264_cavlc.c
b/libavcodec/h264_cavlc.c
index 9440ce03eb8704847d8b83ac59afe10f62a8e868..e4181603fad0e3dd6bca95c9c62aaa4a7017fb0a 100644
(file)
--- a/
libavcodec/h264_cavlc.c
+++ b/
libavcodec/h264_cavlc.c
@@
-443,9
+443,7
@@
static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
}else{
level_code += ((level_code>>31)|1) & -(trailing_ones < 3);
- suffix_length = 1;
- if(level_code + 3U > 6U)
- suffix_length++;
+ suffix_length = 1 + (level_code + 3U > 6U);
level[trailing_ones]= level_code;
}