/*****************************************************************************
* Chroma fourcc -> ffmpeg_id mapping
*****************************************************************************/
-static struct
+static const struct
{
vlc_fourcc_t i_chroma;
int i_chroma_id;
{ 0, 0 }
};
-static int GetFfmpegChroma( vlc_fourcc_t i_chroma )
+static inline int GetFfmpegChroma( vlc_fourcc_t i_chroma )
{
int i;
return -1;
}
-static vlc_fourcc_t GetVlcChroma( int i_ffmpeg_chroma )
+static inline vlc_fourcc_t GetVlcChroma( int i_ffmpeg_chroma )
{
int i;
#endif
#include "avcodec.h"
+#include "chroma.h"
/*****************************************************************************
* decoder_sys_t : decoder descriptor
case PIX_FMT_GRAY8:
return VLC_FOURCC('G','R','E','Y');
- case PIX_FMT_YUV410P:
- case PIX_FMT_YUV411P:
default:
+#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
+ if( GetVlcChroma( i_ff_chroma ) )
+ return GetVlcChroma( i_ff_chroma );
+#endif
return 0;
}
}