[vlc-commits] avcodec: Allow encoding standard stricted to be from -2 to 2

Ilkka Ollakka git at videolan.org
Sat Feb 25 10:28:58 CET 2012


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Feb 25 11:25:29 2012 +0200| [a64b15e7be6f8dd3107245802d884baa5a8cf276] | committer: Ilkka Ollakka

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

Should fix #6184 as aac encoding seems to require --sout-ffmpeg-strict=-2

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a64b15e7be6f8dd3107245802d884baa5a8cf276
---

 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 a824467..072e0bf 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -182,6 +182,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 fb436b0..59f3bb5 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 2343d1d..f5c62f3 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -382,9 +382,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