From f4ec3960db773aabade17100445c0dfd25d0173d Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Mon, 25 Jun 2001 15:50:14 +0000 Subject: Unscaled MMX accelerated yuv2rgb was broken, used wrong value for {yuv}_stride CVS patchset: 233 CVS date: 2001/06/25 15:50:14 --- src/video_out/yuv2rgb_mmx.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/video_out/yuv2rgb_mmx.c b/src/video_out/yuv2rgb_mmx.c index 5277dd472..2a164528c 100644 --- a/src/video_out/yuv2rgb_mmx.c +++ b/src/video_out/yuv2rgb_mmx.c @@ -28,6 +28,7 @@ #include #include +#include #include #include "attributes.h" @@ -334,7 +335,7 @@ static void scale_line (uint8_t *source, uint8_t *dest, printf ("scale_line, dx = %d, p1 = %d, p2 = %d\n", dx, p1, p2); */ - *dest = (p1 * (32768 - dx) + p2 * dx) / 32768; + *dest = (p1 * (32768 - dx) + p2 * dx) / 32768; dx += step; while (dx > 32768) { @@ -366,8 +367,8 @@ static inline void yuv420_rgb16 (yuv2rgb_t *this, width >>= 3; if (!this->do_scale) { - y_stride -= width; - uv_stride -= width >> 1; + y_stride -= 8 * width; + uv_stride -= 4 * width; do { @@ -472,8 +473,8 @@ static inline void yuv420_rgb15 (yuv2rgb_t *this, width >>= 3; if (!this->do_scale) { - y_stride -= width; - uv_stride -= width >> 1; + y_stride -= 8 * width; + uv_stride -= 4 * width; do { @@ -577,8 +578,8 @@ static inline void yuv420_rgb24 (yuv2rgb_t *this, width >>= 3; if (!this->do_scale) { - y_stride -= width; - uv_stride -= width >> 1; + y_stride -= 8 * width; + uv_stride -= 4 * width; do { i = width; img = image; @@ -682,8 +683,8 @@ static inline void yuv420_argb32 (yuv2rgb_t *this, width >>= 3; if (!this->do_scale) { - y_stride -= width; - uv_stride -= width >> 1; + y_stride -= 8 * width; + uv_stride -= 4 * width; do { i = width; img = image; -- cgit v1.2.3