- * 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 conversion tables
+ *****************************************************************************
+ * These tables are used by conversion and scaling functions.
+ *****************************************************************************/
+typedef int (yuv_init_t) ( p_vout_thread_t p_vout );
+typedef int (yuv_reset_t) ( p_vout_thread_t p_vout );
+typedef void (yuv_end_t) ( p_vout_thread_t p_vout );
+
+typedef struct vout_yuv_s
+{
+ /* conversion functions */
+ vout_yuv_convert_t *pf_yuv420; /* YUV 4:2:0 converter */
+ vout_yuv_convert_t *pf_yuv422; /* YUV 4:2:2 converter */
+ vout_yuv_convert_t *pf_yuv444; /* YUV 4:4:4 converter */
+
+ /* Pre-calculated conversion 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 conversion buffer and offset array */
+ void * p_buffer; /* conversion buffer */
+ int * p_offset; /* offset array */
+
+ /* Plugin used and shortcuts to access its capabilities */
+ struct module_s * p_module;
+ yuv_init_t * pf_init; /* initialize YUV tables */
+ yuv_reset_t * pf_reset; /* reset YUV tables */
+ yuv_end_t * pf_end; /* free YUV tables */
+
+} vout_yuv_t;
+
+/*****************************************************************************
+ * vout_buffer_t: rendering buffer
+ *****************************************************************************
+ * This structure stores information 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 size */
+
+ /* 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;
+
+/*****************************************************************************
+ * vout_fifo_t
+ *****************************************************************************/
+typedef struct vout_fifo_s
+{
+ /* See the fifo types below */
+ int i_type;
+ boolean_t b_die;
+ int i_fifo; /* Just to keep track of the fifo index */
+
+ int i_width;
+ int i_height;
+
+ vlc_mutex_t data_lock;
+ vlc_cond_t data_wait;
+
+} vout_fifo_t;
+
+#define VOUT_EMPTY_FIFO 0
+#define VOUT_YUV_FIFO 1
+#define VOUT_SPU_FIFO 2
+
+/*****************************************************************************