xine-lib: xine-lib-1.2.12/src/video_out/video_out_opengl2.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
video_out_opengl2.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <math.h>`
`#include <errno.h>`
`#include <ctype.h>`
`#include <pthread.h>`
`#include <xine.h>`
`#include <xine/video_out.h>`
`#include <xine/vo_scale.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <GL/gl.h>`
`#include <GL/glext.h>`
`#include "opengl/xine_gl.h"`
`#include "mem_frame.h"`
`#include "hw_frame.h"`
`#include "color_matrix.c"`

## Data Structures
struct | opengl2_overlay_t
struct | opengl2_program_t
struct | opengl2_yuvtex_t
struct | opengl2_driver_t
struct | opengl2_class_t
struct | opengl2_rect_t
struct | opengl2_draw_info_t

## Macros
#define | LOG_MODULE "video_out_opengl2"
#define | GL_GLEXT_PROTOTYPES
#define | GL_RED 0x1903
#define | GL_RG 0x8227
#define | OGL2_BC_LUT 1
#define | OGL2_BC_PROG_1 2
#define | OGL2_BC_PROG_2 4
#define | OGL2_BC_FBO 8
#define | MAX_EXIT_TARGETS 8
#define | CM_LUT
#define | CM_HAVE_YCGCO_SUPPORT 1
#define | CM_HAVE_BT2020_SUPPORT 1
#define | CM_DRIVER_T opengl2_driver_t
#define | LUTWIDTH 1000
#define | N_SPLINES 2
#define | CATMULLROM_SPLINE 0
#define | COS_SPLINE 1
#define | nv12_frag
#define | yuv422_frag
#define | INITWIDTH 720
#define | INITHEIGHT 576

## Typedefs
typedef mem_frame_t | opengl2_frame_t

## Enumerations
enum | opengl2_csc_shader_t { OGL2_cscs_NONE = 0 , OGL2_cscs_yuv420 , OGL2_cscs_yuv420j , OGL2_cscs_nv12 , OGL2_cscs_yuv422 , OGL2_cscs_LAST }
enum | opengl2_tex_t { OGL2_TEX_VIDEO_0 = 0 , OGL2_TEX_VIDEO_1 , OGL2_TEX_y , OGL2_TEX_u_v , OGL2_TEX_u , OGL2_TEX_v , OGL2_TEX_yuv , OGL2_TEX_uv , OGL2_TEX_HW0 , OGL2_TEX_HW1 , OGL2_TEX_HW2 , OGL2_TEX_LAST }

## Functions
static void | opengl2_exit (void)
static void | opengl2_exit_unregister (opengl2_driver_t *this)
static void | opengl2_exit_register (opengl2_driver_t *this)
static void | opengl2_accel_lock (vo_frame_t *frame, int lock)
static float | compute_cos_spline (float x)
static float | compute_catmullrom_spline (float x)
static int | create_lut_texture (opengl2_driver_t *that)
static int | opengl2_build_program (opengl2_driver_t *this, opengl2_program_t *prog, const char *source, const char *name, const char *const *arg_names)
static void | opengl2_delete_program (opengl2_program_t *prog)
static void | _config_texture (GLenum target, GLuint texture, GLsizei width, GLsizei height, GLenum format, GLenum type, GLenum minmag_filter)
static int | opengl2_check_textures_size (opengl2_driver_t *this_gen, int w, int h, int bytes_per_pixel)
static void | opengl2_upload_overlay (opengl2_driver_t *this, opengl2_overlay_t *o, vo_overlay_t *overlay)
static void | opengl2_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen, int changed)
static void | opengl2_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
static void | opengl2_overlay_end (vo_driver_t *this_gen, vo_frame_t *vo_img)
static int | opengl2_redraw_needed (vo_driver_t *this_gen)
static void | opengl2_update_csc_matrix (opengl2_driver_t *that, opengl2_frame_t *frame, int input_scale)
static void | opengl2_update_overlays (opengl2_driver_t *that)
static void | opengl2_rect_set (opengl2_rect_t *r, opengl2_overlay_t *o)
static void | opengl2_rect_scale (opengl2_rect_t *r, float fx, float fy)
static void | opengl2_draw_scaled_overlays (opengl2_driver_t *that, opengl2_frame_t *frame)
static void | opengl2_draw_unscaled_overlays (opengl2_driver_t *that)
static GLuint | opengl2_swap_textures (opengl2_driver_t *that, GLuint current_dest)
static GLuint | opengl2_sharpness (opengl2_driver_t *that, opengl2_frame_t *frame, GLuint video_texture)
static int | _opengl2_setup_bicubic (opengl2_driver_t *that, uint32_t flags)
static int | opengl2_setup_bicubic (opengl2_driver_t *that, uint32_t flags)
static int | opengl2_draw_video_bicubic (opengl2_driver_t *that, const opengl2_draw_info_t *info)
static int | opengl2_draw_video_cubic_x (opengl2_driver_t *that, const opengl2_draw_info_t *info)
static int | opengl2_draw_video_cubic_y (opengl2_driver_t *that, const opengl2_draw_info_t *info)
static int | opengl2_draw_video_simple (opengl2_driver_t *that, const opengl2_draw_info_t *info)
static void | opengl2_draw_video_bilinear (opengl2_driver_t *that, const opengl2_draw_info_t *info)
static void | _upload_texture (GLenum target, GLuint tex, GLenum format, GLenum type, void *data, unsigned pitch, GLuint bpp, GLuint height, GLuint pbo)
static GLuint | opengl2_use_csc (opengl2_driver_t *that, opengl2_csc_shader_t what)
static void | opengl2_draw (opengl2_driver_t *that, opengl2_frame_t *frame)
static void | opengl2_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
static int | opengl2_get_property (vo_driver_t *this_gen, int property)
static int | opengl2_set_property (vo_driver_t *this_gen, int property, int value)
static void | opengl2_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max)
static int | opengl2_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data)
static uint32_t | opengl2_get_capabilities (vo_driver_t *this_gen)
static void | opengl2_set_bicubic (void *this_gen, xine_cfg_entry_t *entry)
static void | opengl2_dispose (vo_driver_t *this_gen)
static vo_frame_t * | opengl2_alloc_frame (vo_driver_t *this_gen)
static vo_driver_t * | opengl2_open_plugin (video_driver_class_t *class_gen, const void *visual_gen)
static uint32_t | opengl2_check_platform (xine_t *xine, unsigned visual_type, const void *visual)
static void * | opengl2_init_class (xine_t *xine, unsigned visual_type, const void *visual_gen)
static void * | opengl2_init_class_x11 (xine_t *xine, const void *visual_gen)
static void * | opengl2_init_class_wl (xine_t *xine, const void *visual_gen)

