]> git.sesse.net Git - vlc/commitdiff
vout_subpictures.c: Do not call the scaling module if the subpicture is using RGBA...
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 31 Mar 2007 15:38:57 +0000 (15:38 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 31 Mar 2007 15:38:57 +0000 (15:38 +0000)
vout_pictures.*: Add core support for RGBA pictures.

src/video_output/vout_pictures.c
src/video_output/vout_pictures.h
src/video_output/vout_subpictures.c

index 89e6b3c90a85230a5efdf1ef2c0d2eaf8e9bfbd1..5290af2981e9ea1887d7aa0e3758d882fc1b34a1 100644 (file)
@@ -592,6 +592,7 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma,
             break;
 
         case FOURCC_RV32:
+        case FOURCC_RGBA:
             p_format->i_bits_per_pixel = 32;
             break;
         case FOURCC_RV24:
@@ -820,6 +821,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             break;
 
         case FOURCC_RV32:
+        case FOURCC_RGBA:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned * 4;
index dc11538762136ab6524d5a9c36f9cd39d6d38885..4b7c78d9fbc36b59a3013c7a20bbd1b5656dac49 100644 (file)
@@ -44,6 +44,9 @@
 /* Packed RGB 32bpp, usually 0x00ff0000, 0x0000ff00, 0x000000ff */
 #define FOURCC_RV32         VLC_FOURCC('R','V','3','2')
 
+/* Packed RGBA 32bpp, like RV32 with 0xff000000 used for alpha */
+#define FOURCC_RGBA         VLC_FOURCC('R','G','B','A')
+
 /* Planar YUV 4:2:0, Y:U:V */
 #define FOURCC_I420         VLC_FOURCC('I','4','2','0')
 #define FOURCC_IYUV         VLC_FOURCC('I','Y','U','V')
index 6ecd09acdfb5a49ee7eeb003293aaca1bac4652b..e59d14c6545c53a0d5a5d910c149cdc367fbb968 100644 (file)
@@ -502,6 +502,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
             p_spu->p_blend->fmt_out.video.i_aspect = p_fmt->i_aspect;
             p_spu->p_blend->fmt_out.video.i_chroma = p_fmt->i_chroma;
             p_spu->p_blend->fmt_in.video.i_chroma = VLC_FOURCC('Y','U','V','P');
+            /* XXX: We'll also be using it for YUVA and RGBA blending ... */
 
             p_spu->p_blend->p_module =
                 module_Need( p_spu->p_blend, "video blending", 0, 0 );
@@ -612,6 +613,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
             p_spu->p_scale->fmt_out.video.i_chroma =
                 p_spu->p_scale->fmt_in.video.i_chroma =
                     VLC_FOURCC('Y','U','V','P');
+            /* XXX: We'll also be using it for YUVA and RGBA blending ... */
             p_spu->p_scale->fmt_in.video.i_width =
                 p_spu->p_scale->fmt_in.video.i_height = 32;
             p_spu->p_scale->fmt_out.video.i_width =
@@ -671,7 +673,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
             }
 
             if( (i_scale_width != 1000 || i_scale_height != 1000) &&
-                p_spu->p_scale && !p_region->p_cache )
+                p_spu->p_scale && !p_region->p_cache &&
+                VLC_FOURCC('R','G','B','A') != p_region->fmt.i_chroma /* FIXME */ )
             {
                 picture_t *p_pic;