diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-16 21:51:03 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-17 14:35:35 -0500 |
commit | f2a4559c77ebce36b575e75fad102d2e9f02bb5a (patch) | |
tree | 0fdc0cc5b80812bb92d8e77aa8a3f4ab2186b8b0 | |
parent | d7840529b6aaaa24426025781e5fcde673108d39 (diff) | |
download | ffmpeg-f2a4559c77ebce36b575e75fad102d2e9f02bb5a.tar.gz |
ttadec: use branchless unsigned-to-signed unfolding
-rw-r--r-- | libavcodec/tta.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c index db9c1b288e..6f4d161504 100644 --- 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); |