xine-lib  1.2.10
yuv2rgb_private.h
Go to the documentation of this file.
1 /*
2  * yuv2rgb_private.h
3  *
4  * Copyright (C) 2001-2018 the xine project
5  * This file is part of xine, a free video player.
6  *
7  * based on work from mpeg2dec:
8  * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
9  *
10  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
11  *
12  * mpeg2dec is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * mpeg2dec is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
25  */
26 
27 #ifndef YUV2RGB_PRIVATE_H
28 #define YUV2RGB_PRIVATE_H
29 
30 #include <inttypes.h>
31 
32 #ifdef HAVE_MLIB
33 #include <mlib_video.h>
34 #endif
35 
36 #include "yuv2rgb.h"
37 
40 
41 typedef void (*scale_line_func_t) (const uint8_t *restrict source,
42  uint8_t *restrict dest,
43  int width, int step);
44 
46 
48 
56 
57  uint8_t *y_buffer;
58  uint8_t *u_buffer;
59  uint8_t *v_buffer;
60 
61  void * const *table_rV;
62  void * const *table_gU;
63  const int *table_gV;
64  void * const *table_bU;
65  const void *table_mmx;
66 
67  const uint8_t *cmap;
69 
70 #ifdef HAVE_MLIB
71  uint8_t *mlib_buffer;
72  uint8_t *mlib_resize_buffer;
73  mlib_filter mlib_filter_type;
74 #endif
75 };
76 
78 
80 
81  int mode;
82  int swapped;
83  const uint8_t *cmap;
84 
85  void *table_base;
86  void *table_rV[256];
87  void *table_gU[256];
88  int table_gV[256];
89  void *table_bU[256];
90  void *table_mmx;
91 
92  /* preselected functions for mode/swap/hardware */
96 };
97 
99  int brightness, int contrast, int saturation,
100  int colormatrix);
104 
105 
106 #endif /* YUV2RGB_PRIVATE_H */
pand_m2r
#define pand_m2r(var, reg)
Definition: mmx.h:554
psubsw_m2r
#define psubsw_m2r(var, reg)
Definition: mmx.h:490
yuv2rgb_impl_s::uv_stride
int uv_stride
Definition: yuv2rgb_private.h:50
punpcklbw_r2r
#define punpcklbw_r2r(regs, regd)
Definition: mmx.h:695
yuv2rgb_impl_s::table_gV
const int * table_gV
Definition: yuv2rgb_private.h:63
yuv2rgb_impl_s::cmap
const uint8_t * cmap
Definition: yuv2rgb_private.h:67
yuv2rgb_private.h
xine_mallocz_aligned
void * xine_mallocz_aligned(size_t size)
Definition: utils.c:856
yuv2rgb_s::next_slice
int(* next_slice)(yuv2rgb_t *this, uint8_t **dest)
Definition: yuv2rgb.h:94
yuv2rgb_s
Definition: yuv2rgb.h:81
punpckhwd_r2r
#define punpckhwd_r2r(regs, regd)
Definition: mmx.h:708
MIN
#define MIN(a, b)
Definition: demux_ts.c:321
xineutils.h
MODE_16_RGB
#define MODE_16_RGB
Definition: yuv2rgb.h:63
yuv2rgb_impl_s::dest_width
int dest_width
Definition: yuv2rgb_private.h:51
yuv2rgb_factory_s
Definition: yuv2rgb.h:123
MODE_32_RGB
#define MODE_32_RGB
Definition: yuv2rgb.h:67
yuv2rgb_impl_s::source_width
int source_width
Definition: yuv2rgb_private.h:49
xine_fast_memcpy
void *(* xine_fast_memcpy)(void *to, const void *from, size_t len)
Definition: memcpy.c:60
contrast
contrast
Definition: eq.c:160
yuv2rgb_factory_impl_s::yuv2rgb_fun
yuv2rgb_fun_t yuv2rgb_fun
Definition: yuv2rgb_private.h:93
yuv2rgb_factory_impl_s::yuv2rgb_single_pixel_fun
yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun
Definition: yuv2rgb_private.h:95
yuv2rgb_impl_s::do_scale
int do_scale
Definition: yuv2rgb_private.h:55
psrlw_i2r
#define psrlw_i2r(imm, reg)
Definition: mmx.h:643
xine_mmx.h
mmx_yuv2rgb_set_csc_levels
void mmx_yuv2rgb_set_csc_levels(yuv2rgb_factory_t *this, int brightness, int contrast, int saturation, int colormatrix)
yuv2rgb_impl_s::swapped
int swapped
Definition: yuv2rgb_private.h:55
MODE_32_BGR
#define MODE_32_BGR
Definition: yuv2rgb.h:68
yuv2rgb_impl_s::y_stride
int y_stride
Definition: yuv2rgb_private.h:50
psrlq_i2r
#define psrlq_i2r(imm, reg)
Definition: mmx.h:633
yuv2rgb_fun_t
void(* yuv2rgb_fun_t)(yuv2rgb_t *this, uint8_t *restrict image, const uint8_t *restrict py, const uint8_t *restrict pu, const uint8_t *restrict pv)
Definition: yuv2rgb.h:43
yuv2rgb_impl_s::table_mmx
const void * table_mmx
Definition: yuv2rgb_private.h:65
attributes.h
yuv2rgb_impl_s
Definition: yuv2rgb_private.h:45
yuv2rgb_impl_s::table_gU
void *const * table_gU
Definition: yuv2rgb_private.h:62
yuv2rgb_impl_s::dest_height
int dest_height
Definition: yuv2rgb_private.h:51
por_r2r
#define por_r2r(regs, regd)
Definition: mmx.h:570
yuv2rgb_factory_impl_s::table_gV
int table_gV[256]
Definition: yuv2rgb_private.h:88
yuv2rgb.h
pxor_r2r
#define pxor_r2r(regs, regd)
Definition: mmx.h:577
movq_m2r
#define movq_m2r(var, reg)
Definition: mmx.h:411
psllq_i2r
#define psllq_i2r(imm, reg)
Definition: mmx.h:615
yuv2rgb_impl_s::table_rV
void *const * table_rV
Definition: yuv2rgb_private.h:61
yuv2rgb_impl_s::u_buffer
uint8_t * u_buffer
Definition: yuv2rgb_private.h:58
yuv2rgb_factory_impl_s::table_bU
void * table_bU[256]
Definition: yuv2rgb_private.h:89
NULL
NULL
Definition: xine_plugin.c:78
yuv2rgb_factory_impl_s::cmap
const uint8_t * cmap
Definition: yuv2rgb_private.h:83
paddsw_m2r
#define paddsw_m2r(var, reg)
Definition: mmx.h:453
yuv2rgb_impl_s::slice_height
int slice_height
Definition: yuv2rgb_private.h:53
yuv2rgb_impl_s::rgb_stride
int rgb_stride
Definition: yuv2rgb_private.h:52
yuv2rgb_impl_s::source_height
int source_height
Definition: yuv2rgb_private.h:49
pmulhw_m2r
#define pmulhw_m2r(var, reg)
Definition: mmx.h:519
width
unsigned int width
Definition: gfontrle.c:4
movd_m2r
#define movd_m2r(var, reg)
Definition: mmx.h:426
yuv2rgb_init_mmxext
void yuv2rgb_init_mmxext(yuv2rgb_factory_impl_t *this)
yuv2rgb_factory_impl_s::table_rV
void * table_rV[256]
Definition: yuv2rgb_private.h:86
restrict
#define restrict
Definition: configure.h:935
mmx_t
Definition: mmx.h:53
yuv2rgb_impl_s::table_bU
void *const * table_bU
Definition: yuv2rgb_private.h:64
yuv2rgb_factory_impl_s::yuy22rgb_fun
yuy22rgb_fun_t yuy22rgb_fun
Definition: yuv2rgb_private.h:94
yuv2rgb_factory_impl_s::swapped
int swapped
Definition: yuv2rgb_private.h:82
yuv2rgb_init_mlib
void yuv2rgb_init_mlib(yuv2rgb_factory_impl_t *this)
yuv2rgb_impl_s::slice_offset
int slice_offset
Definition: yuv2rgb_private.h:53
scale_line_func_t
void(* scale_line_func_t)(const uint8_t *restrict source, uint8_t *restrict dest, int width, int step)
Definition: yuv2rgb_private.h:41
psllw_i2r
#define psllw_i2r(imm, reg)
Definition: mmx.h:625
yuy22rgb_fun_t
void(* yuy22rgb_fun_t)(yuv2rgb_t *this, uint8_t *restrict image, const uint8_t *restrict p)
Definition: yuv2rgb.h:49
emms
#define emms()
Definition: mmx.h:732
paddsw_r2r
#define paddsw_r2r(regs, regd)
Definition: mmx.h:454
yuv2rgb_impl_s::step_dy
int step_dy
Definition: yuv2rgb_private.h:54
height
unsigned int height
Definition: gfontrle.c:5
yuv2rgb_factory_impl_s::table_gU
void * table_gU[256]
Definition: yuv2rgb_private.h:87
mode
enable disable number of frames of telecine pattern sync required before mode change make frames evenly spaced for film mode(24 fps)" ) PARAM_ITEM( POST_PARAM_TYPE_BOOL
yuv2rgb_factory_impl_s::mode
int mode
Definition: yuv2rgb_private.h:81
yuv2rgb_factory_impl_s
Definition: yuv2rgb_private.h:77
yuv2rgb_single_pixel_fun_t
uint32_t(* yuv2rgb_single_pixel_fun_t)(yuv2rgb_t *this, uint8_t y, uint8_t u, uint8_t v)
Definition: yuv2rgb.h:53
yuv2rgb_factory_impl_s::table_base
void * table_base
Definition: yuv2rgb_private.h:85
Inverse_Table_6_9
const int32_t Inverse_Table_6_9[8][4]
Definition: yuv2rgb.c:48
yuv2rgb_impl_s::y_buffer
uint8_t * y_buffer
Definition: yuv2rgb_private.h:57
MODE_24_BGR
#define MODE_24_BGR
Definition: yuv2rgb.h:66
config.h
movq_r2r
#define movq_r2r(regs, regd)
Definition: mmx.h:413
yuv2rgb_impl_s::scale_line
scale_line_func_t scale_line
Definition: yuv2rgb_private.h:68
punpckhbw_r2r
#define punpckhbw_r2r(regs, regd)
Definition: mmx.h:712
MODE_24_RGB
#define MODE_24_RGB
Definition: yuv2rgb.h:65
MODE_15_RGB
#define MODE_15_RGB
Definition: yuv2rgb.h:61
yuv2rgb_factory_impl_s::table_mmx
void * table_mmx
Definition: yuv2rgb_private.h:90
yuv2rgb_factory_impl_s::intf
yuv2rgb_factory_t intf
Definition: yuv2rgb_private.h:79
yuv2rgb_impl_s::v_buffer
uint8_t * v_buffer
Definition: yuv2rgb_private.h:59
psraw_i2r
#define psraw_i2r(imm, reg)
Definition: mmx.h:656
yuv2rgb_impl_s::step_dx
int step_dx
Definition: yuv2rgb_private.h:54
yuv2rgb_impl_s::intf
yuv2rgb_t intf
Definition: yuv2rgb_private.h:47
punpcklwd_r2r
#define punpcklwd_r2r(regs, regd)
Definition: mmx.h:691
packuswb_r2r
#define packuswb_r2r(regs, regd)
Definition: mmx.h:678
yuv2rgb_init_mmx
void yuv2rgb_init_mmx(yuv2rgb_factory_impl_t *this)