Browse Source

ttadec: use branchless unsigned-to-signed unfolding

tags/n0.11
Justin Ruggles 14 years ago
parent
commit
f2a4559c77
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavcodec/tta.c

+ 1
- 2
libavcodec/tta.c 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);


Loading…
Cancel
Save