[vlc-devel] libvlc_video_set_format_callbacks() and "cyuv" chroma

Rafaël Carré funman at videolan.org
Sat Mar 10 23:33:54 CET 2012


Le 09/03/2012 20:17, Jérôme FORISSIER a écrit :
> 
> On 8 mars 2012, at 16:44, Rémi Denis-Courmont wrote:
> 
>> On Thu, 8 Mar 2012 16:37:03 +0100, Jérôme FORISSIER <jerome at taodyne.com>
>> wrote:
>>> Any idea what might be going wrong?
>>
>> CYUV fell into disrepair and is not currently supported because there has
>> been no use for it.
>> Patch welcome.
> 
> Here you go:
> 
> From: Jerome Forissier <jerome at taodyne.com>
> Date: Fri, 9 Mar 2012 17:08:44 +0100
> Subject: [PATCH] Add CYUV to video_format_Setup() and to the list of YUV
>  packed chroma codes.
> 
> Fixes: `i420_yuy2_sse2 filter warning: can't get output picture'
> when the setup callback passed to libvlc_video_set_callbacks()
> sets *chroma to "CYUV".
> ---
>  src/misc/es_format.c |    1 +
>  src/misc/fourcc.c    |    3 ++-
>  2 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/src/misc/es_format.c b/src/misc/es_format.c
> index 51741fe..e5c31a7 100644
> --- a/src/misc/es_format.c
> +++ b/src/misc/es_format.c
> @@ -157,6 +157,7 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
>      case VLC_CODEC_YVYU:
>      case VLC_CODEC_UYVY:
>      case VLC_CODEC_VYUY:
> +    case VLC_CODEC_CYUV:
>      case VLC_CODEC_J422:
>          p_fmt->i_bits_per_pixel = 16;
>          break;

ok

> diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
> index 9410d77..15d452c 100644
> --- a/src/misc/fourcc.c
> +++ b/src/misc/fourcc.c
> @@ -1498,7 +1498,8 @@ const char *vlc_fourcc_GetDescription( int i_cat, vlc_fourcc_t i_fourcc )
>  
>  #define VLC_CODEC_YUV_PACKED \
>      VLC_CODEC_YUYV, VLC_CODEC_YVYU, \
> -    VLC_CODEC_UYVY, VLC_CODEC_VYUY
> +    VLC_CODEC_UYVY, VLC_CODEC_VYUY, \
> +    VLC_CODEC_CYUV
>  
>  #define VLC_CODEC_FALLBACK_420 \
>      VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PACKED, \

Isn't CYUV missing from a few fallback lists?



More information about the vlc-devel mailing list