#include "intf_msg.h"
#include "main.h"
+#define RGB_MIN -24
+#define RGB_MAX 283
+
/******************************************************************************
* vout_sys_t: video output framebuffer method descriptor
******************************************************************************
/* Video memory */
byte_t * p_video; /* base adress */
size_t i_page_size; /* page size */
+
+ struct fb_cmap fb_cmap; /* original colormap */
+ unsigned short *fb_palette; /* original palette */
+
} vout_sys_t;
/******************************************************************************
******************************************************************************/
static int FBOpenDisplay ( vout_thread_t *p_vout );
static void FBCloseDisplay ( vout_thread_t *p_vout );
+static void FBInitBWPalette ( vout_thread_t *p_vout );
+static void FBInitRGBPalette( vout_thread_t *p_vout );
/******************************************************************************
* vout_SysCreate: allocates FB video thread output method
{
char *psz_device; /* framebuffer device path */
struct fb_fix_screeninfo fix_info; /* framebuffer fix information */
-
+ /* framebuffer palette information */
/* Open framebuffer device */
psz_device = main_GetPszVariable( VOUT_FB_DEV_VAR, VOUT_FB_DEV_DEFAULT );
p_vout->p_sys->i_fb_dev = open( psz_device, O_RDWR);
switch( p_vout->i_screen_depth )
{
case 8: /* 8 bpp */
+ p_vout->p_sys->fb_palette = malloc( 8 * 256 * sizeof(unsigned short) );
+ p_vout->p_sys->fb_cmap.start = 0;
+ p_vout->p_sys->fb_cmap.len = 256;
+ p_vout->p_sys->fb_cmap.red = p_vout->p_sys->fb_palette;
+ p_vout->p_sys->fb_cmap.green = p_vout->p_sys->fb_palette + 256 * sizeof(unsigned short);
+ p_vout->p_sys->fb_cmap.blue = p_vout->p_sys->fb_palette + 2 * 256 * sizeof(unsigned short);
+ p_vout->p_sys->fb_cmap.transp = p_vout->p_sys->fb_palette + 3 * 256 * sizeof(unsigned short);
+
+ ioctl( p_vout->p_sys->i_fb_dev, FBIOGETCMAP, &p_vout->p_sys->fb_cmap );
+
+ /* initializes black & white palette */
+ //FBInitBWPalette( p_vout );
+ FBInitRGBPalette( p_vout );
+
p_vout->i_bytes_per_pixel = 1;
p_vout->i_bytes_per_line = p_vout->i_width;
break;
******************************************************************************/
static void FBCloseDisplay( vout_thread_t *p_vout )
{
+ /* Restore palette */
+ if( p_vout->i_screen_depth == 8 );
+ {
+ ioctl( p_vout->p_sys->i_fb_dev, FBIOPUTCMAP, &p_vout->p_sys->fb_cmap );
+ free( p_vout->p_sys->fb_palette );
+ }
+
// Destroy window and close display
close( p_vout->p_sys->i_fb_dev );
}
+/*****************************************************************************
+ * FBInitRGBPalette: initialize color palette for 8 bpp
+ *****************************************************************************/
+static void FBInitRGBPalette( vout_thread_t *p_vout )
+{
+ int y,u,v;
+ float r,g,b;
+ unsigned int counter = 0;
+ unsigned int allocated = 0;
+ unsigned int lastallocated = 0;
+ unsigned short red[256], green[256], blue[256], transp[256];
+ struct fb_cmap cmap = { 0, 256, red, green, blue, transp };
+
+ for ( y = 0; y <= 256; y += 16 )
+ for ( u = -256; u <= 256; u += 64 )
+ for ( v = -256; v <= 256; v += 64 )
+ {
+ r = (0.99 * y + 1.0 * u - 0.01 * v);
+ g = (1.005085 * y - 0.508475 * u - 0.181356 * v);
+ b = (1.0 * y + 1.0 * v);
+
+ if( r > RGB_MIN && g > RGB_MIN && b > RGB_MIN
+ && r < RGB_MAX && g < RGB_MAX && b < RGB_MAX )
+ {
+ if(allocated == 256) { fprintf(stderr, "sorry, no colors left\n"); exit(1); }
+ if(r<0) r=0;
+ if(g<0) g=0;
+ if(b<0) b=0;
+ if(r>255) r=255;
+ if(g>255) g=255;
+ if(b>255) b=255;
+
+ red[allocated] = (int)r << 8;
+ green[allocated] = (int)g << 8;
+ blue[allocated] = (int)b << 8;
+ transp[allocated] = 0;
+
+ u += 256;
+ v += 256;
+ //printf("%x (%i:%i:%i) %i %i %i\n", (y>>4)*81 + (u>>6)*9 + (v>>6), y>>4, u>>6, v>>6, (int)r, (int)g, (int)b);
+ //printf("%i %i\n", counter, (y>>4)*81 + (u>>6)*9 + (v>>6) );
+
+ u -= 256;
+ v -= 256;
+ /* allocate color */
+ p_vout->lookup[counter] = allocated;
+ allocated++;
+ /* set last allocated index */
+ lastallocated = allocated - 1;
+ }
+ else p_vout->lookup[counter] = lastallocated;
+
+ counter++;
+ }
+
+ ioctl( p_vout->p_sys->i_fb_dev, FBIOPUTCMAP, &cmap );
+}
+
+/*****************************************************************************
+ * FBInitBWPalette: initialize grayscale palette for 8 bpp
+ *****************************************************************************/
+static void FBInitBWPalette( vout_thread_t *p_vout )
+{
+ unsigned int i;
+ unsigned short gamma[256], transp[256];
+ struct fb_cmap cmap = { 0, 256, gamma, gamma, gamma, transp };
+
+ for( i=0; i<256; i++ )
+ {
+ gamma[i] = i << 8;
+ transp[i] = 0;
+ }
+
+ ioctl( p_vout->p_sys->i_fb_dev, FBIOPUTCMAP, &cmap );
+}
{117579, 136230, 16907, 35559} /* SMPTE 240M (1987) */
};
-/* Margins and offsets in convertion tables - Margins are used in case a RGB
- * RGB convertion would give a value outside the 0-255 range. Offsets have been
- * calculated to avoid using the same cache line for 2 tables. Convertion tables
+/* Margins and offsets in conversion tables - Margins are used in case a RGB
+ * RGB conversion would give a value outside the 0-255 range. Offsets have been
+ * calculated to avoid using the same cache line for 2 tables. conversion tables
* are 2*MARGIN + 256 long and stores pixels.*/
#define RED_MARGIN 178
#define GREEN_MARGIN 135
int i_matrix_coefficients );
/*****************************************************************************
- * CONVERT_YUV_PIXEL, CONVERT_Y_PIXEL: pixel convertion blocks
+ * CONVERT_YUV_PIXEL, CONVERT_Y_PIXEL: pixel conversion blocks
*****************************************************************************
- * These convertion routines are used by YUV convertion functions.
- * Convertion are made from p_y, p_u, p_v, which are modified, to p_buffer,
+ * These conversion routines are used by YUV conversion functions.
+ * conversion are made from p_y, p_u, p_v, which are modified, to p_buffer,
* which is also modified.
*****************************************************************************/
#define CONVERT_Y_PIXEL( BPP ) \
#define SCALE_WIDTH \
if( b_horizontal_scaling ) \
{ \
- /* Horizontal scaling, convertion has been done to buffer. \
+ /* Horizontal scaling, conversion has been done to buffer. \
* Rewind buffer and offset, then copy and scale line */ \
p_buffer = p_buffer_start; \
p_offset = p_offset_start; \
} \
else \
{ \
- /* No scaling, convertion has been done directly in picture memory. \
+ /* No scaling, conversion has been done directly in picture memory. \
* Increment of picture pointer to end of line is still needed */ \
p_pic += i_pic_width + i_pic_line_width; \
} \
* SCALE_HEIGHT: handle vertical scaling
*****************************************************************************
* This macro handle vertical scaling for a picture. CHROMA may be 420, 422 or
- * 444 for RGB convertion, or 400 for gray convertion. It works for 1, 2, 3
+ * 444 for RGB conversion, or 400 for gray convertion. It works for 1, 2, 3
* and 4 Bpp.
*****************************************************************************/
#define SCALE_HEIGHT( CHROMA, BPP ) \
return( 1 );
}
- /* Allocate memory for convertion buffer and offset array */
+ /* Allocate memory for conversion buffer and offset array */
p_vout->yuv.p_buffer = malloc( VOUT_MAX_WIDTH * p_vout->i_bytes_per_pixel );
if( p_vout->yuv.p_buffer == NULL )
{
}
/*****************************************************************************
- * SetOffset: build offset array for convertion functions
+ * SetOffset: build offset array for conversion functions
*****************************************************************************
- * This function will build an offset array used in later convertion functions.
+ * This function will build an offset array used in later conversion functions.
* It will also set horizontal and vertical scaling indicators.
*****************************************************************************/
static void SetOffset( int i_width, int i_height, int i_pic_width, int i_pic_height,
}
else
{
- /* No horizontal scaling: YUV convertion is done directly to picture */
+ /* No horizontal scaling: YUV conversion is done directly to picture */
*pb_h_scaling = 0;
}
int i_x, i_y; /* horizontal and vertical indexes */
int i_scale_count; /* scale modulo counter */
int i_chroma_width; /* chroma width, not used */
- u8 * p_gray; /* base convertion table */
+ u8 * p_gray; /* base conversion table */
u8 * p_pic_start; /* beginning of the current line for copy */
- u8 * p_buffer_start; /* convertion buffer start */
- u8 * p_buffer; /* convertion buffer pointer */
+ u8 * p_buffer_start; /* conversion buffer start */
+ u8 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
/* Mark beginnning of line for possible later line copy, and initialize
* buffer */
p_pic_start = p_pic;
- p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
+ p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
- *p_buffer++ = p_gray[ *p_y++ ];
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
+ *p_buffer++ = *p_y++;
}
/* Do horizontal and vertical scaling */
int i_x, i_y; /* horizontal and vertical indexes */
int i_scale_count; /* scale modulo counter */
int i_chroma_width; /* chroma width, not used */
- u16 * p_gray; /* base convertion table */
+ u16 * p_gray; /* base conversion table */
u16 * p_pic_start; /* beginning of the current line for copy */
- u16 * p_buffer_start; /* convertion buffer start */
- u16 * p_buffer; /* convertion buffer pointer */
+ u16 * p_buffer_start; /* conversion buffer start */
+ u16 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_x, i_y; /* horizontal and vertical indexes */
int i_scale_count; /* scale modulo counter */
int i_chroma_width; /* chroma width, not used */
- u32 * p_gray; /* base convertion table */
+ u32 * p_gray; /* base conversion table */
u32 * p_pic_start; /* beginning of the current line for copy */
- u32 * p_buffer_start; /* convertion buffer start */
- u32 * p_buffer; /* convertion buffer pointer */
+ u32 * p_buffer_start; /* conversion buffer start */
+ u32 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width */
- u8 * p_yuv; /* base convertion table */
- u8 * p_ybase; /* Y dependant convertion table */
+ u8 * p_yuv; /* base conversion table */
+ u8 * p_ybase; /* Y dependant conversion table */
u8 * p_pic_start; /* beginning of the current line for copy */
- u8 * p_buffer_start; /* convertion buffer start */
- u8 * p_buffer; /* convertion buffer pointer */
+ u8 * p_buffer_start; /* conversion buffer start */
+ u8 * p_buffer; /* conversion buffer pointer */
+ u8 * p_foo; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
- CONVERT_YUV_PIXEL(1); CONVERT_Y_PIXEL(1);
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u) >> 5) * 9 + ((*p_v) >> 5) ];
+ *p_buffer++ = p_vout->lookup[ ((*p_y++ - 8) >> 4) * 81 + ((*p_u++) >> 5) * 9 + ((*p_v++) >> 5) ];
}
/* Do horizontal and vertical scaling */
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width */
- u8 * p_yuv; /* base convertion table */
- u8 * p_ybase; /* Y dependant convertion table */
+ u8 * p_yuv; /* base conversion table */
+ u8 * p_ybase; /* Y dependant conversion table */
u8 * p_pic_start; /* beginning of the current line for copy */
- u8 * p_buffer_start; /* convertion buffer start */
- u8 * p_buffer; /* convertion buffer pointer */
+ u8 * p_buffer_start; /* conversion buffer start */
+ u8 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width, not used */
- u8 * p_yuv; /* base convertion table */
- u8 * p_ybase; /* Y dependant convertion table */
+ u8 * p_yuv; /* base conversion table */
+ u8 * p_ybase; /* Y dependant conversion table */
u8 * p_pic_start; /* beginning of the current line for copy */
- u8 * p_buffer_start; /* convertion buffer start */
- u8 * p_buffer; /* convertion buffer pointer */
+ u8 * p_buffer_start; /* conversion buffer start */
+ u8 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width */
- u16 * p_yuv; /* base convertion table */
- u16 * p_ybase; /* Y dependant convertion table */
+ u16 * p_yuv; /* base conversion table */
+ u16 * p_ybase; /* Y dependant conversion table */
u16 * p_pic_start; /* beginning of the current line for copy */
- u16 * p_buffer_start; /* convertion buffer start */
- u16 * p_buffer; /* convertion buffer pointer */
+ u16 * p_buffer_start; /* conversion buffer start */
+ u16 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width */
- u16 * p_yuv; /* base convertion table */
- u16 * p_ybase; /* Y dependant convertion table */
+ u16 * p_yuv; /* base conversion table */
+ u16 * p_ybase; /* Y dependant conversion table */
u16 * p_pic_start; /* beginning of the current line for copy */
- u16 * p_buffer_start; /* convertion buffer start */
- u16 * p_buffer; /* convertion buffer pointer */
+ u16 * p_buffer_start; /* conversion buffer start */
+ u16 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width, not used */
- u16 * p_yuv; /* base convertion table */
- u16 * p_ybase; /* Y dependant convertion table */
+ u16 * p_yuv; /* base conversion table */
+ u16 * p_ybase; /* Y dependant conversion table */
u16 * p_pic_start; /* beginning of the current line for copy */
- u16 * p_buffer_start; /* convertion buffer start */
- u16 * p_buffer; /* convertion buffer pointer */
+ u16 * p_buffer_start; /* conversion buffer start */
+ u16 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width */
- u32 * p_yuv; /* base convertion table */
- u32 * p_ybase; /* Y dependant convertion table */
+ u32 * p_yuv; /* base conversion table */
+ u32 * p_ybase; /* Y dependant conversion table */
u32 * p_pic_start; /* beginning of the current line for copy */
- u32 * p_buffer_start; /* convertion buffer start */
- u32 * p_buffer; /* convertion buffer pointer */
+ u32 * p_buffer_start; /* conversion buffer start */
+ u32 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width */
- u32 * p_yuv; /* base convertion table */
- u32 * p_ybase; /* Y dependant convertion table */
+ u32 * p_yuv; /* base conversion table */
+ u32 * p_ybase; /* Y dependant conversion table */
u32 * p_pic_start; /* beginning of the current line for copy */
- u32 * p_buffer_start; /* convertion buffer start */
- u32 * p_buffer; /* convertion buffer pointer */
+ u32 * p_buffer_start; /* conversion buffer start */
+ u32 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{
int i_uval, i_vval; /* U and V samples */
int i_red, i_green, i_blue; /* U and V modified samples */
int i_chroma_width; /* chroma width, not used */
- u32 * p_yuv; /* base convertion table */
- u32 * p_ybase; /* Y dependant convertion table */
+ u32 * p_yuv; /* base conversion table */
+ u32 * p_ybase; /* Y dependant conversion table */
u32 * p_pic_start; /* beginning of the current line for copy */
- u32 * p_buffer_start; /* convertion buffer start */
- u32 * p_buffer; /* convertion buffer pointer */
+ u32 * p_buffer_start; /* conversion buffer start */
+ u32 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start );
/*
- * Perform convertion
+ * Perform conversion
*/
i_scale_count = i_pic_height;
for( i_y = 0; i_y < i_height; i_y++ )
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
- /* Do YUV convertion to buffer - YUV picture is always formed of 16
+ /* Do YUV conversion to buffer - YUV picture is always formed of 16
* pixels wide blocks */
for( i_x = i_width / 16; i_x--; )
{