## Variables
opengl2_driver_t * | opengl2_exit_vector [8]
static const char *const | bicubic_pass1_args [] = {"ARB", "tex", "lut", "spline", NULL}
static const char * | bicubic_pass1_frag
static const char *const | bicubic_pass2_args [] = {"ARB", "tex", "lut", "spline", NULL}
static const char * | bicubic_pass2_frag
static const char *const | blur_sharpen_args [] = {"ARB", "tex", "mid", "side", "corn", NULL}
static const char * | blur_sharpen_frag
static const char *const | yuv420_args [] = {"r_coefs", "g_coefs", "b_coefs", "texY", "texU", "texV", NULL}
static const char * | yuv420_frag
static const char *const | yuv420j_args [] = {"r_coefs", "g_coefs", "b_coefs", "texY", "tex_U_V", NULL}
static const char * | yuv420j_frag
static const char *const | nv12_args [] = {"r_coefs", "g_coefs", "b_coefs", "texY", "texUV", NULL}
static const char *const | yuv422_args [] = {"r_coefs", "g_coefs", "b_coefs", "texYUV", "yuy2vals", NULL}
static const vo_info_t | vo_info_opengl2
static const vo_info_t | vo_info_opengl2_wl
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ CATMULLROM_SPLINE

#define CATMULLROM_SPLINE 0

## ◆ CM_DRIVER_T

#define CM_DRIVER_T opengl2_driver_t

## ◆ CM_HAVE_BT2020_SUPPORT

#define CM_HAVE_BT2020_SUPPORT 1

## ◆ CM_HAVE_YCGCO_SUPPORT

#define CM_HAVE_YCGCO_SUPPORT 1

## ◆ CM_LUT

#define CM_LUT

## ◆ COS_SPLINE

#define COS_SPLINE 1

## ◆ GL_GLEXT_PROTOTYPES

#define GL_GLEXT_PROTOTYPES

## ◆ GL_RED

#define GL_RED 0x1903

## ◆ GL_RG

#define GL_RG 0x8227

## ◆ INITHEIGHT

#define INITHEIGHT 576

## ◆ INITWIDTH

#define INITWIDTH 720

## ◆ LOG_MODULE

#define LOG_MODULE "video_out_opengl2"

## ◆ LUTWIDTH

#define LUTWIDTH 1000

## ◆ MAX_EXIT_TARGETS

#define MAX_EXIT_TARGETS 8

## ◆ N_SPLINES

#define N_SPLINES 2

## ◆ nv12_frag

#define nv12_frag

Value:
"uniform sampler2D texY, texUV;\n" \
"uniform vec4 r_coefs, g_coefs, b_coefs;\n" \
"void main (void) {\n" \
" vec4 rgb;\n" \
" vec4 yuv;\n" \
" vec2 coord = gl_TexCoord[0].xy;\n" \
" yuv.r = texture2D (texY, coord).r;\n" \
" yuv.g = texture2D (texUV, coord).r;\n" \
" yuv.b = texture2D (texUV, coord).%s;\n" \
" yuv.a = 1.0;\n" \
" rgb.r = dot( yuv, r_coefs );\n" \
" rgb.g = dot( yuv, g_coefs );\n" \
" rgb.b = dot( yuv, b_coefs );\n" \
" rgb.a = 1.0;\n" \
" gl_FragColor = rgb;\n" \
"}\n"

## ◆ OGL2_BC_FBO

#define OGL2_BC_FBO 8

## ◆ OGL2_BC_LUT

#define OGL2_BC_LUT 1

## ◆ OGL2_BC_PROG_1

#define OGL2_BC_PROG_1 2

## ◆ OGL2_BC_PROG_2

#define OGL2_BC_PROG_2 4

## ◆ yuv422_frag

#define yuv422_frag

Value:
"uniform sampler2D texYUV;\n" \
"uniform vec4 r_coefs, g_coefs, b_coefs;\n" \
"uniform vec2 yuy2vals;\n" \
"void main(void) {\n" \
" vec4 rgba;\n" \
" vec4 yuv;\n" \
" vec4 coord = gl_TexCoord[0].xyxx;\n" \
" float group_x = floor (coord.x * yuy2vals.x);\n" \
" coord.z = (group_x + 0.25) * yuy2vals.y;\n" \
" coord.w = (group_x + 0.75) * yuy2vals.y;\n" \
" yuv.r = texture2D (texYUV, coord.xy).r;\n" \
" yuv.g = texture2D (texYUV, coord.zy).%s;\n" \
" yuv.b = texture2D (texYUV, coord.wy).%s;\n" \
" yuv.a = 1.0;\n" \
" rgba.r = dot (yuv, r_coefs);\n" \
" rgba.g = dot (yuv, g_coefs);\n" \
" rgba.b = dot (yuv, b_coefs);\n" \
" rgba.a = 1.0;\n" \
" gl_FragColor = rgba;\n" \
"}\n"

## Typedef Documentation

## ◆ opengl2_frame_t

typedef mem_frame_t opengl2_frame_t

## Enumeration Type Documentation

## ◆ opengl2_csc_shader_t

enum opengl2_csc_shader_t

Enumerator
OGL2_cscs_NONE |
OGL2_cscs_yuv420 |
OGL2_cscs_yuv420j |
OGL2_cscs_nv12 |
OGL2_cscs_yuv422 |
OGL2_cscs_LAST |

## ◆ opengl2_tex_t

enum opengl2_tex_t

Enumerator
OGL2_TEX_VIDEO_0 |
OGL2_TEX_VIDEO_1 |
OGL2_TEX_y |
OGL2_TEX_u_v |
OGL2_TEX_u |
OGL2_TEX_v |
OGL2_TEX_yuv |
OGL2_TEX_uv |
OGL2_TEX_HW0 |
OGL2_TEX_HW1 |
OGL2_TEX_HW2 |
OGL2_TEX_LAST |

## Function Documentation

## ◆ _config_texture()

static void _config_texture | ( | GLenum | target,
|  | GLuint | texture,
|  | GLsizei | width,
|  | GLsizei | height,
|  | GLenum | format,
|  | GLenum | type,
|  | GLenum | minmag_filter
| ) |  |
| static

References height, NULL, type, and width.

Referenced by opengl2_check_textures_size(), and opengl2_draw_video_bicubic().

## ◆ _opengl2_setup_bicubic()

