diff options
Diffstat (limited to 'src/video_out/yuv2rgb.c')
-rw-r--r-- | src/video_out/yuv2rgb.c | 260 |
1 files changed, 130 insertions, 130 deletions
diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index 694a966f8..7aea37be7 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -116,15 +116,15 @@ static void yuv2rgb_dispose (yuv2rgb_t *this) free (this); } -static int yuv2rgb_configure (yuv2rgb_t *this, +static int yuv2rgb_configure (yuv2rgb_t *this, int source_width, int source_height, int y_stride, int uv_stride, int dest_width, int dest_height, int rgb_stride) { -/* +/* printf ("yuv2rgb setup (%d x %d => %d x %d)\n", source_width, source_height, dest_width, dest_height); -*/ +*/ if (prof_scale_line == -1) prof_scale_line = xine_profiler_allocate_slot("xshm scale line"); @@ -167,7 +167,7 @@ static int yuv2rgb_configure (yuv2rgb_t *this, /* printf("yuv2rgb config: src_ht=%i, dst_ht=%i\n",source_height, dest_height); printf("yuv2rgb config: step_dy=%i %f\n",this->step_dy, (float)this->step_dy / 32768.0); -*/ +*/ this->scale_line = find_scale_line_func(this->step_dx); if ((source_width == dest_width) && (source_height == dest_height)) { @@ -189,7 +189,7 @@ static int yuv2rgb_configure (yuv2rgb_t *this, } else { this->do_scale = 1; - + /* * space for two y-lines (for yuv2rgb_mlib) * u,v subsampled 2:1 @@ -215,7 +215,7 @@ static int yuv2rgb_configure (yuv2rgb_t *this, if (!this->mlib_resize_buffer) return 0; } -#endif +#endif } return 1; } @@ -263,7 +263,7 @@ static void scale_line_gen (uint8_t *source, uint8_t *dest, p1 = p2; p2 = *source++; } - + dest ++; width --; } @@ -281,7 +281,7 @@ static void scale_line_gen (uint8_t *source, uint8_t *dest, p1 = p2; p2 = *source++; } - + dest ++; width --; } @@ -1248,7 +1248,7 @@ static void scale_line_1_2 (uint8_t *source, uint8_t *dest, xine_profiler_stop_count(prof_scale_line); } - + /* * Scale line with no horizontal scaling. For NTSC mpeg2 dvd input in * 4:3 output format (720x480 -> 720x540) @@ -1261,7 +1261,7 @@ static void scale_line_1_1 (uint8_t *source, uint8_t *dest, xine_profiler_stop_count(prof_scale_line); } - + static scale_line_func_t find_scale_line_func(int step) { static struct { int src_step; @@ -1406,7 +1406,7 @@ static void scale_line_4 (uint8_t *source, uint8_t *dest, dst_2[6*i+3] = b[Y]; dst_2[6*i+4] = g[Y]; dst_2[6*i+5] = r[Y]; #define DST1CMAP(i) \ - Y = py_1[2*i]; \ + Y = py_1[2*i]; \ dst_1[2*i] = this->cmap[r[Y] + g[Y] + b[Y]]; \ Y = py_1[2*i+1]; \ dst_1[2*i+1] = this->cmap[r[Y] + g[Y] + b[Y]]; @@ -1434,7 +1434,7 @@ static void yuv2rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); dy = 0; @@ -1454,7 +1454,7 @@ static void yuv2rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, X_RGB(1); DST1(1); - + X_RGB(2); DST1(2); @@ -1472,7 +1472,7 @@ static void yuv2rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, while (--dst_height > 0 && dy < 32768) { - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*4); + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*4); dy += this->step_dy; _dst += this->rgb_stride; @@ -1485,18 +1485,18 @@ static void yuv2rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, dy -= 32768; _py += this->y_stride; - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); if (height & 1) { _pu += this->uv_stride; _pv += this->uv_stride; - + scale_line (_pu, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - + } height++; } while( dy>=32768); @@ -1528,7 +1528,7 @@ static void yuv2rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, X_RGB(3); DST2(3); DST1(3); - + pu += 4; pv += 4; py_1 += 8; @@ -1537,7 +1537,7 @@ static void yuv2rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, dst_2 += 8; } while (--width); - _dst += 2 * this->rgb_stride; + _dst += 2 * this->rgb_stride; _py += 2 * this->y_stride; _pu += this->uv_stride; _pv += this->uv_stride; @@ -1565,7 +1565,7 @@ static void yuv2rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); dy = 0; @@ -1585,7 +1585,7 @@ static void yuv2rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, X_RGB(1); DST1RGB(1); - + X_RGB(2); DST1RGB(2); @@ -1603,7 +1603,7 @@ static void yuv2rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, while (--dst_height > 0 && dy < 32768) { - xine_fast_memcpy (_dst, _dst-this->rgb_stride, this->dest_width*3); + xine_fast_memcpy (_dst, _dst-this->rgb_stride, this->dest_width*3); dy += this->step_dy; _dst += this->rgb_stride; @@ -1616,18 +1616,18 @@ static void yuv2rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, dy -= 32768; _py += this->y_stride; - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); if (height & 1) { _pu += this->uv_stride; _pv += this->uv_stride; - + scale_line (_pu, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - + } height++; } while (dy>=32768); @@ -1668,11 +1668,11 @@ static void yuv2rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, dst_2 += 24; } while (--width); - _dst += 2 * this->rgb_stride; + _dst += 2 * this->rgb_stride; _py += 2 * this->y_stride; _pu += this->uv_stride; _pv += this->uv_stride; - + } while (--height); } } @@ -1696,7 +1696,7 @@ static void yuv2rgb_c_24_bgr (yuv2rgb_t *this, uint8_t * _dst, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); dy = 0; @@ -1716,7 +1716,7 @@ static void yuv2rgb_c_24_bgr (yuv2rgb_t *this, uint8_t * _dst, X_RGB(1); DST1BGR(1); - + X_RGB(2); DST1BGR(2); @@ -1747,18 +1747,18 @@ static void yuv2rgb_c_24_bgr (yuv2rgb_t *this, uint8_t * _dst, dy -= 32768; _py += this->y_stride; - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); if (height & 1) { _pu += this->uv_stride; _pv += this->uv_stride; - + scale_line (_pu, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - + } height++; } while( dy>=32768 ); @@ -1799,7 +1799,7 @@ static void yuv2rgb_c_24_bgr (yuv2rgb_t *this, uint8_t * _dst, dst_2 += 24; } while (--width); - _dst += 2 * this->rgb_stride; + _dst += 2 * this->rgb_stride; _py += 2 * this->y_stride; _pu += this->uv_stride; _pv += this->uv_stride; @@ -1827,7 +1827,7 @@ static void yuv2rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); dy = 0; @@ -1847,7 +1847,7 @@ static void yuv2rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, X_RGB(1); DST1(1); - + X_RGB(2); DST1(2); @@ -1865,7 +1865,7 @@ static void yuv2rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, while (--dst_height > 0 && dy < 32768) { - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*2); + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*2); dy += this->step_dy; _dst += this->rgb_stride; @@ -1878,18 +1878,18 @@ static void yuv2rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, dy -= 32768; _py += this->y_stride; - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); if (height & 1) { _pu += this->uv_stride; _pv += this->uv_stride; - + scale_line (_pu, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - + } height++; } while( dy>=32768); @@ -1929,7 +1929,7 @@ static void yuv2rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, dst_2 += 8; } while (--width); - _dst += 2 * this->rgb_stride; + _dst += 2 * this->rgb_stride; _py += 2 * this->y_stride; _pu += this->uv_stride; _pv += this->uv_stride; @@ -1957,7 +1957,7 @@ static void yuv2rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); dy = 0; @@ -1977,7 +1977,7 @@ static void yuv2rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, X_RGB(1); DST1(1); - + X_RGB(2); DST1(2); @@ -1995,7 +1995,7 @@ static void yuv2rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, while (--dst_height > 0 && dy < 32768) { - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); dy += this->step_dy; _dst += this->rgb_stride; @@ -2008,18 +2008,18 @@ static void yuv2rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, dy -= 32768; _py += this->y_stride; - scale_line (_py, this->y_buffer, + scale_line (_py, this->y_buffer, this->dest_width, this->step_dx); if (height & 1) { _pu += this->uv_stride; _pv += this->uv_stride; - + scale_line (_pu, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - + } height++; } while( dy>=32768 ); @@ -2051,7 +2051,7 @@ static void yuv2rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, X_RGB(3); DST2(3); DST1(3); - + pu += 4; pv += 4; py_1 += 8; @@ -2060,7 +2060,7 @@ static void yuv2rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, dst_2 += 8; } while (--width); - _dst += 2 * this->rgb_stride; + _dst += 2 * this->rgb_stride; _py += 2 * this->y_stride; _pu += this->uv_stride; _pv += this->uv_stride; @@ -2090,7 +2090,7 @@ static void yuv2rgb_c_gray (yuv2rgb_t *this, uint8_t * _dst, while (--dst_height > 0 && dy < 32768) { - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); dy += this->step_dy; _dst += this->rgb_stride; @@ -2101,7 +2101,7 @@ static void yuv2rgb_c_gray (yuv2rgb_t *this, uint8_t * _dst, _py += this->y_stride*(dy>>15); dy &= 32767; - /* dy -= 32768; + /* dy -= 32768; _py += this->y_stride; */ } @@ -2152,7 +2152,7 @@ static void yuv2rgb_c_palette (yuv2rgb_t *this, uint8_t * _dst, X_RGB(1); DST1CMAP(1); - + X_RGB(2); DST1CMAP(2); @@ -2170,7 +2170,7 @@ static void yuv2rgb_c_palette (yuv2rgb_t *this, uint8_t * _dst, while (--dst_height > 0 && dy < 32768) { - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); dy += this->step_dy; _dst += this->rgb_stride; @@ -2189,12 +2189,12 @@ static void yuv2rgb_c_palette (yuv2rgb_t *this, uint8_t * _dst, if (height & 1) { _pu += this->uv_stride; _pv += this->uv_stride; - + scale_line (_pu, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line (_pv, this->v_buffer, this->dest_width >> 1, this->step_dx); - + } height++; } while( dy>=32768 ); @@ -2234,7 +2234,7 @@ static void yuv2rgb_c_palette (yuv2rgb_t *this, uint8_t * _dst, dst_2 += 8; } while (--width); - _dst += 2 * this->rgb_stride; + _dst += 2 * this->rgb_stride; _py += 2 * this->y_stride; _pu += this->uv_stride; _pv += this->uv_stride; @@ -2430,7 +2430,7 @@ static void yuv2rgb_set_csc_levels (yuv2rgb_factory_t *this, lprintf ("mode %d not supported by yuv2rgb\n", mode); _x_abort(); } - + for (i = 0; i < 256; i++) { this->table_rV[i] = (((uint8_t *) table_r) + entry_size * div_round (crv * (i-128), 76309)); @@ -2443,7 +2443,7 @@ static void yuv2rgb_set_csc_levels (yuv2rgb_factory_t *this, #if defined(ARCH_X86) || defined(ARCH_X86_64) mmx_yuv2rgb_set_csc_levels (this, brightness, contrast, saturation); -#endif +#endif } static uint32_t yuv2rgb_single_pixel_32 (yuv2rgb_t *this, uint8_t y, uint8_t u, uint8_t v) @@ -2629,10 +2629,10 @@ static void yuy22rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) this->dest_width >> 1, this->step_dx); scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); - + dy = 0; height = this->next_slice (this, &_dst); - + for (;;) { dst_1 = (uint32_t*)_dst; py_1 = this->y_buffer; @@ -2648,10 +2648,10 @@ static void yuy22rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) X_RGB(1); DST1(1); - + X_RGB(2); DST1(2); - + X_RGB(3); DST1(3); @@ -2660,18 +2660,18 @@ static void yuy22rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) py_1 += 8; dst_1 += 8; } while (--width); - + dy += this->step_dy; _dst += this->rgb_stride; - + while (--height > 0 && dy < 32768) { - + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*4); - + dy += this->step_dy; _dst += this->rgb_stride; } - + if (height <= 0) break; @@ -2681,12 +2681,12 @@ static void yuy22rgb_c_32 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) dy -= 32768; _p += this->y_stride*2; */ - + scale_line_4 (_p+1, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line_2 (_p, this->y_buffer, + scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); } } @@ -2706,30 +2706,30 @@ static void yuy22rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line_2 (_p, this->y_buffer, + scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); dy = 0; height = this->next_slice (this, &_dst); - + for (;;) { dst_1 = _dst; py_1 = this->y_buffer; pu = this->u_buffer; pv = this->v_buffer; - + width = this->dest_width >> 3; - + do { X_RGB(0); DST1RGB(0); - + X_RGB(1); DST1RGB(1); - + X_RGB(2); DST1RGB(2); - + X_RGB(3); DST1RGB(3); @@ -2741,15 +2741,15 @@ static void yuy22rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) dy += this->step_dy; _dst += this->rgb_stride; - + while (--height > 0 && dy < 32768) { xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*3); - + dy += this->step_dy; _dst += this->rgb_stride; } - + if (height <= 0) break; @@ -2759,7 +2759,7 @@ static void yuy22rgb_c_24_rgb (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) dy -= 32768; _p += this->y_stride*2; */ - + scale_line_4 (_p+1, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, @@ -2784,50 +2784,50 @@ static void yuy22rgb_c_24_bgr (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line_2 (_p, this->y_buffer, + scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); dy = 0; height = this->next_slice (this, &_dst); - + for (;;) { dst_1 = _dst; py_1 = this->y_buffer; pu = this->u_buffer; pv = this->v_buffer; - + width = this->dest_width >> 3; - + do { X_RGB(0); DST1BGR(0); - + X_RGB(1); DST1BGR(1); - + X_RGB(2); DST1BGR(2); X_RGB(3); DST1BGR(3); - + pu += 4; pv += 4; py_1 += 8; dst_1 += 24; } while (--width); - + dy += this->step_dy; _dst += this->rgb_stride; - + while (--height > 0 && dy < 32768) { xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*3); - + dy += this->step_dy; _dst += this->rgb_stride; } - + if (height <= 0) break; @@ -2858,9 +2858,9 @@ static void yuy22rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line_2 (_p, this->y_buffer, + scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); - + dy = 0; height = this->next_slice (this, &_dst); @@ -2869,19 +2869,19 @@ static void yuy22rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) py_1 = this->y_buffer; pu = this->u_buffer; pv = this->v_buffer; - + width = this->dest_width >> 3; - + do { X_RGB(0); DST1(0); X_RGB(1); DST1(1); - + X_RGB(2); DST1(2); - + X_RGB(3); DST1(3); @@ -2890,24 +2890,24 @@ static void yuy22rgb_c_16 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) py_1 += 8; dst_1 += 8; } while (--width); - + dy += this->step_dy; _dst += this->rgb_stride; while (--height > 0 && dy < 32768) { - - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*2); + + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width*2); dy += this->step_dy; _dst += this->rgb_stride; } - + if (height <= 0) break; _p += this->y_stride*(dy>>15); dy &= 32767; - + scale_line_4 (_p+1, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, @@ -2934,28 +2934,28 @@ static void yuy22rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) this->dest_width >> 1, this->step_dx); scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); - + dy = 0; height = this->next_slice (this, &_dst); - + for (;;) { dst_1 = _dst; py_1 = this->y_buffer; pu = this->u_buffer; pv = this->v_buffer; - + width = this->dest_width >> 3; - + do { X_RGB(0); DST1(0); - + X_RGB(1); DST1(1); X_RGB(2); DST1(2); - + X_RGB(3); DST1(3); @@ -2964,29 +2964,29 @@ static void yuy22rgb_c_8 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) py_1 += 8; dst_1 += 8; } while (--width); - + dy += this->step_dy; _dst += this->rgb_stride; - + while (--height > 0 && dy < 32768) { - - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); - + + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); + dy += this->step_dy; _dst += this->rgb_stride; } - + if (height <= 0) break; _p += this->y_stride*(dy>>15); dy &= 32767; - + scale_line_4 (_p+1, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, this->dest_width >> 1, this->step_dx); - scale_line_2 (_p, this->y_buffer, + scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); } } @@ -3001,21 +3001,21 @@ static void yuy22rgb_c_gray (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) if (this->do_scale) { dy = 0; height = this->next_slice (this, &_dst); - + for (;;) { scale_line_2 (_p, _dst, this->dest_width, this->step_dx); - + dy += this->step_dy; _dst += this->rgb_stride; - + while (--height > 0 && dy < 32768) { - - xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); - + + xine_fast_memcpy (_dst, (uint8_t*)_dst-this->rgb_stride, this->dest_width); + dy += this->step_dy; _dst += this->rgb_stride; } - + if (height <= 0) break; @@ -3023,7 +3023,7 @@ static void yuy22rgb_c_gray (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) dy &= 32767; } } else { - for (height = this->next_slice (this, &_dst); --height >= 0; ) { + for (height = this->next_slice (this, &_dst); --height >= 0; ) { dst = _dst; y = _p; for (width = this->source_width; --width >= 0; ) { @@ -3044,25 +3044,25 @@ static void yuy22rgb_c_palette (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _p) uint8_t * dst_1; int width, height; int dy; - + scale_line_4 (_p+1, this->u_buffer, this->dest_width >> 1, this->step_dx); scale_line_4 (_p+3, this->v_buffer, this->dest_width >> 1, this->step_dx); scale_line_2 (_p, this->y_buffer, this->dest_width, this->step_dx); - + dy = 0; height = this->next_slice (this, &_dst); - + for (;;) { dst_1 = _dst; py_1 = this->y_buffer; pu = this->u_buffer; pv = this->v_buffer; - + width = this->dest_width >> 3; - + do { X_RGB(0); DST1CMAP(0); @@ -3182,7 +3182,7 @@ static yuv2rgb_t *yuv2rgb_create_converter (yuv2rgb_factory_t *factory) { } /* - * factory functions + * factory functions */ static void yuv2rgb_factory_dispose (yuv2rgb_factory_t *this) { @@ -3192,7 +3192,7 @@ static void yuv2rgb_factory_dispose (yuv2rgb_factory_t *this) { free (this); } -yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, +yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, uint8_t *cmap) { yuv2rgb_factory_t *this; |