[vlc-commits] avcodec: Allow encoding standard stricted to be from -2 to 2
Ilkka Ollakka
git at videolan.org
Sat Feb 25 17:23:05 CET 2012
vlc/vlc-2.0 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Feb 25 11:25:29 2012 +0200| [cbae861e6572109f15d933b2f8d87e8ce481a8d5] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=cbae861e6572109f15d933b2f8d87e8ce481a8d5
---
modules/codec/avcodec/avcodec.c | 1 +
modules/codec/avcodec/avcodec.h | 2 +-
modules/codec/avcodec/encoder.c | 4 +---
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index c61eea9..513e17a 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -183,6 +183,7 @@ vlc_module_begin ()
ENC_QSCALE_TEXT, ENC_QSCALE_LONGTEXT, true )
add_integer( ENC_CFG_PREFIX "strict", 0,
ENC_STRICT_TEXT, ENC_STRICT_LONGTEXT, true )
+ change_integer_range( -2, 2 )
add_float( ENC_CFG_PREFIX "lumi-masking", 0.0,
ENC_LUMI_MASKING_TEXT, ENC_LUMI_MASKING_LONGTEXT, true )
add_float( ENC_CFG_PREFIX "dark-masking", 0.0,
diff --git a/modules/codec/avcodec/avcodec.h b/modules/codec/avcodec/avcodec.h
index c5399ab..614afa5 100644
--- a/modules/codec/avcodec/avcodec.h
+++ b/modules/codec/avcodec/avcodec.h
@@ -226,7 +226,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
#define ENC_STRICT_TEXT N_( "Strict standard compliance" )
#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_LONGTEXT N_( "Raise the quantizer for " \
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index e036a09..a9248e7 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -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->b_trellis = var_GetBool( p_enc, ENC_CFG_PREFIX "trellis" );
- i_val = 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_context->strict_std_compliance = var_GetInteger( p_enc, ENC_CFG_PREFIX "strict" );
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" );
More information about the vlc-commits
mailing list