diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-21 16:29:40 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-21 16:29:40 +0000 |
commit | ce611a27be7c9201b5920d8232e68209529065c4 (patch) | |
tree | 7d02fb42432300f1ca74277ab0aa77abab7b9fd8 /libavcodec/snow.h | |
parent | 7506d47aa320beb00369325b2e868f4a84c36af0 (diff) | |
download | ffmpeg-ce611a27be7c9201b5920d8232e68209529065c4.tar.gz |
Change rounding of the horizontal DWT to match the vertical one.
This allows some simplifications and optimizations and should
not have any effect on quality.
Originally committed as revision 10172 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.h')
-rw-r--r-- | libavcodec/snow.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/snow.h b/libavcodec/snow.h index 19df4ad791..9dd66031cb 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -165,11 +165,11 @@ static av_always_inline void snow_horizontal_compose_lift_lead_out(int i, DWTELE static av_always_inline void snow_horizontal_compose_liftS_lead_out(int i, DWTELEM * dst, DWTELEM * src, DWTELEM * ref, int width, int w){ for(; i<w; i++){ - dst[i] = src[i] + ((ref[i] + ref[(i+1)]+W_BO-1 + 4 * src[i]) >> W_BS); + dst[i] = src[i] + ((ref[i] + ref[(i+1)]+W_BO + 4 * src[i]) >> W_BS); } if(width&1){ - dst[w] = src[w] + ((2 * ref[w] + W_BO-1 + 4 * src[w]) >> W_BS); + dst[w] = src[w] + ((2 * ref[w] + W_BO + 4 * src[w]) >> W_BS); } } |