[vlc-devel] [PATCH] logo: output in RGBA

Alexandre Janniaux ajanni at videolabs.io
Wed May 29 16:26:55 CEST 2019


Hi,

I agree with the use case, but now that we're starting to have hw
accelerated SPU scaling, it gets more sense to also support the
video output case. However, I also agree that forcing RGBA instead
of YUV might not be the ideal solution.

Shouldn't the conversion be handled by the SPU system from the
original chroma of the file?

About premultiplied, VLC doesn't really support premultiplied in any
case and the biggest clients are still d3d11/9 and opengl, so I think
it can be forgotten for now.

Greats,

--
Alexandre Janniaux
VideoLabs

On Wed, May 29, 2019 at 04:57:00PM +0300, Rémi Denis-Courmont wrote:
> Hi,
>
> Logo was designed, and is primarily intended for use with encoding. It uses YUVA because that's easy to blend into video.
>
> And while it is true that vout display expect RGBA, they don't seem to agree on whether it should be premultipled or not.
>
> Le 29 mai 2019 14:23:55 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
> >That's what most display module will prefer anyway
> >---
> > modules/spu/logo.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/modules/spu/logo.c b/modules/spu/logo.c
> >index c120b503e1..0b2ddd3ca8 100644
> >--- a/modules/spu/logo.c
> >+++ b/modules/spu/logo.c
> >@@ -380,7 +380,7 @@ static subpicture_t *FilterSub( filter_t *p_filter,
> >vlc_tick_t date )
> >         goto exit;
> >
> >     /* Create new SPU region */
> >-    video_format_Init( &fmt, VLC_CODEC_YUVA );
> >+    video_format_Init( &fmt, VLC_CODEC_RGBA );
> >     fmt.i_sar_num = fmt.i_sar_den = 1;
> > fmt.i_width = fmt.i_visible_width = p_pic->p[Y_PLANE].i_visible_pitch;
> >fmt.i_height = fmt.i_visible_height =
> >p_pic->p[Y_PLANE].i_visible_lines;
> >@@ -612,7 +612,7 @@ static picture_t *LoadImage( vlc_object_t *p_this,
> >const char *psz_filename )
> >         return NULL;
> >
> >     video_format_t fmt_out;
> >-    video_format_Init( &fmt_out, VLC_CODEC_YUVA );
> >+    video_format_Init( &fmt_out, VLC_CODEC_RGBA );
> >
> >     char *psz_url = vlc_path2uri( psz_filename, NULL );
> >     picture_t *p_pic = image_ReadUrl( p_image, psz_url, &fmt_out );
> >--
> >2.17.1
> >
> >_______________________________________________
> >vlc-devel mailing list
> >To unsubscribe or modify your subscription options:
> >https://mailman.videolan.org/listinfo/vlc-devel
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list