Commit f2a4559c authored by Justin Ruggles's avatar Justin Ruggles

ttadec: use branchless unsigned-to-signed unfolding

parent d7840529
...@@ -396,8 +396,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data, ...@@ -396,8 +396,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
} }
// extract coded value // extract coded value
#define UNFOLD(x) (((x)&1) ? (++(x)>>1) : (-(x)>>1)) *p = 1 + ((value >> 1) ^ ((value & 1) - 1));
*p = UNFOLD(value);
// run hybrid filter // run hybrid filter
ttafilter_process(filter, p); ttafilter_process(filter, p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment