summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_out/video_out_xshm.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 75df132b1..6d5ccb918 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xshm.c,v 1.54 2002/01/10 15:31:26 jcdutton Exp $
+ * $Id: video_out_xshm.c,v 1.55 2002/01/15 20:35:24 jcdutton Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -720,13 +720,23 @@ static void xshm_overlay_clut_yuv2rgb(xshm_driver_t *this, vo_overlay_t *overla
{
int i;
clut_t* clut = (clut_t*) overlay->color;
-
- for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) {
- *((uint32_t *)&clut[i]) =
- this->yuv2rgb->yuv2rgb_single_pixel_fun(this->yuv2rgb,
- clut[i].y, clut[i].cb, clut[i].cr);
- }
+ if (!overlay->rgb_clut) {
+ for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) {
+ *((uint32_t *)&clut[i]) =
+ this->yuv2rgb->yuv2rgb_single_pixel_fun(this->yuv2rgb,
+ clut[i].y, clut[i].cb, clut[i].cr);
+ }
overlay->rgb_clut++;
+ }
+ if (!overlay->clip_rgb_clut) {
+ clut = (clut_t*) overlay->clip_color;
+ for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) {
+ *((uint32_t *)&clut[i]) =
+ this->yuv2rgb->yuv2rgb_single_pixel_fun(this->yuv2rgb,
+ clut[i].y, clut[i].cb, clut[i].cr);
+ }
+ overlay->clip_rgb_clut++;
+ }
}
static void xshm_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) {
@@ -735,7 +745,7 @@ static void xshm_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo
/* Alpha Blend here */
if (overlay->rle) {
- if( !overlay->rgb_clut )
+ if( !overlay->rgb_clut || !overlay->clip_rgb_clut)
xshm_overlay_clut_yuv2rgb(this,overlay);
switch(this->bpp) {