mirror of https://github.com/mpv-player/mpv
C implementation of the median deinterlacer (seems to be the only one
that generates tolerable output for anime) so it will work on non-MMX architectures. Someone should optimize it better eventually. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9071 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
da08b8a076
commit
44e9a6585e
|
@ -34,7 +34,7 @@ Horizontal X1# a E E
|
||||||
LinIpolDeinterlace e E E*
|
LinIpolDeinterlace e E E*
|
||||||
CubicIpolDeinterlace a e e*
|
CubicIpolDeinterlace a e e*
|
||||||
LinBlendDeinterlace e E E*
|
LinBlendDeinterlace e E E*
|
||||||
MedianDeinterlace# Ec Ec
|
MedianDeinterlace# E Ec Ec
|
||||||
TempDeNoiser# E e e
|
TempDeNoiser# E e e
|
||||||
|
|
||||||
* i dont have a 3dnow CPU -> its untested, but noone said it doesnt work so it seems to work
|
* i dont have a 3dnow CPU -> its untested, but noone said it doesnt work so it seems to work
|
||||||
|
|
|
@ -1889,19 +1889,24 @@ MEDIAN((%%edx, %1), (%%edx, %1, 2), (%0, %1, 8))
|
||||||
);
|
);
|
||||||
#endif // MMX
|
#endif // MMX
|
||||||
#else
|
#else
|
||||||
//FIXME
|
int x, y;
|
||||||
int x;
|
|
||||||
src+= 4*stride;
|
src+= 4*stride;
|
||||||
|
// FIXME - there should be a way to do a few columns in parallel like w/mmx
|
||||||
for(x=0; x<8; x++)
|
for(x=0; x<8; x++)
|
||||||
{
|
{
|
||||||
src[0 ] = (src[0 ] + 2*src[stride ] + src[stride*2])>>2;
|
uint8_t *colsrc = src;
|
||||||
src[stride ] = (src[stride ] + 2*src[stride*2] + src[stride*3])>>2;
|
for (y=0; y<4; y++)
|
||||||
src[stride*2] = (src[stride*2] + 2*src[stride*3] + src[stride*4])>>2;
|
{
|
||||||
src[stride*3] = (src[stride*3] + 2*src[stride*4] + src[stride*5])>>2;
|
int a, b, c, d, e, f;
|
||||||
src[stride*4] = (src[stride*4] + 2*src[stride*5] + src[stride*6])>>2;
|
a = colsrc[0 ];
|
||||||
src[stride*5] = (src[stride*5] + 2*src[stride*6] + src[stride*7])>>2;
|
b = colsrc[stride ];
|
||||||
src[stride*6] = (src[stride*6] + 2*src[stride*7] + src[stride*8])>>2;
|
c = colsrc[stride*2];
|
||||||
src[stride*7] = (src[stride*7] + 2*src[stride*8] + src[stride*9])>>2;
|
d = (a-b)>>31;
|
||||||
|
e = (b-c)>>31;
|
||||||
|
f = (c-a)>>31;
|
||||||
|
colsrc[stride ] = (a|(d^f)) & (b|(d^e)) & (c|(e^f));
|
||||||
|
colsrc += stride*2;
|
||||||
|
}
|
||||||
src++;
|
src++;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue