17
17
* along with this program; if not, write to the Free Software
18
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20
* $Id: video_out_xshm.c,v 1.138 2004/12/12 22:01:29 mroi Exp $
20
* $Id: video_out_xshm.c,v 1.142 2005/09/25 00:44:04 miguelfreitas Exp $
22
22
* video_out_xshm.c, X11 shared memory extension interface for xine
608
607
overlay->rgb_clut++;
610
if (!overlay->clip_rgb_clut) {
611
clut = (clut_t*) overlay->clip_color;
609
if (!overlay->hili_rgb_clut) {
610
clut = (clut_t*) overlay->hili_color;
612
611
for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) {
613
612
*((uint32_t *)&clut[i]) =
614
613
frame->yuv2rgb->yuv2rgb_single_pixel_fun(frame->yuv2rgb,
615
614
clut[i].y, clut[i].cb, clut[i].cr);
617
overlay->clip_rgb_clut++;
616
overlay->hili_rgb_clut++;
629
628
x11osd_clear(this->xoverlay);
630
629
XUnlockDisplay (this->display);
632
this->alphablend_extra_data.offset_x = frame_gen->overlay_offset_x;
633
this->alphablend_extra_data.offset_y = frame_gen->overlay_offset_y;
634
636
static void xshm_overlay_end (vo_driver_t *this_gen, vo_frame_t *vo_img) {
657
659
XUnlockDisplay (this->display);
660
if (!overlay->rgb_clut || !overlay->clip_rgb_clut)
662
if (!overlay->rgb_clut || !overlay->hili_rgb_clut)
661
663
xshm_overlay_clut_yuv2rgb (this, overlay, frame);
663
665
switch (this->bpp) {
665
blend_rgb16 ((uint8_t *)frame->image->data, overlay,
667
_x_blend_rgb16 ((uint8_t *)frame->image->data, overlay,
666
668
frame->sc.output_width, frame->sc.output_height,
667
669
frame->sc.delivered_width, frame->sc.delivered_height,
668
670
&this->alphablend_extra_data);
671
blend_rgb24 ((uint8_t *)frame->image->data, overlay,
673
_x_blend_rgb24 ((uint8_t *)frame->image->data, overlay,
672
674
frame->sc.output_width, frame->sc.output_height,
673
675
frame->sc.delivered_width, frame->sc.delivered_height,
674
676
&this->alphablend_extra_data);
677
blend_rgb32 ((uint8_t *)frame->image->data, overlay,
679
_x_blend_rgb32 ((uint8_t *)frame->image->data, overlay,
678
680
frame->sc.output_width, frame->sc.output_height,
679
681
frame->sc.delivered_width, frame->sc.delivered_height,
680
682
&this->alphablend_extra_data);
1237
1239
this->yuv2rgb_mode = mode;
1238
1240
this->yuv2rgb_swap = swapped;
1239
this->yuv2rgb_brightness = config->register_range (config, "video.output.xshm_gamma", 0,
1241
_("brightness correction"),
1242
_("The brightness correction can be used to "
1243
"lighten or darken the image. It changes the "
1244
"blacklevel without modifying the contrast, "
1245
"but it limits the tonal range."),
1247
this->yuv2rgb_contrast = 128;
1241
this->yuv2rgb_brightness = 0;
1242
this->yuv2rgb_contrast = 128;
1248
1243
this->yuv2rgb_saturation = 128;
1250
1245
this->yuv2rgb_factory = yuv2rgb_factory_init (mode, swapped,
1307
1302
plugin_info_t xine_plugin_info[] = {
1308
1303
/* type, API, "name", version, special_info, init_function */
1309
{ PLUGIN_VIDEO_OUT, 20, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class },
1304
{ PLUGIN_VIDEO_OUT, 21, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class },
1310
1305
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }