xine-lib: xine-lib-1.2.13/src/xine-utils/yuv2rgb_private.h Source File

xine-lib 1.2.13-20230125hg15249

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
38 typedef struct yuv2rgb_impl_s yuv2rgb_impl_t;
39 typedef struct yuv2rgb_factory_impl_s yuv2rgb_factory_impl_t;
40
41 typedef void (*scale_line_func_t) (const uint8_t *restrict source,
42 uint8_t *restrict dest,
43 int width, int step);
44
45 struct yuv2rgb_impl_s {
46
47 yuv2rgb_t intf;
48
49 int source_width, source_height;
50 int y_stride, uv_stride;
51 int dest_width, dest_height;
52 int rgb_stride;
53 int slice_height, slice_offset;
54 int step_dx, step_dy;
55 int do_scale, swapped;
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;
68 scale_line_func_t scale_line;
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
77 struct yuv2rgb_factory_impl_s {
78
79 yuv2rgb_factory_t intf;
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 */
93 yuv2rgb_fun_t yuv2rgb_fun;
94 yuy22rgb_fun_t yuy22rgb_fun;
95 yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun;
96};
97
98 void mmx_yuv2rgb_set_csc_levels(yuv2rgb_factory_t *this,
99 int brightness, int contrast, int saturation,
100 int colormatrix);
101 void yuv2rgb_init_mmxext (yuv2rgb_factory_impl_t *this);
102 void yuv2rgb_init_mmx (yuv2rgb_factory_impl_t *this);
103 void yuv2rgb_init_mlib (yuv2rgb_factory_impl_t *this);
104
105
106#endif /* YUV2RGB_PRIVATE_H */
restrict
#define restrict
Definition configure.h:972
contrast
contrast
Definition eq.c:160
width
unsigned int width
Definition gfontrle.c:4
yuv2rgb_factory_impl_s
Definition yuv2rgb_private.h:77
yuv2rgb_factory_impl_s::table_rV
void * table_rV[256]
Definition yuv2rgb_private.h:86
yuv2rgb_factory_impl_s::yuy22rgb_fun
yuy22rgb_fun_t yuy22rgb_fun
Definition yuv2rgb_private.h:94
yuv2rgb_factory_impl_s::table_gU
void * table_gU[256]
Definition yuv2rgb_private.h:87
yuv2rgb_factory_impl_s::mode
int mode
Definition yuv2rgb_private.h:81
yuv2rgb_factory_impl_s::swapped
int swapped
Definition yuv2rgb_private.h:82
yuv2rgb_factory_impl_s::table_base
void * table_base
Definition yuv2rgb_private.h:85
yuv2rgb_factory_impl_s::table_bU
void * table_bU[256]
Definition yuv2rgb_private.h:89
yuv2rgb_factory_impl_s::table_mmx
void * table_mmx
Definition yuv2rgb_private.h:90
yuv2rgb_factory_impl_s::yuv2rgb_fun
yuv2rgb_fun_t yuv2rgb_fun
Definition yuv2rgb_private.h:93
yuv2rgb_factory_impl_s::intf
yuv2rgb_factory_t intf
Definition yuv2rgb_private.h:79
yuv2rgb_factory_impl_s::table_gV
int table_gV[256]
Definition yuv2rgb_private.h:88
yuv2rgb_factory_impl_s::yuv2rgb_single_pixel_fun
yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun
Definition yuv2rgb_private.h:95
yuv2rgb_factory_impl_s::cmap
const uint8_t * cmap
Definition yuv2rgb_private.h:83
yuv2rgb_factory_s
Definition yuv2rgb.h:123
yuv2rgb_impl_s
Definition yuv2rgb_private.h:45
yuv2rgb_impl_s::source_height
int source_height
Definition yuv2rgb_private.h:49
yuv2rgb_impl_s::table_bU
void *const * table_bU
Definition yuv2rgb_private.h:64
yuv2rgb_impl_s::rgb_stride
int rgb_stride
Definition yuv2rgb_private.h:52
yuv2rgb_impl_s::do_scale
int do_scale
Definition yuv2rgb_private.h:55
yuv2rgb_impl_s::u_buffer
uint8_t * u_buffer
Definition yuv2rgb_private.h:58
yuv2rgb_impl_s::source_width
int source_width
Definition yuv2rgb_private.h:49
yuv2rgb_impl_s::slice_offset
int slice_offset
Definition yuv2rgb_private.h:53
yuv2rgb_impl_s::y_stride
int y_stride
Definition yuv2rgb_private.h:50
yuv2rgb_impl_s::dest_width
int dest_width
Definition yuv2rgb_private.h:51
yuv2rgb_impl_s::step_dx
int step_dx
Definition yuv2rgb_private.h:54
yuv2rgb_impl_s::slice_height
int slice_height
Definition yuv2rgb_private.h:53
yuv2rgb_impl_s::intf
yuv2rgb_t intf
Definition yuv2rgb_private.h:47
yuv2rgb_impl_s::y_buffer
uint8_t * y_buffer
Definition yuv2rgb_private.h:57
yuv2rgb_impl_s::table_mmx
const void * table_mmx
Definition yuv2rgb_private.h:65
yuv2rgb_impl_s::v_buffer
uint8_t * v_buffer
Definition yuv2rgb_private.h:59
yuv2rgb_impl_s::step_dy
int step_dy
Definition yuv2rgb_private.h:54
yuv2rgb_impl_s::scale_line
scale_line_func_t scale_line
Definition yuv2rgb_private.h:68
yuv2rgb_impl_s::dest_height
int dest_height
Definition yuv2rgb_private.h:51
yuv2rgb_impl_s::table_gU
void *const * table_gU
Definition yuv2rgb_private.h:62
yuv2rgb_impl_s::table_rV
void *const * table_rV
Definition yuv2rgb_private.h:61
yuv2rgb_impl_s::swapped
int swapped
Definition yuv2rgb_private.h:55
yuv2rgb_impl_s::cmap
const uint8_t * cmap
Definition yuv2rgb_private.h:67
yuv2rgb_impl_s::uv_stride
int uv_stride
Definition yuv2rgb_private.h:50
yuv2rgb_impl_s::table_gV
const int * table_gV
Definition yuv2rgb_private.h:63
yuv2rgb_s
Definition yuv2rgb.h:81
yuv2rgb.h
yuy22rgb_fun_t
void(* yuy22rgb_fun_t)(yuv2rgb_t *this, uint8_t *restrict image, const uint8_t *restrict p)
Definition yuv2rgb.h:49
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_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_init_mlib
void yuv2rgb_init_mlib(yuv2rgb_factory_impl_t *this)
mmx_yuv2rgb_set_csc_levels
void mmx_yuv2rgb_set_csc_levels(yuv2rgb_factory_t *this, int brightness, int contrast, int saturation, int colormatrix)
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
yuv2rgb_init_mmx
void yuv2rgb_init_mmx(yuv2rgb_factory_impl_t *this)
yuv2rgb_init_mmxext
void yuv2rgb_init_mmxext(yuv2rgb_factory_impl_t *this)