1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

ttadec: use branchless unsigned-to-signed unfolding

This commit is contained in:
Justin Ruggles 2012-02-16 21:51:03 -05:00
parent d7840529b6
commit f2a4559c77

View File

@ -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);