static int _opengl2_setup_bicubic | ( | opengl2_driver_t * | that,
|  | uint32_t | flags
| ) |  |
| static

References opengl2_driver_t::bicubic, bicubic_pass1_args, bicubic_pass1_frag, bicubic_pass2_args, bicubic_pass2_frag, opengl2_program_t::compiled, create_lut_texture(), opengl2_driver_t::fbo, opengl2_driver_t::flags, opengl2_driver_t::lut_texture, OGL2_BC_FBO, OGL2_BC_LUT, OGL2_BC_PROG_1, OGL2_BC_PROG_2, opengl2_build_program(), opengl2_driver_t::pass1_program, and opengl2_driver_t::pass2_program.

Referenced by opengl2_setup_bicubic().

## ◆ _upload_texture()

static void _upload_texture | ( | GLenum | target,
|  | GLuint | tex,
|  | GLenum | format,
|  | GLenum | type,
|  | void * | data,
|  | unsigned | pitch,
|  | GLuint | bpp,
|  | GLuint | height,
|  | GLuint | pbo
| ) |  |
| static

References height, type, and xine_fast_memcpy.

Referenced by opengl2_draw().

## ◆ compute_catmullrom_spline()

static float compute_catmullrom_spline | ( | float | x | ) |
| static

Referenced by create_lut_texture().

## ◆ compute_cos_spline()

static float compute_cos_spline | ( | float | x | ) |
| static

Referenced by create_lut_texture().

## ◆ create_lut_texture()

static int create_lut_texture | ( | opengl2_driver_t * | that | ) |
| static

References opengl2_driver_t::bicubic, compute_catmullrom_spline(), compute_cos_spline(), opengl2_driver_t::flags, opengl2_driver_t::lut_texture, LUTWIDTH, and N_SPLINES.

Referenced by _opengl2_setup_bicubic().

## ◆ opengl2_accel_lock()

static void opengl2_accel_lock | ( | vo_frame_t * | frame,
|  | int | lock
| ) |  |
| static

Referenced by opengl2_open_plugin().

## ◆ opengl2_alloc_frame()

static vo_frame_t * opengl2_alloc_frame | ( | vo_driver_t * | this_gen | ) |
| static

References vo_frame_s::accel_data, mem_frame_alloc_frame(), NULL, and mem_frame_t::vo_frame.

Referenced by opengl2_open_plugin().

## ◆ opengl2_build_program()

static int opengl2_build_program | ( | opengl2_driver_t * | this,
|  | opengl2_program_t * | prog,
|  | const char * | source,
|  | const char * | name,
|  | const char *const * | arg_names
| ) |  |
| static

References opengl2_program_t::args, opengl2_program_t::compiled, LOG_MODULE, opengl2_program_t::name, name, NULL, opengl2_program_t::program, opengl2_program_t::shader, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _opengl2_setup_bicubic(), opengl2_open_plugin(), and opengl2_sharpness().

## ◆ opengl2_check_platform()

static uint32_t opengl2_check_platform | ( | xine_t * | xine,
|  | unsigned | visual_type,
|  | const void * | visual
| ) |  |
| static

References _x_load_gl(), xine_gl::dispose, xine_gl::make_current, xine_gl::release_current, opengl2_class_t::visual_type, opengl2_class_t::xine, XINE_GL_API_OPENGL, xine_gl_extensions_load(), xine_gl_extensions_test(), and xine_gl_extensions_unload().

Referenced by opengl2_init_class().

## ◆ opengl2_check_textures_size()

static int opengl2_check_textures_size | ( | opengl2_driver_t * | this_gen,
|  | int | w,
|  | int | h,
|  | int | bytes_per_pixel
| ) |  |
| static

References _config_texture(), bytes_per_pixel, opengl2_yuvtex_t::bytes_per_pixel, opengl2_yuvtex_t::height, LOG_MODULE, NULL, OGL2_TEX_HW0, OGL2_TEX_LAST, OGL2_TEX_u, OGL2_TEX_u_v, OGL2_TEX_uv, OGL2_TEX_v, OGL2_TEX_VIDEO_0, OGL2_TEX_VIDEO_1, OGL2_TEX_y, OGL2_TEX_yuv, opengl2_yuvtex_t::relw, opengl2_yuvtex_t::tex, type, opengl2_yuvtex_t::width, XINE_VERBOSITY_DEBUG, xprintf, opengl2_yuvtex_t::yuy2_div, and opengl2_yuvtex_t::yuy2_mul.

Referenced by opengl2_draw(), and opengl2_open_plugin().

## ◆ opengl2_delete_program()

static void opengl2_delete_program | ( | opengl2_program_t * | prog | ) |
| static

References opengl2_program_t::program, and opengl2_program_t::shader.

Referenced by opengl2_dispose().

## ◆ opengl2_display_frame()

static void opengl2_display_frame | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen
| ) |  |
| static

References vo_frame_s::crop_bottom, vo_frame_s::crop_left, vo_frame_s::crop_right, vo_frame_s::crop_top, vo_frame_s::free, mem_frame_t::height, opengl2_draw(), opengl2_exit_register(), opengl2_redraw_needed(), mem_frame_t::ratio, mem_frame_t::vo_frame, and mem_frame_t::width.

Referenced by opengl2_open_plugin().

## ◆ opengl2_dispose()

static void opengl2_dispose | ( | vo_driver_t * | this_gen | ) |
| static

References _x_vo_scale_cleanup(), OGL2_cscs_LAST, OGL2_TEX_LAST, opengl2_delete_program(), opengl2_exit_unregister(), and XINE_VORAW_MAX_OVL.

Referenced by opengl2_open_plugin().

## ◆ opengl2_draw()

static void opengl2_draw | ( | opengl2_driver_t * | that,
|  | opengl2_frame_t * | frame
| ) |  |
| static

