[FFmpeg-soc] [soc]: r3881 - dirac/libavcodec/diracdec.c
conrad
subversion at mplayerhq.hu
Tue Dec 9 23:05:50 CET 2008
Author: conrad
Date: Tue Dec 9 23:05:49 2008
New Revision: 3881
Log:
Optimization suggested by Michael
Modified:
dirac/libavcodec/diracdec.c
Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c (original)
+++ dirac/libavcodec/diracdec.c Tue Dec 9 23:05:49 2008
@@ -686,12 +686,13 @@ static int dirac_decode_frame_internal(D
the data calculated by MC. */
line = coeffs;
if (s->refs) {
+ int bias = 257 << (s->total_wt_bits - 1);
mcline = s->mcpic;
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
- int coeff = mcline[x] + (1 << (s->total_wt_bits - 1));
+ int coeff = mcline[x] + bias;
coeff = line[x] + (coeff >> s->total_wt_bits);
- frame[x]= av_clip_uint8(coeff + 128);
+ frame[x]= av_clip_uint8(coeff);
}
line += s->plane[comp].padded_width;
More information about the FFmpeg-soc
mailing list