]> git.sesse.net Git - vlc/blobdiff - modules/codec/x264.c
[Qt] use screenGeometry instead of screen.
[vlc] / modules / codec / x264.c
index 49c2081979329760323e67646fd017392d75769d..79f56a11da8a493b570941cf493d89f6caef29a2 100644 (file)
@@ -28,7 +28,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout.h>
 #include <vlc_sout.h>
@@ -86,8 +86,14 @@ static void Close( vlc_object_t * );
     "P-frames. Range 1 to 16." )
 
 #define B_ADAPT_TEXT N_("Adaptive B-frame decision")
+#if X264_BUILD >= 63
+#define B_ADAPT_LONGTEXT N_( "Force the specified number of " \
+    "consecutive B-frames to be used, except possibly before an I-frame." \
+    "Range 0 to 2." )
+#else
 #define B_ADAPT_LONGTEXT N_( "Force the specified number of " \
     "consecutive B-frames to be used, except possibly before an I-frame." )
+#endif
 
 #define B_BIAS_TEXT N_("Influence (bias) B-frames usage")
 #define B_BIAS_LONGTEXT N_( "Bias the choice to use B-frames. Positive values " \
@@ -269,7 +275,12 @@ static void Close( vlc_object_t * );
 
 #define SUBME_TEXT N_("Subpixel motion estimation and partition decision " \
     "quality")
-#if X264_BUILD >= 46 /* r477 */
+#if X264_BUILD >= 65 
+#define SUBME_MAX 9
+#define SUBME_LONGTEXT N_( "This parameter controls quality versus speed " \
+    "tradeoffs involved in the motion estimation decision process " \
+    "(lower = quicker and higher = better quality). Range 1 to 9." )
+#elif X264_BUILD >= 46 /* r477 */
 #define SUBME_MAX 7
 #define SUBME_LONGTEXT N_( "This parameter controls quality versus speed " \
     "tradeoffs involved in the motion estimation decision process " \
@@ -432,10 +443,16 @@ vlc_module_begin();
                  BFRAMES_LONGTEXT, false );
         change_integer_range( 0, 16 );
 
-#if X264_BUILD >= 0x0013 /* r137 */
+#if X264_BUILD >= 63
+    add_integer( SOUT_CFG_PREFIX "b-adapt", 1, NULL, B_ADAPT_TEXT,
+                 B_ADAPT_LONGTEXT, false );
+        change_integer_range( 0, 2 );
+#elif  X264_BUILD >= 0x0013 /* r137 */
     add_bool( SOUT_CFG_PREFIX "b-adapt", 1, NULL, B_ADAPT_TEXT,
               B_ADAPT_LONGTEXT, false );
+#endif
 
+#if  X264_BUILD >= 0x0013 /* r137 */
     add_integer( SOUT_CFG_PREFIX "b-bias", 0, NULL, B_BIAS_TEXT,
                  B_BIAS_LONGTEXT, false );
         change_integer_range( -100, 100 );
@@ -589,7 +606,7 @@ vlc_module_begin();
         change_integer_range( 1, SUBME_MAX );
         add_deprecated_alias( SOUT_CFG_PREFIX "subpel" ); /* Deprecated since 0.8.5 */
 
-#if X264_BUILD >= 41 /* r368 */
+#if X264_BUILD >= 41 && X264_BUILD < 65 /* r368 */
     add_bool( SOUT_CFG_PREFIX "b-rdo", 0, NULL, B_RDO_TEXT,
               B_RDO_LONGTEXT, false );
 #endif
@@ -604,7 +621,7 @@ vlc_module_begin();
               CHROMA_ME_LONGTEXT, false );
 #endif
 
-#if X264_BUILD >= 43 /* r390 */
+#if X264_BUILD >= 43 && X264_BUILD < 65 /* r390 */
     add_bool( SOUT_CFG_PREFIX "bime", 0, NULL, BIME_TEXT,
               BIME_LONGTEXT, false );
 #endif
@@ -1038,7 +1055,11 @@ static int  Open ( vlc_object_t *p_this )
 
 #if X264_BUILD >= 0x0013
     var_Get( p_enc, SOUT_CFG_PREFIX "b-adapt", &val );
+#if X264_BUILD >= 63
+    p_sys->param.i_bframe_adaptive = val.i_int;
+#else
     p_sys->param.b_bframe_adaptive = val.b_bool;
+#endif
 
     var_Get( p_enc, SOUT_CFG_PREFIX "b-bias", &val );
     if( val.i_int >= -100 && val.i_int <= 100 )
@@ -1078,7 +1099,7 @@ static int  Open ( vlc_object_t *p_this )
         p_sys->param.analyse.i_trellis = val.i_int;
 #endif
 
-#if X264_BUILD >= 41
+#if X264_BUILD >= 41 && X264_BUILD < 65
     var_Get( p_enc, SOUT_CFG_PREFIX "b-rdo", &val );
     p_sys->param.analyse.b_bframe_rdo = val.b_bool;
 #endif
@@ -1088,7 +1109,7 @@ static int  Open ( vlc_object_t *p_this )
     p_sys->param.analyse.b_fast_pskip = val.b_bool;
 #endif
 
-#if X264_BUILD >= 43
+#if X264_BUILD >= 43 && X264_BUILD < 65
     var_Get( p_enc, SOUT_CFG_PREFIX "bime", &val );
     p_sys->param.analyse.b_bidir_me = val.b_bool;
 #endif