[vlc-commits] x264.c: add support for 8 and 10 bit encoding for all high10, high442 and high444 profiles
Ilkka Ollakka
git at videolan.org
Thu Jan 5 13:10:51 CET 2012
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Jan 5 17:09:20 2012 +0200| [8d9fe141ea0b4834122d5b122340c3e571c6654b] | committer: Ilkka Ollakka
x264.c: add support for 8 and 10 bit encoding for all high10, high442 and high444 profiles
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d9fe141ea0b4834122d5b122340c3e571c6654b
---
modules/codec/x264.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index dd51245..11f290a 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -770,20 +770,25 @@ static int Open ( vlc_object_t *p_this )
char *psz_profile = var_GetString( p_enc, SOUT_CFG_PREFIX "profile" );
if( psz_profile )
{
+#if X264_CSP_HIGH_DEPTH
+ int mask = x264_bit_depth > 8 ? X264_CSP_HIGH_DEPTH : 0;
+#else
+ int mask = 0;
+#endif
if( !strcmp( psz_profile, "high10" ) )
{
- p_enc->fmt_in.i_codec = VLC_CODEC_I420_10L;
- p_sys->i_colorspace = X264_CSP_I420 | X264_CSP_HIGH_DEPTH;
+ p_enc->fmt_in.i_codec = mask ? VLC_CODEC_I420_10L : VLC_CODEC_I420;
+ p_sys->i_colorspace = X264_CSP_I420 | mask;
}
if( !strcmp( psz_profile, "high422" ) )
{
- p_enc->fmt_in.i_codec = VLC_CODEC_I422;
- p_sys->i_colorspace = X264_CSP_I422;
+ p_enc->fmt_in.i_codec = mask ? VLC_CODEC_I422_10L : VLC_CODEC_I422;
+ p_sys->i_colorspace = X264_CSP_I422 | mask;
}
if( !strcmp( psz_profile, "high444" ) )
{
- p_enc->fmt_in.i_codec = VLC_CODEC_I444;
- p_sys->i_colorspace = X264_CSP_I444;
+ p_enc->fmt_in.i_codec = mask ? VLC_CODEC_I444_10L : VLC_CODEC_I444;
+ p_sys->i_colorspace = X264_CSP_I444 | mask;
}
}
free( psz_profile );
More information about the vlc-commits
mailing list