]> git.sesse.net Git - vlc/commitdiff
* modules/codec/x264.c: renamed analyse "all" mode to "slow" and added X264_ANALYSE_I...
authorGildas Bazin <gbazin@videolan.org>
Wed, 21 Sep 2005 22:08:00 +0000 (22:08 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 21 Sep 2005 22:08:00 +0000 (22:08 +0000)
modules/codec/x264.c

index 4c52e43751d9c542b7b206c2345d77037f26b6a8..ec805100fe8a2fb6a150af37ab3df509210b9696 100644 (file)
@@ -121,7 +121,8 @@ static void Close( vlc_object_t * );
 static char *enc_analyse_list[] =
   { "", "all", "normal", "fast", "none" };
 static char *enc_analyse_list_text[] =
-  { N_("default"), N_("all"), N_("normal"), N_("fast"), N_("none") };
+  { N_("default"), N_("all"), N_("slow"), N_("normal"),
+    N_("fast"), N_("none") };
 
 vlc_module_begin();
     set_description( _("h264 video encoder using x264 library"));
@@ -353,6 +354,9 @@ static int  Open ( vlc_object_t *p_this )
         p_sys->param.analyse.i_subpel_refine = val.i_int;
 #endif
 
+#ifndef X264_ANALYSE_BSUB16x16
+#   define X264_ANALYSE_BSUB16x16 0
+#endif
     var_Get( p_enc, SOUT_CFG_PREFIX "analyse", &val );
     if( !strcmp( val.psz_string, "none" ) )
     {
@@ -367,14 +371,23 @@ static int  Open ( vlc_object_t *p_this )
         p_sys->param.analyse.inter =
             X264_ANALYSE_I4x4 | X264_ANALYSE_PSUB16x16;
     }
+    else if( !strcmp( val.psz_string, "slow" ) )
+    {
+        p_sys->param.analyse.inter =
+            X264_ANALYSE_I4x4 |
+            X264_ANALYSE_PSUB16x16 | X264_ANALYSE_PSUB8x8 |
+            X264_ANALYSE_BSUB16x16;
+    }
     else if( !strcmp( val.psz_string, "all" ) )
     {
-#ifndef X264_ANALYSE_BSUB16x16
-#   define X264_ANALYSE_BSUB16x16 0
-#endif
         p_sys->param.analyse.inter =
-            X264_ANALYSE_I4x4 | X264_ANALYSE_PSUB16x16 | X264_ANALYSE_PSUB8x8 |
+            X264_ANALYSE_I4x4 |
+            X264_ANALYSE_PSUB16x16 | X264_ANALYSE_PSUB8x8 |
             X264_ANALYSE_BSUB16x16;
+#ifdef X264_ANALYSE_I8x8
+        p_sys->param.analyse.inter |= X264_ANALYSE_I8x8;
+        p_sys->param.analyse.b_transform_8x8 = 1;
+#endif
     }
     if( val.psz_string ) free( val.psz_string );