References _upload_texture(), opengl2_program_t::args, vo_frame_s::base, opengl2_driver_t::bicubic, bits, opengl2_driver_t::changed, opengl2_driver_t::corn, opengl2_driver_t::csc_shaders, opengl2_draw_info_t::dh, vo_scale_s::displayed_height, vo_scale_s::displayed_width, vo_scale_s::displayed_xoffset, vo_scale_s::displayed_yoffset, opengl2_draw_info_t::dw, opengl2_draw_info_t::dx1, opengl2_draw_info_t::dx2, opengl2_draw_info_t::dy1, opengl2_draw_info_t::dy2, opengl2_driver_t::fbo, vo_frame_s::flags, opengl2_driver_t::flags, opengl2_driver_t::fmt_1p, opengl2_driver_t::fmt_2p, vo_frame_s::format, mem_frame_t::format, xine_hwdec_t::frame_format, xine_glconv_t::get_textures, opengl2_driver_t::gl, opengl2_driver_t::glconv, vo_scale_s::gui_height, vo_scale_s::gui_width, opengl2_draw_info_t::guih, opengl2_draw_info_t::guiw, mem_frame_t::height, opengl2_driver_t::hw, LOG_MODULE, xine_gl::make_current, opengl2_driver_t::mid, OGL2_cscs_nv12, OGL2_cscs_yuv420, OGL2_cscs_yuv420j, OGL2_cscs_yuv422, OGL2_TEX_HW0, OGL2_TEX_u, OGL2_TEX_u_v, OGL2_TEX_uv, OGL2_TEX_v, OGL2_TEX_VIDEO_0, OGL2_TEX_y, OGL2_TEX_yuv, opengl2_check_textures_size(), opengl2_draw_scaled_overlays(), opengl2_draw_unscaled_overlays(), opengl2_draw_video_bicubic(), opengl2_draw_video_bilinear(), opengl2_draw_video_cubic_x(), opengl2_draw_video_cubic_y(), opengl2_draw_video_simple(), opengl2_sharpness(), opengl2_update_csc_matrix(), opengl2_update_overlays(), opengl2_use_csc(), vo_scale_s::output_height, vo_scale_s::output_width, vo_scale_s::output_xoffset, vo_scale_s::output_yoffset, vo_frame_s::pitches, xine_gl::release_current, opengl2_yuvtex_t::relw, opengl2_driver_t::sc, opengl2_driver_t::scale, opengl2_driver_t::sharp, opengl2_driver_t::side, xine_gl::swap_buffers, opengl2_draw_info_t::sx1, opengl2_draw_info_t::sx2, opengl2_draw_info_t::sy1, opengl2_draw_info_t::sy2, opengl2_yuvtex_t::tex, opengl2_driver_t::transform, type, opengl2_driver_t::value, opengl2_draw_info_t::video_texture, opengl2_driver_t::videoPBO, mem_frame_t::vo_frame, VO_GET_FLAGS_DEPTH, mem_frame_t::width, opengl2_driver_t::xine, XINE_IMGFMT_NV12, XINE_IMGFMT_YUY2, XINE_IMGFMT_YV12, XINE_IMGFMT_YV12_DEEP, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XINE_VO_TRANSFORM_FLIP_H, XINE_VO_TRANSFORM_FLIP_V, xprintf, opengl2_driver_t::yuvtex, opengl2_yuvtex_t::yuy2_div, and opengl2_yuvtex_t::yuy2_mul.

Referenced by opengl2_display_frame().

## ◆ opengl2_draw_scaled_overlays()

static void opengl2_draw_scaled_overlays | ( | opengl2_driver_t * | that,
|  | opengl2_frame_t * | frame
| ) |  |
| static

References opengl2_overlay_t::extent_height, opengl2_overlay_t::extent_width, mem_frame_t::height, opengl2_driver_t::num_ovls, opengl2_rect_scale(), opengl2_rect_set(), opengl2_driver_t::overlays, opengl2_driver_t::ovl_vid_scale, opengl2_driver_t::ovls_drawn, opengl2_overlay_t::tex, opengl2_overlay_t::tex_h, opengl2_overlay_t::tex_w, opengl2_overlay_t::unscaled, opengl2_overlay_t::vid_scale, mem_frame_t::width, opengl2_rect_t::x1, opengl2_rect_t::x2, opengl2_rect_t::y1, and opengl2_rect_t::y2.

Referenced by opengl2_draw().

## ◆ opengl2_draw_unscaled_overlays()

static void opengl2_draw_unscaled_overlays | ( | opengl2_driver_t * | that | ) |
| static

References _x_vo_scale_map(), opengl2_overlay_t::extent_height, opengl2_overlay_t::extent_width, vo_scale_map_t::in, opengl2_driver_t::num_ovls, vo_scale_map_t::out, opengl2_driver_t::overlays, opengl2_overlay_t::ovl_h, opengl2_overlay_t::ovl_w, opengl2_overlay_t::ovl_x, opengl2_overlay_t::ovl_y, opengl2_driver_t::ovls_drawn, opengl2_driver_t::sc, opengl2_overlay_t::tex, opengl2_overlay_t::unscaled, VO_SCALE_MAP_OK, vo_scale_map_t::x0, vo_scale_map_t::x1, vo_scale_map_t::y0, and vo_scale_map_t::y1.

Referenced by opengl2_draw().

## ◆ opengl2_draw_video_bicubic()

static int opengl2_draw_video_bicubic | ( | opengl2_driver_t * | that,
|  | const opengl2_draw_info_t * | info
| ) |  |
| static

References _config_texture(), opengl2_program_t::args, opengl2_driver_t::bicubic, CATMULLROM_SPLINE, opengl2_draw_info_t::dh, opengl2_draw_info_t::dw, opengl2_draw_info_t::dx1, opengl2_draw_info_t::dx2, opengl2_draw_info_t::dy1, opengl2_draw_info_t::dy2, opengl2_driver_t::fbo, opengl2_draw_info_t::guih, opengl2_draw_info_t::guiw, LOG_MODULE, opengl2_driver_t::lut_texture, OGL2_BC_FBO, OGL2_BC_LUT, OGL2_BC_PROG_1, OGL2_BC_PROG_2, opengl2_setup_bicubic(), opengl2_driver_t::pass1_program, opengl2_driver_t::pass1_tex_h, opengl2_driver_t::pass1_tex_w, opengl2_driver_t::pass1_texture, opengl2_driver_t::pass2_program, opengl2_program_t::program, opengl2_draw_info_t::sx1, opengl2_draw_info_t::sx2, opengl2_draw_info_t::sy1, opengl2_draw_info_t::sy2, opengl2_draw_info_t::video_texture, opengl2_driver_t::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by opengl2_draw().

## ◆ opengl2_draw_video_bilinear()

static void opengl2_draw_video_bilinear | ( | opengl2_driver_t * | that,
|  | const opengl2_draw_info_t * | info
| ) |  |
| static

References opengl2_draw_info_t::dx1, opengl2_draw_info_t::dx2, opengl2_draw_info_t::dy1, opengl2_draw_info_t::dy2, opengl2_draw_info_t::guih, opengl2_draw_info_t::guiw, opengl2_draw_info_t::sx1, opengl2_draw_info_t::sx2, opengl2_draw_info_t::sy1, opengl2_draw_info_t::sy2, and opengl2_draw_info_t::video_texture.

Referenced by opengl2_draw().

## ◆ opengl2_draw_video_cubic_x()

static int opengl2_draw_video_cubic_x | ( | opengl2_driver_t * | that,
|  | const opengl2_draw_info_t * | info
| ) |  |
| static

References opengl2_program_t::args, opengl2_driver_t::bicubic, CATMULLROM_SPLINE, opengl2_draw_info_t::dx1, opengl2_draw_info_t::dx2, opengl2_draw_info_t::dy1, opengl2_draw_info_t::dy2, opengl2_draw_info_t::guih, opengl2_draw_info_t::guiw, opengl2_driver_t::lut_texture, OGL2_BC_LUT, OGL2_BC_PROG_1, opengl2_setup_bicubic(), opengl2_driver_t::pass1_program, opengl2_program_t::program, opengl2_draw_info_t::sx1, opengl2_draw_info_t::sx2, opengl2_draw_info_t::sy1, opengl2_draw_info_t::sy2, and opengl2_draw_info_t::video_texture.

Referenced by opengl2_draw().

## ◆ opengl2_draw_video_cubic_y()

static int opengl2_draw_video_cubic_y | ( | opengl2_driver_t * | that,
|  | const opengl2_draw_info_t * | info
| ) |  |
| static

References opengl2_program_t::args, opengl2_driver_t::bicubic, CATMULLROM_SPLINE, opengl2_draw_info_t::dx1, opengl2_draw_info_t::dx2, opengl2_draw_info_t::dy1, opengl2_draw_info_t::dy2, opengl2_draw_info_t::guih, opengl2_draw_info_t::guiw, opengl2_driver_t::lut_texture, OGL2_BC_LUT, OGL2_BC_PROG_2, opengl2_setup_bicubic(), opengl2_driver_t::pass2_program, opengl2_program_t::program, opengl2_draw_info_t::sx1, opengl2_draw_info_t::sx2, opengl2_draw_info_t::sy1, opengl2_draw_info_t::sy2, and opengl2_draw_info_t::video_texture.

Referenced by opengl2_draw().

## ◆ opengl2_draw_video_simple()

static int opengl2_draw_video_simple | ( | opengl2_driver_t * | that,
|  | const opengl2_draw_info_t * | info
| ) |  |
| static

References opengl2_draw_info_t::dx1, opengl2_draw_info_t::dx2, opengl2_draw_info_t::dy1, opengl2_draw_info_t::dy2, opengl2_draw_info_t::guih, opengl2_draw_info_t::guiw, opengl2_draw_info_t::sx1, opengl2_draw_info_t::sx2, opengl2_draw_info_t::sy1, opengl2_draw_info_t::sy2, and opengl2_draw_info_t::video_texture.

Referenced by opengl2_draw().

## ◆ opengl2_exit()

static void opengl2_exit | ( | void |  | ) |
| static

References MAX_EXIT_TARGETS, NULL, and opengl2_exit_vector.

Referenced by opengl2_exit_register().

## ◆ opengl2_exit_register()

static void opengl2_exit_register | ( | opengl2_driver_t * | this | ) |
| static

References MAX_EXIT_TARGETS, opengl2_exit(), and opengl2_exit_vector.

Referenced by opengl2_display_frame().

## ◆ opengl2_exit_unregister()

static void opengl2_exit_unregister | ( | opengl2_driver_t * | this | ) |
| static

References MAX_EXIT_TARGETS, NULL, and opengl2_exit_vector.

Referenced by opengl2_dispose().

## ◆ opengl2_get_capabilities()

static uint32_t opengl2_get_capabilities | ( | vo_driver_t * | this_gen | ) |
| static

References VO_CAP_ARGB_LAYER_OVERLAY, VO_CAP_BRIGHTNESS, VO_CAP_COLOR_MATRIX, VO_CAP_CONTRAST, VO_CAP_CROP, VO_CAP_CUSTOM_EXTENT_OVERLAY, VO_CAP_FULLRANGE, VO_CAP_HUE, VO_CAP_SATURATION, VO_CAP_SHARPNESS, VO_CAP_UNSCALED_OVERLAY, VO_CAP_YUY2, VO_CAP_YV12, and VO_CAP_YV12_DEEP.

Referenced by opengl2_open_plugin().

## ◆ opengl2_get_property()

static int opengl2_get_property | ( | vo_driver_t * | this_gen,
|  | int | property
| ) |  |
| static

References contrast, VO_CAP2_ACCEL_GENERIC, VO_CAP2_NV12, VO_CAP2_TRANSFORM, VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_CAPS2, VO_PROP_CONTRAST, VO_PROP_HUE, VO_PROP_MAX_NUM_FRAMES, VO_PROP_MAX_VIDEO_HEIGHT, VO_PROP_MAX_VIDEO_WIDTH, VO_PROP_OUTPUT_HEIGHT, VO_PROP_OUTPUT_WIDTH, VO_PROP_OUTPUT_XOFFSET, VO_PROP_OUTPUT_YOFFSET, VO_PROP_SATURATION, VO_PROP_SHARPNESS, VO_PROP_TRANSFORM, VO_PROP_WINDOW_HEIGHT, VO_PROP_WINDOW_WIDTH, VO_PROP_ZOOM_X, and VO_PROP_ZOOM_Y.

Referenced by opengl2_open_plugin().

## ◆ opengl2_get_property_min_max()

static void opengl2_get_property_min_max | ( | vo_driver_t * | this_gen,
|  | int | property,
|  | int * | min,
|  | int * | max
| ) |  |
| static

References VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, VO_PROP_HUE, VO_PROP_SATURATION, and VO_PROP_SHARPNESS.

Referenced by opengl2_open_plugin().

## ◆ opengl2_gui_data_exchange()

static int opengl2_gui_data_exchange | ( | vo_driver_t * | this_gen,
|  | int | data_type,
|  | void * | data
| ) |  |
| static

References _x_vo_scale_translate_gui2video(), x11_rectangle_t::h, x11_rectangle_t::w, x11_rectangle_t::x, XINE_GUI_SEND_COMPLETION_EVENT, XINE_GUI_SEND_DRAWABLE_CHANGED, XINE_GUI_SEND_EXPOSE_EVENT, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, and x11_rectangle_t::y.

Referenced by opengl2_open_plugin().

## ◆ opengl2_init_class()

static void * opengl2_init_class | ( | xine_t * | xine,
|  | unsigned | visual_type,
|  | const void * | visual_gen
| ) |  |
| static

