Commit 878968cc authored by Ilkka Ollakka's avatar Ilkka Ollakka

x264: add hrd-option

parent e48eb142
......@@ -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" ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment