Commit cbae861e authored by Ilkka Ollakka's avatar Ilkka Ollakka Committed by Jean-Baptiste Kempf

avcodec: Allow encoding standard stricted to be from -2 to 2

Should fix #6184 as aac encoding seems to require --sout-ffmpeg-strict=-2
(cherry picked from commit a64b15e7be6f8dd3107245802d884baa5a8cf276)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b181505d
...@@ -183,6 +183,7 @@ vlc_module_begin () ...@@ -183,6 +183,7 @@ vlc_module_begin ()
ENC_QSCALE_TEXT, ENC_QSCALE_LONGTEXT, true ) ENC_QSCALE_TEXT, ENC_QSCALE_LONGTEXT, true )
add_integer( ENC_CFG_PREFIX "strict", 0, add_integer( ENC_CFG_PREFIX "strict", 0,
ENC_STRICT_TEXT, ENC_STRICT_LONGTEXT, true ) ENC_STRICT_TEXT, ENC_STRICT_LONGTEXT, true )
change_integer_range( -2, 2 )
add_float( ENC_CFG_PREFIX "lumi-masking", 0.0, add_float( ENC_CFG_PREFIX "lumi-masking", 0.0,
ENC_LUMI_MASKING_TEXT, ENC_LUMI_MASKING_LONGTEXT, true ) ENC_LUMI_MASKING_TEXT, ENC_LUMI_MASKING_LONGTEXT, true )
add_float( ENC_CFG_PREFIX "dark-masking", 0.0, add_float( ENC_CFG_PREFIX "dark-masking", 0.0,
......
...@@ -226,7 +226,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec ); ...@@ -226,7 +226,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
#define ENC_STRICT_TEXT N_( "Strict standard compliance" ) #define ENC_STRICT_TEXT N_( "Strict standard compliance" )
#define ENC_STRICT_LONGTEXT N_( "Force a strict standard " \ #define ENC_STRICT_LONGTEXT N_( "Force a strict standard " \
"compliance when encoding (accepted values: -1, 0, 1)." ) "compliance when encoding (accepted values: -2 to 2)." )
#define ENC_LUMI_MASKING_TEXT N_( "Luminance masking" ) #define ENC_LUMI_MASKING_TEXT N_( "Luminance masking" )
#define ENC_LUMI_MASKING_LONGTEXT N_( "Raise the quantizer for " \ #define ENC_LUMI_MASKING_LONGTEXT N_( "Raise the quantizer for " \
......
...@@ -377,9 +377,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -377,9 +377,7 @@ int OpenEncoder( vlc_object_t *p_this )
p_sys->i_qmax = var_GetInteger( p_enc, ENC_CFG_PREFIX "qmax" ); p_sys->i_qmax = var_GetInteger( p_enc, ENC_CFG_PREFIX "qmax" );
p_sys->b_trellis = var_GetBool( p_enc, ENC_CFG_PREFIX "trellis" ); p_sys->b_trellis = var_GetBool( p_enc, ENC_CFG_PREFIX "trellis" );
i_val = var_GetInteger( p_enc, ENC_CFG_PREFIX "strict" ); p_context->strict_std_compliance = var_GetInteger( p_enc, ENC_CFG_PREFIX "strict" );
if( i_val < - 1 || i_val > 1 ) i_val = 0;
p_context->strict_std_compliance = i_val;
p_sys->f_lumi_masking = var_GetFloat( p_enc, ENC_CFG_PREFIX "lumi-masking" ); p_sys->f_lumi_masking = var_GetFloat( p_enc, ENC_CFG_PREFIX "lumi-masking" );
p_sys->f_dark_masking = var_GetFloat( p_enc, ENC_CFG_PREFIX "dark-masking" ); p_sys->f_dark_masking = var_GetFloat( p_enc, ENC_CFG_PREFIX "dark-masking" );
......
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