References default_video_driver_class_dispose, video_driver_class_s::description, video_driver_class_s::dispose, opengl2_class_t::driver_class, video_driver_class_s::identifier, N_, NULL, video_driver_class_s::open_plugin, opengl2_check_platform(), opengl2_open_plugin(), opengl2_class_t::texture_float, opengl2_class_t::texture_rg, opengl2_class_t::visual_type, and opengl2_class_t::xine.

Referenced by opengl2_init_class_wl(), and opengl2_init_class_x11().

## ◆ opengl2_init_class_wl()

static void * opengl2_init_class_wl | ( | xine_t * | xine,
|  | const void * | visual_gen
| ) |  |
| static

References opengl2_init_class(), opengl2_class_t::xine, and XINE_VISUAL_TYPE_WAYLAND.

## ◆ opengl2_init_class_x11()

static void * opengl2_init_class_x11 | ( | xine_t * | xine,
|  | const void * | visual_gen
| ) |  |
| static

References opengl2_init_class(), opengl2_class_t::xine, and XINE_VISUAL_TYPE_X11.

## ◆ opengl2_open_plugin()

static vo_driver_t * opengl2_open_plugin | ( | video_driver_class_t * | class_gen,
|  | const void * | visual_gen
| ) |  |
| static

References _, _x_hwdec_new(), _x_load_gl(), _x_vo_scale_init(), xine_s::config, contrast, x11_visual_t::dest_size_cb, x11_visual_t::display, xine_wayland_visual_t::display, x11_visual_t::frame_output_cb, xine_wayland_visual_t::frame_output_cb, GL_RED, GL_RG, INITHEIGHT, INITWIDTH, LOG_MODULE, mem_frame_update_frame_format(), NULL, nv12_args, nv12_frag, OGL2_cscs_NONE, OGL2_cscs_nv12, OGL2_cscs_yuv420, OGL2_cscs_yuv420j, OGL2_cscs_yuv422, OGL2_TEX_u, OGL2_TEX_u_v, OGL2_TEX_uv, OGL2_TEX_v, OGL2_TEX_VIDEO_0, OGL2_TEX_VIDEO_1, OGL2_TEX_y, OGL2_TEX_yuv, opengl2_accel_lock(), opengl2_alloc_frame(), opengl2_build_program(), opengl2_check_textures_size(), opengl2_display_frame(), opengl2_dispose(), opengl2_get_capabilities(), opengl2_get_property(), opengl2_get_property_min_max(), opengl2_gui_data_exchange(), opengl2_overlay_begin(), opengl2_overlay_blend(), opengl2_overlay_end(), opengl2_redraw_needed(), opengl2_set_bicubic(), opengl2_set_property(), config_values_s::register_bool, opengl2_class_t::texture_float, x11_visual_t::user_data, xine_wayland_visual_t::user_data, v, config_values_s::xine, opengl2_class_t::xine, XINE_GL_API_OPENGL, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XINE_VISUAL_TYPE_X11, XINE_VO_ASPECT_AUTO, XINE_VORAW_MAX_OVL, xprintf, yuv420_args, yuv420_frag, yuv420j_args, yuv420j_frag, yuv422_args, and yuv422_frag.

Referenced by opengl2_init_class().

## ◆ opengl2_overlay_begin()

static void opengl2_overlay_begin | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | int | changed
| ) |  |
| static

Referenced by opengl2_open_plugin().

## ◆ opengl2_overlay_blend()

static void opengl2_overlay_blend | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | vo_overlay_t * | overlay
| ) |  |
| static

References _x_overlay_clut_yuv2rgb(), vo_overlay_s::argb_layer, vo_overlay_s::extent_height, opengl2_overlay_t::extent_height, vo_overlay_s::extent_width, opengl2_overlay_t::extent_width, vo_overlay_s::height, vo_overlay_s::hili_rgb_clut, opengl2_upload_overlay(), opengl2_overlay_t::ovl_h, opengl2_overlay_t::ovl_w, opengl2_overlay_t::ovl_x, opengl2_overlay_t::ovl_y, vo_overlay_s::rgb_clut, vo_overlay_s::rle, vo_overlay_s::unscaled, opengl2_overlay_t::unscaled, opengl2_overlay_t::vid_scale, vo_overlay_s::width, vo_overlay_s::x, XINE_VORAW_MAX_OVL, and vo_overlay_s::y.

Referenced by opengl2_open_plugin().

## ◆ opengl2_overlay_end()

static void opengl2_overlay_end | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | vo_img
| ) |  |
| static

References XINE_VORAW_MAX_OVL.

Referenced by opengl2_open_plugin().

## ◆ opengl2_rect_scale()

static void opengl2_rect_scale | ( | opengl2_rect_t * | r,
|  | float | fx,
|  | float | fy
| ) |  |
| static

References opengl2_rect_t::x1, opengl2_rect_t::x2, opengl2_rect_t::y1, and opengl2_rect_t::y2.

Referenced by opengl2_draw_scaled_overlays().

## ◆ opengl2_rect_set()

static void opengl2_rect_set | ( | opengl2_rect_t * | r,
|  | opengl2_overlay_t * | o
| ) |  |
| static

References opengl2_overlay_t::ovl_h, opengl2_overlay_t::ovl_w, opengl2_overlay_t::ovl_x, opengl2_overlay_t::ovl_y, opengl2_rect_t::x1, opengl2_rect_t::x2, opengl2_rect_t::y1, and opengl2_rect_t::y2.

Referenced by opengl2_draw_scaled_overlays().

## ◆ opengl2_redraw_needed()

static int opengl2_redraw_needed | ( | vo_driver_t * | this_gen | ) |
| static

References _x_vo_scale_compute_ideal_size(), _x_vo_scale_compute_output_size(), and _x_vo_scale_redraw_needed().

Referenced by opengl2_display_frame(), and opengl2_open_plugin().

## ◆ opengl2_set_bicubic()

static void opengl2_set_bicubic | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References LOG_MODULE, xine_cfg_entry_s::num_value, opengl2_driver_t::scale, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by opengl2_open_plugin().

## ◆ opengl2_set_property()

static int opengl2_set_property | ( | vo_driver_t * | this_gen,
|  | int | property,
|  | int | value
| ) |  |
| static

