diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-21 14:34:58 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-21 14:34:58 +0000 |
commit | d63a32635ff7eac3795ab212903fa9af8d89d90c (patch) | |
tree | 5f39d2da2a31d7a336429b019bf34ba3265d7e96 /src/video_out/yuv2rgb_mmx.c | |
parent | af8905c774ab1398672fe146b54a09b76a22c53c (diff) | |
download | xine-lib-d63a32635ff7eac3795ab212903fa9af8d89d90c.tar.gz xine-lib-d63a32635ff7eac3795ab212903fa9af8d89d90c.tar.bz2 |
Add some optimized scale_line functions for: DVD -> 16:9, DVD -> 4:3, and zoom*2
CVS patchset: 679
CVS date: 2001/09/21 14:34:58
Diffstat (limited to 'src/video_out/yuv2rgb_mmx.c')
-rw-r--r-- | src/video_out/yuv2rgb_mmx.c | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/src/video_out/yuv2rgb_mmx.c b/src/video_out/yuv2rgb_mmx.c index ba5720d5b..adac1929a 100644 --- a/src/video_out/yuv2rgb_mmx.c +++ b/src/video_out/yuv2rgb_mmx.c @@ -354,40 +354,6 @@ static inline void mmx_unpack_24rgb (uint8_t * image, int cpu) movntq (mm4, *(image+16)); } -static void scale_line (uint8_t *source, uint8_t *dest, - int width, int step) { - - int p1; - int p2; - int dx; - - p1 = *source++; - p2 = *source++; - dx = 0; - - while (width) { - - /* - printf ("scale_line, width = %d\n", width); - printf ("scale_line, dx = %d, p1 = %d, p2 = %d\n", dx, p1, p2); - */ - - *dest = (p1 * (32768 - dx) + p2 * dx) / 32768; - - dx += step; - while (dx > 32768) { - dx -= 32768; - p1 = p2; - p2 = *source++; - } - - dest ++; - width --; - } - -} - - static inline void yuv420_rgb16 (yuv2rgb_t *this, uint8_t * image, uint8_t * py, uint8_t * pu, uint8_t * pv, @@ -433,6 +399,7 @@ static inline void yuv420_rgb16 (yuv2rgb_t *this, } else { + scale_line_func_t scale_line = this->scale_line; uint8_t *y_buf, *u_buf, *v_buf; int dy = 0; @@ -540,6 +507,7 @@ static inline void yuv420_rgb15 (yuv2rgb_t *this, } else { + scale_line_func_t scale_line = this->scale_line; uint8_t *y_buf, *u_buf, *v_buf; int dy = 0; @@ -643,6 +611,8 @@ static inline void yuv420_rgb24 (yuv2rgb_t *this, } } while (--height); } else { + + scale_line_func_t scale_line = this->scale_line; uint8_t *y_buf, *u_buf, *v_buf; int dy = 0; @@ -749,6 +719,8 @@ static inline void yuv420_argb32 (yuv2rgb_t *this, } } while (--height); } else { + + scale_line_func_t scale_line = this->scale_line; uint8_t *y_buf, *u_buf, *v_buf; int dy = 0; @@ -855,6 +827,8 @@ static inline void yuv420_abgr32 (yuv2rgb_t *this, } } while (--height); } else { + + scale_line_func_t scale_line = this->scale_line; uint8_t *y_buf, *u_buf, *v_buf; int dy = 0; |