This makes decoding faster but could lead to errors.
Pointed by Jason, and original code by Ludovic Fauvet.
add_integer ( "ffmpeg-lowres", 0, NULL, LOWRES_TEXT, LOWRES_LONGTEXT,
true )
change_integer_range( 0, 2 )
+ add_bool( "ffmpeg-fast", 0, NULL, FAST_TEXT, FAST_LONGTEXT, true )
add_integer ( "ffmpeg-skiploopfilter", 0, NULL, SKIPLOOPF_TEXT,
SKIPLOOPF_LONGTEXT, true )
change_safe ()
"when there is not enough time. It's useful with low CPU power " \
"but it can produce distorted pictures.")
+#define FAST_TEXT N_("Allow speed tricks")
+#define FAST_LONGTEXT N_( \
+ "Allow non specification compliant speedup tricks. Faster but error-prone.")
+
#define SKIP_FRAME_TEXT N_("Skip frame (default=0)")
#define SKIP_FRAME_LONGTEXT N_( \
"Force skipping of frames to speed up decoding " \
if( val.i_int > 2 ) p_sys->p_context->skip_loop_filter = AVDISCARD_NONKEY;
if( val.i_int > 3 ) p_sys->p_context->skip_loop_filter = AVDISCARD_ALL;
+ bool b_fast = var_CreateGetBool( p_dec, "ffmpeg-fast" );
+ if( b_fast ) p_sys->p_context->flags2 |= CODEC_FLAG2_FAST;
+
/* ***** ffmpeg frame skipping ***** */
var_Create( p_dec, "ffmpeg-hurry-up", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Get( p_dec, "ffmpeg-hurry-up", &val );