summaryrefslogtreecommitdiff
path: root/src/video_out
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_out')
-rw-r--r--src/video_out/video_out_opengl2.c41
-rw-r--r--src/video_out/video_out_raw.c36
-rw-r--r--src/video_out/video_out_vaapi.c37
3 files changed, 3 insertions, 111 deletions
diff --git a/src/video_out/video_out_opengl2.c b/src/video_out/video_out_opengl2.c
index 145a039bc..4de8ccfec 100644
--- a/src/video_out/video_out_opengl2.c
+++ b/src/video_out/video_out_opengl2.c
@@ -47,8 +47,6 @@
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
-#include "yuv2rgb.h"
-
#ifdef HAVE_FFMPEG_AVUTIL_H
# include <mem.h>
#else
@@ -130,8 +128,6 @@ typedef struct {
int ovl_vid_scale;
int num_ovls;
opengl2_overlay_t overlays[XINE_VORAW_MAX_OVL];
- yuv2rgb_factory_t *yuv2rgb_factory;
- yuv2rgb_t *ovl_yuv2rgb;
opengl2_program_t sharpness_program;
float csc_matrix[3 * 4];
@@ -523,34 +519,6 @@ static int opengl2_check_textures_size( opengl2_driver_t *this_gen, int w, int h
return 1;
}
-
-
-static void opengl2_overlay_clut_yuv2rgb(opengl2_driver_t *this, vo_overlay_t *overlay, opengl2_frame_t *frame)
-{
- //fprintf(stderr, "opengl2_overlay_clut_yuv2rgb\n");
- int i;
- uint32_t *rgb;
-
- if (!overlay->rgb_clut) {
- rgb = overlay->color;
- for (i = sizeof (overlay->color) / sizeof (overlay->color[0]); i > 0; i--) {
- clut_t *yuv = (clut_t *)rgb;
- *rgb++ = this->ovl_yuv2rgb->yuv2rgb_single_pixel_fun (this->ovl_yuv2rgb, yuv->y, yuv->cb, yuv->cr);
- }
- overlay->rgb_clut++;
- }
-
- if (!overlay->hili_rgb_clut) {
- rgb = overlay->hili_color;
- for (i = sizeof (overlay->color) / sizeof (overlay->color[0]); i > 0; i--) {
- clut_t *yuv = (clut_t *)rgb;
- *rgb++ = this->ovl_yuv2rgb->yuv2rgb_single_pixel_fun (this->ovl_yuv2rgb, yuv->y, yuv->cb, yuv->cr);
- }
- overlay->hili_rgb_clut++;
- }
-}
-
-
static int opengl2_process_ovl( opengl2_driver_t *this_gen, vo_overlay_t *overlay )
{
//fprintf(stderr, "opengl2_process_ovl\n");
@@ -664,7 +632,6 @@ static void opengl2_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen,
static void opengl2_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
{
opengl2_driver_t *this = (opengl2_driver_t *) this_gen;
- opengl2_frame_t *frame = (opengl2_frame_t *) frame_gen;
if ( !this->ovl_changed || this->ovl_changed>XINE_VORAW_MAX_OVL )
return;
@@ -683,7 +650,7 @@ static void opengl2_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen,
else if (overlay->rle) {
if (!overlay->rgb_clut || !overlay->hili_rgb_clut)
- opengl2_overlay_clut_yuv2rgb(this, overlay, frame);
+ _x_overlay_clut_yuv2rgb(overlay);
if ( opengl2_process_ovl( this, overlay ) )
++this->ovl_changed;
}
@@ -1712,9 +1679,6 @@ static void opengl2_dispose( vo_driver_t *this_gen )
glXDestroyContext( this->display, this->context );
- this->ovl_yuv2rgb->dispose(this->ovl_yuv2rgb);
- this->yuv2rgb_factory->dispose (this->yuv2rgb_factory);
-
free (this);
}
@@ -1843,9 +1807,6 @@ static vo_driver_t *opengl2_open_plugin( video_driver_class_t *class_gen, const
this->ovl_changed = 0;
this->num_ovls = 0;
- this->yuv2rgb_factory = yuv2rgb_factory_init (MODE_24_BGR, 0, NULL);
- this->ovl_yuv2rgb = this->yuv2rgb_factory->create_converter( this->yuv2rgb_factory );
-
if ( this->texture_float ) {
this->scale_bicubic = config->register_bool( config, "video.output.opengl2_bicubic_scaling", 0,
_("opengl2: use a bicubic algo to scale the video"),
diff --git a/src/video_out/video_out_raw.c b/src/video_out/video_out_raw.c
index 4ca8b536a..702c7dc2e 100644
--- a/src/video_out/video_out_raw.c
+++ b/src/video_out/video_out_raw.c
@@ -85,7 +85,6 @@ typedef struct {
int ovl_changed;
raw_overlay_t overlays[XINE_VORAW_MAX_OVL];
- yuv2rgb_t *ovl_yuv2rgb;
int doYV12;
int doYUY2;
@@ -102,32 +101,6 @@ typedef struct {
} raw_class_t;
-
-static void raw_overlay_clut_yuv2rgb(raw_driver_t *this, vo_overlay_t *overlay, raw_frame_t *frame)
-{
- int i;
- uint32_t *rgb;
-
- if (!overlay->rgb_clut) {
- rgb = overlay->color;
- for (i = sizeof (overlay->color) / sizeof (overlay->color[0]); i > 0; i--) {
- clut_t *yuv = (clut_t *)rgb;
- *rgb++ = this->ovl_yuv2rgb->yuv2rgb_single_pixel_fun (frame->yuv2rgb, yuv->y, yuv->cb, yuv->cr);
- }
- overlay->rgb_clut++;
- }
-
- if (!overlay->hili_rgb_clut) {
- rgb = overlay->hili_color;
- for (i = sizeof (overlay->color) / sizeof (overlay->color[0]); i > 0; i--) {
- clut_t *yuv = (clut_t *)rgb;
- *rgb++ = this->ovl_yuv2rgb->yuv2rgb_single_pixel_fun (frame->yuv2rgb, yuv->y, yuv->cb, yuv->cr);
- }
- overlay->hili_rgb_clut++;
- }
-}
-
-
static int raw_process_ovl( raw_driver_t *this_gen, vo_overlay_t *overlay )
{
raw_overlay_t *ovl = &this_gen->overlays[this_gen->ovl_changed-1];
@@ -204,14 +177,13 @@ static void raw_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen, int
static void raw_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
{
raw_driver_t *this = (raw_driver_t *) this_gen;
- raw_frame_t *frame = (raw_frame_t *) frame_gen;
if ( !this->ovl_changed || this->ovl_changed>XINE_VORAW_MAX_OVL )
return;
if (overlay->rle) {
if (!overlay->rgb_clut || !overlay->hili_rgb_clut)
- raw_overlay_clut_yuv2rgb (this, overlay, frame);
+ _x_overlay_clut_yuv2rgb (overlay);
if ( raw_process_ovl( this, overlay ) )
++this->ovl_changed;
}
@@ -557,12 +529,6 @@ static vo_driver_t *raw_open_plugin (video_driver_class_t *class_gen, const void
}
this->ovl_changed = 0;
- /* we have to use a second converter for overlays
- * because "MODE_24_BGR, 1 (swap)" breaks overlays conversion */
- yuv2rgb_factory_t *factory = yuv2rgb_factory_init (MODE_24_BGR, 0, NULL);
- this->ovl_yuv2rgb = factory->create_converter( factory );
- factory->dispose( factory );
-
return &this->vo_driver;
}
diff --git a/src/video_out/video_out_vaapi.c b/src/video_out/video_out_vaapi.c
index a234fa133..af759c2ff 100644
--- a/src/video_out/video_out_vaapi.c
+++ b/src/video_out/video_out_vaapi.c
@@ -45,7 +45,6 @@
#include <X11/cursorfont.h>
#include <time.h>
#include <unistd.h>
-#include "yuv2rgb.h"
#define LOG_MODULE "video_out_vaapi"
#define LOG_VERBOSE
@@ -234,9 +233,6 @@ struct vaapi_driver_s {
uint32_t overlay_unscaled_height;
vaapi_rect_t overlay_unscaled_dirty_rect;
- yuv2rgb_factory_t *yuv2rgb_factory;
- yuv2rgb_t *ovl_yuv2rgb;
-
/* all scaling information goes here */
vo_scale_t sc;
@@ -2506,30 +2502,6 @@ static int vaapi_ovl_associate(vo_driver_t *this_gen, int format, int bShow) {
return 0;
}
-static void vaapi_overlay_clut_yuv2rgb(vaapi_driver_t *this, vo_overlay_t *overlay, vaapi_frame_t *frame)
-{
- int i;
- uint32_t *rgb;
-
- if (!overlay->rgb_clut) {
- rgb = overlay->color;
- for (i = sizeof (overlay->color) / sizeof (overlay->color[0]); i > 0; i--) {
- clut_t *yuv = (clut_t *)rgb;
- *rgb++ = this->ovl_yuv2rgb->yuv2rgb_single_pixel_fun (this->ovl_yuv2rgb, yuv->y, yuv->cb, yuv->cr);
- }
- overlay->rgb_clut++;
- }
-
- if (!overlay->hili_rgb_clut) {
- rgb = overlay->hili_color;
- for (i = sizeof (overlay->color) / sizeof (overlay->color[0]); i > 0; i--) {
- clut_t *yuv = (clut_t *)rgb;
- *rgb++ = this->ovl_yuv2rgb->yuv2rgb_single_pixel_fun (this->ovl_yuv2rgb, yuv->y, yuv->cb, yuv->cr);
- }
- overlay->hili_rgb_clut++;
- }
-}
-
static void vaapi_overlay_begin (vo_driver_t *this_gen,
vo_frame_t *frame_gen, int changed) {
vaapi_driver_t *this = (vaapi_driver_t *) this_gen;
@@ -2752,7 +2724,7 @@ static void vaapi_overlay_end (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
continue;
if (!ovl->rgb_clut || !ovl->hili_rgb_clut)
- vaapi_overlay_clut_yuv2rgb (this, ovl, frame);
+ _x_overlay_clut_yuv2rgb (ovl);
bitmap = rgba = calloc(ovl->width * ovl->height * 4, sizeof(uint32_t));
@@ -3995,9 +3967,6 @@ static void vaapi_dispose_locked (vo_driver_t *this_gen) {
DO_LOCKDISPLAY;
- this->ovl_yuv2rgb->dispose(this->ovl_yuv2rgb);
- this->yuv2rgb_factory->dispose (this->yuv2rgb_factory);
-
vaapi_close(this_gen);
free(va_context);
@@ -4220,10 +4189,6 @@ static vo_driver_t *vaapi_open_plugin (video_driver_class_t *class_gen, const vo
this->capabilities = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_CROP | VO_CAP_UNSCALED_OVERLAY | VO_CAP_ARGB_LAYER_OVERLAY | VO_CAP_VAAPI | VO_CAP_CUSTOM_EXTENT_OVERLAY;
- /* overlay converter */
- this->yuv2rgb_factory = yuv2rgb_factory_init (MODE_24_BGR, 0, NULL);
- this->ovl_yuv2rgb = this->yuv2rgb_factory->create_converter( this->yuv2rgb_factory );
-
this->vo_driver.get_capabilities = vaapi_get_capabilities;
this->vo_driver.alloc_frame = vaapi_alloc_frame;
this->vo_driver.update_frame_format = vaapi_update_frame_format;