- * p_vout video output thread
- * p_pic picture address (start address in picture)
- * p_y, p_u, p_v Y,U,V samples addresses
- * i_width Y samples width
- * i_height Y samples height
- * i_eol number of Y samples to reach the next line
- * i_pic_eol number or pixels to reach the next line
- * i_scale if non 0, vertical scaling is 1 - 1/i_scale
- * i_matrix_coefficients matrix coefficients
- * Conditions:
- * start x + i_width < picture width
- * start y + i_height * (scaling factor) < picture height
- * i_width % 16 == 0
- *******************************************************************************/
-typedef void (vout_convert_t)( p_vout_thread_t p_vout, void *p_pic,
- yuv_data_t *p_y, yuv_data_t *p_u, yuv_data_t *p_v,
- int i_width, int i_height, int i_eol, int i_pic_eol,
- int i_scale, int i_matrix_coefficients );
-
-/*******************************************************************************
- * vout_scale_t: scaling function
- *******************************************************************************
- * When a picture can't be scaled unsing the fast i_y_scale parameter of a
- * transformation, it is rendered in a temporary buffer then scaled using a
- * totally accurate (but also very slow) method.
- * This is the prototype common to all scaling functions. The types of p_buffer
- * and p_pic will change depending of the screen depth treated.
- * Parameters:
- * p_vout video output thread
- * p_pic picture address (start address in picture)
- * p_buffer source picture
- * i_width buffer width
- * i_height buffer height
- * i_eol number of pixels to reach next buffer line
- * i_pic_eol number of pixels to reach next picture line
- * f_alpha, f_beta horizontal and vertical scaling factors
- *******************************************************************************/
-typedef void (vout_scale_t)( p_vout_thread_t p_vout, void *p_pic, void *p_buffer,
- int i_width, int i_height, int i_eol, int i_pic_eol,
- float f_alpha, float f_beta );
-
-/*******************************************************************************
+ * p_vout video output thread
+ * p_pic picture address
+ * p_y, p_u, p_v Y,U,V samples addresses
+ * i_width, i_height Y samples extension
+ * i_pic_width, i_pic_height picture extension
+ * i_pic_line_width picture total line width
+ * i_matrix_coefficients matrix coefficients
+ * Picture width and source dimensions must be multiples of 16.
+ *****************************************************************************/
+typedef void (vout_yuv_convert_t)( p_vout_thread_t p_vout, void *p_pic,
+ yuv_data_t *p_y, yuv_data_t *p_u, yuv_data_t *p_v,
+ int i_width, int i_height,
+ int i_pic_width, int i_pic_height, int i_pic_line_width,
+ int i_matrix_coefficients );
+
+/*****************************************************************************
+ * vout_yuv_t: pre-calculated YUV convertion tables
+ *****************************************************************************
+ * These tables are used by convertion and scaling functions.
+ *****************************************************************************/
+typedef struct vout_yuv_s
+{
+ /* Convertion functions */
+ vout_yuv_convert_t * p_Convert420; /* YUV 4:2:0 converter */
+ vout_yuv_convert_t * p_Convert422; /* YUV 4:2:2 converter */
+ vout_yuv_convert_t * p_Convert444; /* YUV 4:4:4 converter */
+
+ /* Pre-calculated convertion tables */
+ void * p_base; /* base for all conversion tables */
+ union
+ {
+ u8 * p_gray8; /* gray 8 bits table */
+ u16 * p_gray16; /* gray 16 bits table */
+ u32 * p_gray32; /* gray 32 bits table */
+ u8 * p_rgb8; /* RGB 8 bits table */
+ u16 * p_rgb16; /* RGB 16 bits table */
+ u32 * p_rgb32; /* RGB 32 bits table */
+ } yuv;
+
+ /* Temporary convertion buffer and offset array */
+ void * p_buffer; /* convertion buffer */
+ int * p_offset; /* offset array */
+} vout_yuv_t;
+
+/*****************************************************************************
+ * vout_buffer_t: rendering buffer
+ *****************************************************************************
+ * This structure store informations about a buffer. Buffers are not completely
+ * cleared between displays, and modified areas need to be stored.
+ *****************************************************************************/
+typedef struct vout_buffer_s
+{
+ /* Picture area */
+ int i_pic_x, i_pic_y; /* picture position */
+ int i_pic_width, i_pic_height; /* picture extension */
+
+ /* Other areas - only vertical extensions of areas are stored */
+ int i_areas; /* number of areas */
+ int pi_area_begin[VOUT_MAX_AREAS]; /* beginning of area */
+ int pi_area_end[VOUT_MAX_AREAS]; /* end of area */
+
+ /* Picture data */
+ byte_t * p_data; /* memory address */
+} vout_buffer_t;
+
+/*****************************************************************************