summaryrefslogtreecommitdiffstats
path: root/libswscale/rgb2rgb_template.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-21 23:52:34 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-21 23:52:34 +0000
commit5c31b702639ad160336f748f269b3440911df2be (patch)
tree9d848a75ab840e89e08cafe5d6cbccbbb17879a9 /libswscale/rgb2rgb_template.c
parent855ea7b7b7db25543384efd7e3a757bebac5ac99 (diff)
downloadmpv-5c31b702639ad160336f748f269b3440911df2be.tar.bz2
mpv-5c31b702639ad160336f748f269b3440911df2be.tar.xz
10l (C code was buggy and untested)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29030 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale/rgb2rgb_template.c')
-rw-r--r--libswscale/rgb2rgb_template.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index 0b3b2aa8da..09a57cab81 100644
--- a/libswscale/rgb2rgb_template.c
+++ b/libswscale/rgb2rgb_template.c
@@ -2825,8 +2825,8 @@ static void RENAME(extract_even2avg)(const uint8_t *src0, const uint8_t *src1, u
}
#endif
while(count<0){
- dst0[count]= src0[4*count+0]+src1[4*count+0];
- dst1[count]= src0[4*count+2]+src1[4*count+2];
+ dst0[count]= (src0[4*count+0]+src1[4*count+0])>>1;
+ dst1[count]= (src0[4*count+2]+src1[4*count+2])>>1;
count++;
}
}
@@ -2872,6 +2872,7 @@ static void RENAME(extract_odd2)(const uint8_t *src, uint8_t *dst0, uint8_t *dst
count -= 7;
}
#endif
+ src++;
while(count<0){
dst0[count]= src[4*count+0];
dst1[count]= src[4*count+2];
@@ -2925,9 +2926,11 @@ static void RENAME(extract_odd2avg)(const uint8_t *src0, const uint8_t *src1, ui
count -= 7;
}
#endif
+ src0++;
+ src1++;
while(count<0){
- dst0[count]= src0[4*count+0]+src1[4*count+0];
- dst1[count]= src0[4*count+2]+src1[4*count+2];
+ dst0[count]= (src0[4*count+0]+src1[4*count+0])>>1;
+ dst1[count]= (src0[4*count+2]+src1[4*count+2])>>1;
count++;
}
}