xine-lib 1.2.11
|
#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 "color_matrix.c"
Data Structures | |
struct | opengl2_frame_t |
struct | opengl2_overlay_t |
struct | opengl2_program_t |
struct | opengl2_yuvtex_t |
struct | opengl2_driver_t |
struct | opengl2_class_t |
struct | opengl2_rect_t |
Macros | |
#define | LOG_MODULE "video_out_opengl2" |
#define | GL_GLEXT_PROTOTYPES |
#define | MAX_EXIT_TARGETS 8 |
#define | CM_LUT |
#define | CM_HAVE_YCGCO_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 | INITWIDTH 720 |
#define | INITHEIGHT 576 |
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 float | compute_cos_spline (float x) |
static float | compute_catmullrom_spline (float x) |
static int | create_lut_texture (opengl2_driver_t *that) |
static void | load_csc_matrix (GLuint prog, float *cf) |
static int | opengl2_build_program (opengl2_driver_t *this, opengl2_program_t *prog, const char **source, const char *name) |
static void | opengl2_delete_program (opengl2_program_t *prog) |
static int | opengl2_check_textures_size (opengl2_driver_t *this_gen, int w, int h) |
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 void | opengl2_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src) |
static void | opengl2_frame_field (vo_frame_t *vo_img, int which_field) |
static void | opengl2_frame_dispose (vo_frame_t *vo_img) |
static vo_frame_t * | opengl2_alloc_frame (vo_driver_t *this_gen) |
static void | opengl2_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, double ratio, int format, int flags) |
static int | opengl2_redraw_needed (vo_driver_t *this_gen) |
static void | opengl2_update_csc_matrix (opengl2_driver_t *that, opengl2_frame_t *frame) |
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_draw_video_bicubic (opengl2_driver_t *that, int guiw, int guih, GLfloat u, GLfloat v, GLfloat u1, GLfloat v1, GLfloat x, GLfloat y, GLfloat x1, GLfloat y1, GLuint video_texture) |
static int | opengl2_draw_video_cubic_x (opengl2_driver_t *that, int guiw, int guih, GLfloat u, GLfloat v, GLfloat u1, GLfloat v1, GLfloat x, GLfloat y, GLfloat x1, GLfloat y1, GLuint video_texture) |
static int | opengl2_draw_video_cubic_y (opengl2_driver_t *that, int guiw, int guih, GLfloat u, GLfloat v, GLfloat u1, GLfloat v1, GLfloat x, GLfloat y, GLfloat x1, GLfloat y1, GLuint video_texture) |
static int | opengl2_draw_video_simple (opengl2_driver_t *that, int guiw, int guih, GLfloat u, GLfloat v, GLfloat u1, GLfloat v1, GLfloat x, GLfloat y, GLfloat x1, GLfloat y1, GLuint video_texture) |
static void | opengl2_draw_video_bilinear (opengl2_driver_t *that, int guiw, int guih, GLfloat u, GLfloat v, GLfloat u1, GLfloat v1, GLfloat x, GLfloat y, GLfloat x1, GLfloat y1, GLuint video_texture) |
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_driver_t * | opengl2_open_plugin (video_driver_class_t *class_gen, const void *visual_gen) |
static int | 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 * | bicubic_pass1_frag |
static const char * | bicubic_pass2_frag |
static const char * | blur_sharpen_frag |
static const char * | yuv420_frag |
static const char * | yuv422_frag |
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 |
#define CATMULLROM_SPLINE 0 |
#define CM_DRIVER_T opengl2_driver_t |
#define CM_HAVE_YCGCO_SUPPORT 1 |
#define CM_LUT |
#define COS_SPLINE 1 |
#define GL_GLEXT_PROTOTYPES |
#define INITHEIGHT 576 |
#define INITWIDTH 720 |
#define LOG_MODULE "video_out_opengl2" |
#define LUTWIDTH 1000 |
#define MAX_EXIT_TARGETS 8 |
#define N_SPLINES 2 |
|
static |
Referenced by create_lut_texture().
|
static |
Referenced by create_lut_texture().
|
static |
References opengl2_driver_t::bicubic_lut_texture, compute_catmullrom_spline(), compute_cos_spline(), LUTWIDTH, and N_SPLINES.
Referenced by opengl2_draw_video_bicubic(), opengl2_draw_video_cubic_x(), and opengl2_draw_video_cubic_y().
|
static |
Referenced by opengl2_draw().
|
static |
References vo_frame_s::base, vo_frame_s::dispose, vo_frame_s::driver, vo_frame_s::field, opengl2_frame_t::flags, opengl2_frame_t::format, opengl2_frame_t::height, vo_frame_s::mutex, NULL, opengl2_frame_dispose(), opengl2_frame_field(), opengl2_frame_proc_slice(), vo_frame_s::proc_frame, vo_frame_s::proc_slice, opengl2_frame_t::vo_frame, and opengl2_frame_t::width.
Referenced by opengl2_open_plugin().
|
static |
|
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, and XINE_GL_API_OPENGL.
Referenced by opengl2_init_class().
|
static |
References opengl2_yuvtex_t::height, NULL, opengl2_yuvtex_t::u, opengl2_yuvtex_t::v, opengl2_yuvtex_t::width, opengl2_yuvtex_t::y, and opengl2_yuvtex_t::yuv.
Referenced by opengl2_draw(), and opengl2_open_plugin().
|
static |
References opengl2_program_t::program, and opengl2_program_t::shader.
Referenced by opengl2_dispose().
|
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, opengl2_frame_t::height, opengl2_draw(), opengl2_exit_register(), opengl2_redraw_needed(), opengl2_frame_t::ratio, opengl2_frame_t::vo_frame, and opengl2_frame_t::width.
Referenced by opengl2_open_plugin().
|
static |
References _x_vo_scale_cleanup(), opengl2_delete_program(), opengl2_exit_unregister(), and XINE_VORAW_MAX_OVL.
Referenced by opengl2_open_plugin().
|
static |
References vo_frame_s::base, opengl2_driver_t::csc_matrix, vo_scale_s::displayed_height, vo_scale_s::displayed_width, vo_scale_s::displayed_xoffset, vo_scale_s::displayed_yoffset, opengl2_driver_t::fbo, opengl2_frame_t::format, opengl2_driver_t::gl, vo_scale_s::gui_height, vo_scale_s::gui_width, opengl2_frame_t::height, load_csc_matrix(), xine_gl::make_current, 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(), vo_scale_s::output_height, vo_scale_s::output_width, vo_scale_s::output_xoffset, vo_scale_s::output_yoffset, vo_frame_s::pitches, opengl2_program_t::program, xine_gl::release_current, opengl2_driver_t::sc, opengl2_driver_t::scale_bicubic, opengl2_driver_t::sharpness, xine_gl::swap_buffers, opengl2_yuvtex_t::u, opengl2_driver_t::update_sharpness, opengl2_yuvtex_t::v, opengl2_driver_t::videoPBO, opengl2_driver_t::videoTex, opengl2_frame_t::vo_frame, opengl2_frame_t::width, opengl2_driver_t::xine, xine_fast_memcpy, XINE_IMGFMT_YUY2, XINE_IMGFMT_YV12, XINE_VERBOSITY_LOG, xprintf, opengl2_yuvtex_t::y, opengl2_yuvtex_t::yuv, opengl2_driver_t::yuv420_program, opengl2_driver_t::yuv422_program, and opengl2_driver_t::yuvtex.
Referenced by opengl2_display_frame().
|
static |
References opengl2_overlay_t::extent_height, opengl2_overlay_t::extent_width, opengl2_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, opengl2_frame_t::width, opengl2_rect_t::x1, opengl2_rect_t::x2, opengl2_rect_t::y1, and opengl2_rect_t::y2.
Referenced by opengl2_draw().
|
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().
|
static |
References opengl2_driver_t::bicubic_fbo, opengl2_driver_t::bicubic_lut_texture, bicubic_pass1_frag, opengl2_driver_t::bicubic_pass1_program, opengl2_driver_t::bicubic_pass1_texture, opengl2_driver_t::bicubic_pass1_texture_height, opengl2_driver_t::bicubic_pass1_texture_width, bicubic_pass2_frag, opengl2_driver_t::bicubic_pass2_program, CATMULLROM_SPLINE, opengl2_program_t::compiled, create_lut_texture(), NULL, opengl2_build_program(), and opengl2_program_t::program.
Referenced by opengl2_draw().
|
static |
Referenced by opengl2_draw().
|
static |
|
static |
|
static |
Referenced by opengl2_draw().
|
static |
References MAX_EXIT_TARGETS, NULL, and opengl2_exit_vector.
Referenced by opengl2_exit_register().
|
static |
References MAX_EXIT_TARGETS, opengl2_exit(), and opengl2_exit_vector.
Referenced by opengl2_display_frame().
|
static |
References MAX_EXIT_TARGETS, NULL, and opengl2_exit_vector.
Referenced by opengl2_dispose().
|
static |
References vo_frame_s::base, vo_frame_s::mutex, opengl2_frame_t::vo_frame, and xine_free_aligned().
Referenced by opengl2_alloc_frame().
|
static |
Referenced by opengl2_alloc_frame().
|
static |
References vo_frame_s::proc_called.
Referenced by opengl2_alloc_frame().
|
static |
|
static |
References contrast, VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, 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_WINDOW_HEIGHT, VO_PROP_WINDOW_WIDTH, VO_PROP_ZOOM_X, and VO_PROP_ZOOM_Y.
Referenced by opengl2_open_plugin().
|
static |
References VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, VO_PROP_HUE, VO_PROP_SATURATION, and VO_PROP_SHARPNESS.
Referenced by opengl2_open_plugin().
|
static |
|
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::visual_type, and opengl2_class_t::xine.
Referenced by opengl2_init_class_wl(), and opengl2_init_class_x11().
|
static |
References opengl2_init_class(), opengl2_class_t::xine, and XINE_VISUAL_TYPE_WAYLAND.
|
static |
References opengl2_init_class(), opengl2_class_t::xine, and XINE_VISUAL_TYPE_X11.
|
static |
References _, _x_load_gl(), _x_vo_scale_init(), xine_s::config, contrast, x11_visual_t::dest_size_cb, x11_visual_t::frame_output_cb, xine_wayland_visual_t::frame_output_cb, INITHEIGHT, INITWIDTH, NULL, 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(), opengl2_update_frame_format(), config_values_s::register_bool, x11_visual_t::user_data, xine_wayland_visual_t::user_data, 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_frag, and yuv422_frag.
Referenced by opengl2_init_class().
|
static |
Referenced by opengl2_open_plugin().
|
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().
|
static |
References XINE_VORAW_MAX_OVL.
Referenced by opengl2_open_plugin().
|
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().
|
static |
|
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().
|
static |
References xine_cfg_entry_s::num_value, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by opengl2_open_plugin().
|
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_ZOOM_X, VO_PROP_ZOOM_Y, XINE_VO_ASPECT_AUTO, XINE_VO_ASPECT_NUM_RATIOS, XINE_VO_ZOOM_MAX, XINE_VO_ZOOM_MIN, and XINE_VO_ZOOM_STEP.
Referenced by opengl2_open_plugin().
|
static |
|
static |
References opengl2_driver_t::videoTex, and opengl2_driver_t::videoTex2.
Referenced by opengl2_sharpness().
|
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::saturation, opengl2_driver_t::update_csc, opengl2_frame_t::vo_frame, opengl2_driver_t::xine, XINE_VERBOSITY_LOG, and xprintf.
Referenced by opengl2_draw().
|
static |
References vo_frame_s::base, opengl2_frame_t::flags, opengl2_frame_t::format, height, opengl2_frame_t::height, NULL, vo_frame_s::pitches, opengl2_frame_t::ratio, opengl2_frame_t::vo_frame, vo_frame_s::width, width, opengl2_frame_t::width, xine_freep_aligned, XINE_IMGFMT_YUY2, XINE_IMGFMT_YV12, and xine_malloc_aligned().
Referenced by opengl2_open_plugin().
|
static |
|
static |
References _x_overlay_to_argb32(), vo_overlay_s::argb_layer, argb_layer_s::buffer, 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().
|
static |
Referenced by opengl2_draw_video_bicubic(), and opengl2_draw_video_cubic_x().
|
static |
Referenced by opengl2_draw_video_bicubic(), and opengl2_draw_video_cubic_y().
|
static |
Referenced by opengl2_sharpness().
const plugin_info_t xine_plugin_info [] EXPORTED |
opengl2_driver_t* opengl2_exit_vector[8] |
Referenced by opengl2_exit(), opengl2_exit_register(), and opengl2_exit_unregister().
|
static |
|
static |
|
static |
Referenced by opengl2_open_plugin().
|
static |
Referenced by opengl2_open_plugin().