[vlc-commits] commit: x264: add hrd-option (Ilkka Ollakka )
git at videolan.org
git at videolan.org
Mon May 10 16:08:23 CEST 2010
vlc/vlc-1.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Apr 13 16:10:47 2010 +0300| [3b106bf0c91c0f185cada9e46f7972fdc98d6eab] | committer: Ilkka Ollakka
x264: add hrd-option
(cherry picked from commit 878968cc492db7412943c3a1ec6c19428a2fe41d)
Signed-off-by: Ilkka Ollakka <ileoo at iki.fi>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=3b106bf0c91c0f185cada9e46f7972fdc98d6eab
---
modules/codec/x264.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 871a00d..a361c5b 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -381,6 +381,9 @@ static void Close( vlc_object_t * );
"Currently default is lower than x264 default because unmuxable output" \
"doesn't handle larger values that well yet" )
+#define HRD_TEXT N_("HRD-timing information")
+#define HRD_LONGTEXT N_("HRD-timing information")
+
static const char *const enc_me_list[] =
{ "dia", "hex", "umh", "esa", "tesa" };
static const char *const enc_me_list_text[] =
@@ -478,6 +481,11 @@ vlc_module_begin ()
add_integer( SOUT_CFG_PREFIX "slice-max-size", 0, NULL, SLICE_MAX_SIZE, SLICE_MAX_SIZE_LONGTEXT, false )
add_integer( SOUT_CFG_PREFIX "slice-max-mbs", 0, NULL, SLICE_MAX_MBS, SLICE_MAX_MBS_LONGTEXT, false )
+#if X264_BUILD >= 92
+ add_string( SOUT_CFG_PREFIX "hrd", "none", NULL, HRD_TEXT, HRD_LONGTEXT, false )
+ change_string_list( x264_nal_hrd_names, x264_nal_hrd_names, 0 );
+#endif
+
/* Ratecontrol */
@@ -678,7 +686,7 @@ static const char *const ppsz_sout_options[] = {
"sps-id", "ssim", "stats", "subme", "trellis",
"verbose", "vbv-bufsize", "vbv-init", "vbv-maxrate", "weightb", "weightp",
"aq-mode", "aq-strength", "psy-rd", "psy", "profile", "lookahead", "slices",
- "slice-max-size", "slice-max-mbs", "intra-refresh", "mbtree", NULL
+ "slice-max-size", "slice-max-mbs", "intra-refresh", "mbtree", "hrd", NULL
};
static block_t *Encode( encoder_t *, picture_t * );
@@ -913,6 +921,14 @@ static int Open ( vlc_object_t *p_this )
if( i_val >= 1 )
p_sys->param.analyse.i_subpel_refine = i_val;
+#if X264_BUILD >= 92
+ psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "hrd");
+ if( !strcmp( psz_val, "vbr" ) )
+ p_sys->param.i_nal_hrd = X264_NAL_HRD_VBR;
+ else if( !strcmp( psz_val, "cbr" ) )
+ p_sys->param.i_nal_hrd = X264_NAL_HRD_CBR;
+#endif
+
//TODO: psz_val == NULL ?
psz_val = var_GetString( p_enc, SOUT_CFG_PREFIX "me" );
if( !strcmp( psz_val, "dia" ) )
More information about the vlc-commits
mailing list