References _x_vo_scale_compute_ideal_size(), contrast, VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, VO_PROP_HUE, VO_PROP_SATURATION, VO_PROP_SHARPNESS, VO_PROP_TRANSFORM, VO_PROP_ZOOM_X, VO_PROP_ZOOM_Y, XINE_VO_ASPECT_AUTO, XINE_VO_ASPECT_NUM_RATIOS, XINE_VO_TRANSFORM_FLIP_H, XINE_VO_TRANSFORM_FLIP_V, XINE_VO_ZOOM_MAX, XINE_VO_ZOOM_MIN, and XINE_VO_ZOOM_STEP.

Referenced by opengl2_open_plugin().

## ◆ opengl2_setup_bicubic()

static int opengl2_setup_bicubic | ( | opengl2_driver_t * | that,
|  | uint32_t | flags
| ) |  |
| inlinestatic

References _opengl2_setup_bicubic(), opengl2_driver_t::bicubic, and opengl2_driver_t::flags.

Referenced by opengl2_draw_video_bicubic(), opengl2_draw_video_cubic_x(), and opengl2_draw_video_cubic_y().

## ◆ opengl2_sharpness()

static GLuint opengl2_sharpness | ( | opengl2_driver_t * | that,
|  | opengl2_frame_t * | frame,
|  | GLuint | video_texture
| ) |  |
| static

References opengl2_program_t::args, blur_sharpen_args, blur_sharpen_frag, opengl2_program_t::compiled, opengl2_driver_t::corn, mem_frame_t::height, opengl2_driver_t::mid, opengl2_build_program(), opengl2_swap_textures(), opengl2_program_t::program, opengl2_driver_t::program, opengl2_driver_t::sharp, opengl2_driver_t::side, and mem_frame_t::width.

Referenced by opengl2_draw().

## ◆ opengl2_swap_textures()

static GLuint opengl2_swap_textures | ( | opengl2_driver_t * | that,
|  | GLuint | current_dest
| ) |  |
| static

References OGL2_TEX_VIDEO_0, OGL2_TEX_VIDEO_1, opengl2_yuvtex_t::tex, and opengl2_driver_t::yuvtex.

Referenced by opengl2_sharpness().

## ◆ opengl2_update_csc_matrix()

static void opengl2_update_csc_matrix | ( | opengl2_driver_t * | that,
|  | opengl2_frame_t * | frame,
|  | int | input_scale
| ) |  |
| static

References opengl2_driver_t::brightness, cm_names, opengl2_driver_t::color_standard, contrast, opengl2_driver_t::contrast, opengl2_driver_t::csc_matrix, opengl2_driver_t::hue, opengl2_driver_t::input_scale, LOG_MODULE, opengl2_driver_t::saturation, opengl2_driver_t::update_csc, mem_frame_t::vo_frame, opengl2_driver_t::xine, XINE_VERBOSITY_LOG, and xprintf.

Referenced by opengl2_draw().

## ◆ opengl2_update_overlays()

static void opengl2_update_overlays | ( | opengl2_driver_t * | that | ) |
| static

References opengl2_driver_t::num_ovls, opengl2_driver_t::overlays, opengl2_driver_t::ovl_changed, opengl2_overlay_t::ovl_h, opengl2_driver_t::ovl_vid_scale, opengl2_overlay_t::ovl_w, and opengl2_overlay_t::vid_scale.

Referenced by opengl2_draw().

## ◆ opengl2_upload_overlay()

static void opengl2_upload_overlay | ( | opengl2_driver_t * | this,
|  | opengl2_overlay_t * | o,
|  | vo_overlay_t * | overlay
| ) |  |
| static

References _x_overlay_to_argb32(), vo_overlay_s::argb_layer, argb_layer_s::buffer, LOG_MODULE, argb_layer_s::mutex, NULL, opengl2_overlay_t::ovl_h, opengl2_overlay_t::ovl_w, vo_overlay_s::rle, opengl2_overlay_t::tex, opengl2_overlay_t::tex_h, opengl2_overlay_t::tex_w, XINE_VERBOSITY_LOG, and xprintf.

Referenced by opengl2_overlay_blend().

## ◆ opengl2_use_csc()

static GLuint opengl2_use_csc | ( | opengl2_driver_t * | that,
|  | opengl2_csc_shader_t | what
| ) |  |
| static

References opengl2_program_t::args, opengl2_driver_t::csc_matrix, opengl2_driver_t::csc_shaders, opengl2_driver_t::last_csc_shader, LOG_MODULE, opengl2_program_t::name, opengl2_program_t::program, opengl2_driver_t::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by opengl2_draw().

## Variable Documentation

## ◆ bicubic_pass1_args

const char* const bicubic_pass1_args[] = {"ARB", "tex", "lut", "spline", NULL}
| static

Referenced by _opengl2_setup_bicubic().

## ◆ bicubic_pass1_frag

const char* bicubic_pass1_frag
| static

Initial value:
=
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect tex, lut;\n"
"uniform float spline;\n"
"void main() {\n"
" vec2 coord = gl_TexCoord[0].xy;\n"
" vec2 TexCoord = vec2( floor( coord.x - 0.5 ) + 0.5, coord.y );\n"
" vec4 wlut = texture2DRect( lut, vec2( ( coord.x - TexCoord.x ) * 1000.0, spline ) );\n"
" vec4 sum = texture2DRect( tex, TexCoord + vec2( -1.0, 0.0) ) * wlut[0];\n"
" sum += texture2DRect( tex, TexCoord ) * wlut[1];\n"
" sum += texture2DRect( tex, TexCoord + vec2( 1.0, 0.0) ) * wlut[2];\n"
" sum += texture2DRect( tex, TexCoord + vec2( 2.0, 0.0) ) * wlut[3];\n"
" gl_FragColor = sum;\n"
"}\n"

Referenced by _opengl2_setup_bicubic().

## ◆ bicubic_pass2_args

const char* const bicubic_pass2_args[] = {"ARB", "tex", "lut", "spline", NULL}
| static

Referenced by _opengl2_setup_bicubic().

## ◆ bicubic_pass2_frag

const char* bicubic_pass2_frag
| static

Initial value:
=
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect tex, lut;\n"
"uniform float spline;\n"
"void main() {\n"
" vec2 coord = gl_TexCoord[0].xy;\n"
" vec2 TexCoord = vec2( coord.x, floor( coord.y - 0.5 ) + 0.5 );\n"
" vec4 wlut = texture2DRect( lut, vec2( ( coord.y - TexCoord.y ) * 1000.0, spline ) );\n"
" vec4 sum = texture2DRect( tex, TexCoord + vec2( 0.0, -1.0 ) ) * wlut[0];\n"
" sum += texture2DRect( tex, TexCoord ) * wlut[1];\n"
" sum += texture2DRect( tex, TexCoord + vec2( 0.0, 1.0 ) ) * wlut[2];\n"
" sum += texture2DRect( tex, TexCoord + vec2( 0.0, 2.0 ) ) * wlut[3];\n"
" gl_FragColor = sum;\n"
"}\n"

