OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d784052
)
ttadec: use branchless unsigned-to-signed unfolding
author
Justin Ruggles
<justin.ruggles@gmail.com>
Fri, 17 Feb 2012 02:51:03 +0000
(21:51 -0500)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Fri, 17 Feb 2012 19:35:35 +0000
(14:35 -0500)
libavcodec/tta.c
patch
|
blob
|
history
diff --git
a/libavcodec/tta.c
b/libavcodec/tta.c
index
db9c1b2
..
6f4d161
100644
(file)
--- a/
libavcodec/tta.c
+++ b/
libavcodec/tta.c
@@
-396,8
+396,7
@@
static int tta_decode_frame(AVCodecContext *avctx, void *data,
}
// extract coded value
-#define UNFOLD(x) (((x)&1) ? (++(x)>>1) : (-(x)>>1))
- *p = UNFOLD(value);
+ *p = 1 + ((value >> 1) ^ ((value & 1) - 1));
// run hybrid filter
ttafilter_process(filter, p);