summaryrefslogtreecommitdiff
path: root/src/post/deinterlace/plugins/linearblend.c
diff options
context:
space:
mode:
authorRobin KAY <komadori@users.sourceforge.net>2003-06-15 11:44:57 +0000
committerRobin KAY <komadori@users.sourceforge.net>2003-06-15 11:44:57 +0000
commitbbfef42ce2453aaa92bcc17946494d4b03339180 (patch)
tree1a0f6313f0aa2624d16df5d3faa4cda687e1e485 /src/post/deinterlace/plugins/linearblend.c
parent1119d9c79afc7bdf35527751e791cae941d90428 (diff)
downloadxine-lib-bbfef42ce2453aaa92bcc17946494d4b03339180.tar.gz
xine-lib-bbfef42ce2453aaa92bcc17946494d4b03339180.tar.bz2
Remove linear blend deinterlacer from video_out_pgx64. Add C implementation of linear blend deinterlacer to tvtime post plugin.
CVS patchset: 5047 CVS date: 2003/06/15 11:44:57
Diffstat (limited to 'src/post/deinterlace/plugins/linearblend.c')
-rw-r--r--src/post/deinterlace/plugins/linearblend.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/post/deinterlace/plugins/linearblend.c b/src/post/deinterlace/plugins/linearblend.c
index fa32d1408..06e6d105a 100644
--- a/src/post/deinterlace/plugins/linearblend.c
+++ b/src/post/deinterlace/plugins/linearblend.c
@@ -42,10 +42,10 @@ static void deinterlace_scanline_linear_blend( uint8_t *output,
deinterlace_scanline_data_t *data,
int width )
{
-#ifdef ARCH_X86
uint8_t *t0 = data->t0;
uint8_t *b0 = data->b0;
uint8_t *m1 = data->m1;
+#ifdef ARCH_X86
int i;
// Get width in bytes.
@@ -90,10 +90,15 @@ static void deinterlace_scanline_linear_blend( uint8_t *output,
m1 += 8;
}
while( width-- ) {
- *output++ = (*t0++ + *b0++ + (2 * *m1++))>>2;
+ *output++ = (*t0++ + *b0++ + (*m1++ << 1)) >> 2;
}
sfence();
emms();
+#else
+ width *= 2;
+ while( width-- ) {
+ *output++ = (*t0++ + *b0++ + (*m1++ << 1)) >> 2;
+ }
#endif
}
@@ -101,10 +106,11 @@ static void deinterlace_scanline_linear_blend2( uint8_t *output,
deinterlace_scanline_data_t *data,
int width )
{
-#ifdef ARCH_X86
uint8_t *m0 = data->m0;
uint8_t *t1 = data->t1;
uint8_t *b1 = data->b1;
+
+#ifdef ARCH_X86
int i;
// Get width in bytes.
@@ -149,10 +155,15 @@ static void deinterlace_scanline_linear_blend2( uint8_t *output,
m0 += 8;
}
while( width-- ) {
- *output++ = (*t1++ + *b1++ + (2 * *m0++))>>2;
+ *output++ = (*t1++ + *b1++ + (*m0++ << 1)) >> 2;
}
sfence();
emms();
+#else
+ width *= 2;
+ while( width-- ) {
+ *output++ = (*t1++ + *b1++ + (*m0++ << 1)) >> 2;
+ }
#endif
}
@@ -163,7 +174,11 @@ static deinterlace_method_t linearblendmethod =
"mplayer: Linear Blend",
"LinearBlend",
2,
+#ifdef ARCH_X86
MM_ACCEL_X86_MMX,
+#else
+ 0,
+#endif
0,
0,
0,
@@ -181,4 +196,3 @@ void linearblend_plugin_init( void )
{
register_deinterlace_method( &linearblendmethod );
}
-