Referenced by _opengl2_setup_bicubic().

## ◆ blur_sharpen_args

const char* const blur_sharpen_args[] = {"ARB", "tex", "mid", "side", "corn", NULL}
| static

Referenced by opengl2_sharpness().

## ◆ blur_sharpen_frag

const char* blur_sharpen_frag
| static

Initial value:
=
"#extension GL_ARB_texture_rectangle : enable\n"
"uniform sampler2DRect tex;\n"
"uniform float mid, side, corn;\n"
"void main() {\n"
" vec2 pos = gl_TexCoord[0].xy;\n"
" vec4 c1;\n"
" c1 = texture2DRect (tex, pos) * mid\n"
" + (texture2DRect (tex, pos + vec2 (-1.0, 0.0))\n"
" + texture2DRect (tex, pos + vec2 ( 0.0, -1.0))\n"
" + texture2DRect (tex, pos + vec2 ( 1.0, 0.0))\n"
" + texture2DRect (tex, pos + vec2 ( 0.0, 1.0))) * side\n"
" + (texture2DRect (tex, pos + vec2 (-1.0, -1.0))\n"
" + texture2DRect (tex, pos + vec2 ( 1.0, -1.0))\n"
" + texture2DRect (tex, pos + vec2 (-1.0, 1.0))\n"
" + texture2DRect (tex, pos + vec2 ( 1.0, 1.0))) * corn;\n"
" gl_FragColor = c1 ;\n"
"}\n"

Referenced by opengl2_sharpness().

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_VIDEO_OUT, 22, "opengl2", XINE_VERSION_CODE, &vo_info_opengl2, opengl2_init_class_x11 },
{ PLUGIN_VIDEO_OUT, 22, "opengl2", XINE_VERSION_CODE, &vo_info_opengl2_wl, opengl2_init_class_wl },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
opengl2_init_class_x11
static void * opengl2_init_class_x11(xine_t *xine, const void *visual_gen)
Definition: video_out_opengl2.c:2082
opengl2_init_class_wl
static void * opengl2_init_class_wl(xine_t *xine, const void *visual_gen)
Definition: video_out_opengl2.c:2086
vo_info_opengl2
static const vo_info_t vo_info_opengl2
Definition: video_out_opengl2.c:2090
vo_info_opengl2_wl
static const vo_info_t vo_info_opengl2_wl
Definition: video_out_opengl2.c:2095
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_VIDEO_OUT
#define PLUGIN_VIDEO_OUT
Definition: xine_plugin.h:36

## ◆ nv12_args

const char* const nv12_args[] = {"r_coefs", "g_coefs", "b_coefs", "texY", "texUV", NULL}
| static

Referenced by opengl2_open_plugin().

## ◆ opengl2_exit_vector

opengl2_driver_t* opengl2_exit_vector[8]

Initial value:
=
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}

Referenced by opengl2_exit(), opengl2_exit_register(), and opengl2_exit_unregister().

## ◆ vo_info_opengl2

const vo_info_t vo_info_opengl2
| static

Initial value:
= {
.priority = 8,
.visual_type = XINE_VISUAL_TYPE_X11,
}
XINE_VISUAL_TYPE_X11
#define XINE_VISUAL_TYPE_X11
Definition: xine.h:154

## ◆ vo_info_opengl2_wl

const vo_info_t vo_info_opengl2_wl
| static

Initial value:
= {
.priority = 8,
.visual_type = XINE_VISUAL_TYPE_WAYLAND,
}
XINE_VISUAL_TYPE_WAYLAND
#define XINE_VISUAL_TYPE_WAYLAND
Definition: xine.h:166

## ◆ yuv420_args

const char* const yuv420_args[] = {"r_coefs", "g_coefs", "b_coefs", "texY", "texU", "texV", NULL}
| static

Referenced by opengl2_open_plugin().

## ◆ yuv420_frag

const char* yuv420_frag
| static

Initial value:
=
"uniform sampler2D texY, texU, texV;\n"
"uniform vec4 r_coefs, g_coefs, b_coefs;\n"
"void main(void) {\n"
" vec4 rgb;\n"
" vec4 yuv;\n"
" vec2 coord = gl_TexCoord[0].xy;\n"
" yuv.r = texture2D (texY, coord).r;\n"
" yuv.g = texture2D (texU, coord).r;\n"
" yuv.b = texture2D (texV, coord).r;\n"
" yuv.a = 1.0;\n"
" rgb.r = dot (yuv, r_coefs);\n"
" rgb.g = dot (yuv, g_coefs);\n"
" rgb.b = dot (yuv, b_coefs);\n"
" rgb.a = 1.0;\n"
" gl_FragColor = rgb;\n"
"}\n"

Referenced by opengl2_open_plugin().

## ◆ yuv420j_args

const char* const yuv420j_args[] = {"r_coefs", "g_coefs", "b_coefs", "texY", "tex_U_V", NULL}
| static

Referenced by opengl2_open_plugin().

## ◆ yuv420j_frag

const char* yuv420j_frag
| static

Initial value:
=
"uniform sampler2D texY, tex_U_V;\n"
"uniform vec4 r_coefs, g_coefs, b_coefs;\n"
"void main(void) {\n"
" vec4 rgb;\n"
" vec4 yuv;\n"
" vec2 coord_y = gl_TexCoord[0].xy;\n"
" vec2 coord_u_v = coord_y * vec2 (1.0, 0.5);\n"
" yuv.r = texture2D (texY, coord_y).r;\n"
" yuv.g = texture2D (tex_U_V, coord_u_v).r;\n"
" yuv.b = texture2D (tex_U_V, coord_u_v + vec2 (0.0, 0.5)).r;\n"
" yuv.a = 1.0;\n"
" rgb.r = dot (yuv, r_coefs);\n"
" rgb.g = dot (yuv, g_coefs);\n"
" rgb.b = dot (yuv, b_coefs);\n"
" rgb.a = 1.0;\n"
" gl_FragColor = rgb;\n"
"}\n"

Referenced by opengl2_open_plugin().

## ◆ yuv422_args

const char* const yuv422_args[] = {"r_coefs", "g_coefs", "b_coefs", "texYUV", "yuy2vals", NULL}
| static

Referenced by opengl2_open_plugin().