aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vc1dsp.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-11-26 04:57:31 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-11-26 04:57:31 +0000
commit61f5b14a8e2b4f64acb6296ac64c2309e13d3ae9 (patch)
treeb923832e6250f7ca90a503a210efdcfd6586910d /libavcodec/vc1dsp.c
parent5081f3aad5a734df9090a6156336443b6bd2e67a (diff)
downloadffmpeg-61f5b14a8e2b4f64acb6296ac64c2309e13d3ae9.tar.gz
Correct rounding values in overlap filtering
Originally committed as revision 7171 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vc1dsp.c')
-rw-r--r--libavcodec/vc1dsp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c
index 518a690d3a..9139ffb284 100644
--- a/libavcodec/vc1dsp.c
+++ b/libavcodec/vc1dsp.c
@@ -31,11 +31,12 @@
/** Apply overlap transform to horizontal edge
*/
-static void vc1_v_overlap_c(uint8_t* src, int stride, int rnd)
+static void vc1_v_overlap_c(uint8_t* src, int stride)
{
int i;
int a, b, c, d;
int d1, d2;
+ int rnd = 1;
for(i = 0; i < 8; i++) {
a = src[-2*stride];
b = src[-stride];
@@ -49,16 +50,18 @@ static void vc1_v_overlap_c(uint8_t* src, int stride, int rnd)
src[0] = c + d2;
src[stride] = d + d1;
src++;
+ rnd = !rnd;
}
}
/** Apply overlap transform to vertical edge
*/
-static void vc1_h_overlap_c(uint8_t* src, int stride, int rnd)
+static void vc1_h_overlap_c(uint8_t* src, int stride)
{
int i;
int a, b, c, d;
int d1, d2;
+ int rnd = 1;
for(i = 0; i < 8; i++) {
a = src[-2];
b = src[-1];
@@ -72,6 +75,7 @@ static void vc1_h_overlap_c(uint8_t* src, int stride, int rnd)
src[0] = c + d2;
src[1] = d + d1;
src += stride;
+ rnd = !rnd;
}
}