- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "scale" ) ) )
- {
- p_sys->f_scale = atof( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "width" ) ) )
- {
- p_sys->i_width = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "height" ) ) )
- {
- p_sys->i_height = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "vb" ) ) )
- {
- p_sys->i_vbitrate = atoi( val );
- if( p_sys->i_vbitrate < 16000 )
- {
- p_sys->i_vbitrate *= 1000;
- }
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "vt" ) ) )
- {
- p_sys->i_vtolerance = atoi( val );
- }
- if( sout_cfg_find( p_stream->p_cfg, "deinterlace" ) )
- {
- p_sys->b_deinterlace = VLC_TRUE;
- }
- if( sout_cfg_find( p_stream->p_cfg, "interlace" ) )
- {
- p_sys->b_interlace = VLC_TRUE;
- }
- if( sout_cfg_find( p_stream->p_cfg, "strict_rc" ) )
- {
- p_sys->b_strict_rc = VLC_TRUE;
- }
- if( sout_cfg_find( p_stream->p_cfg, "pre_me" ) )
- {
- p_sys->b_pre_me = VLC_TRUE;
- }
- if( sout_cfg_find( p_stream->p_cfg, "hurry_up" ) )
- {
- p_sys->b_hurry_up = VLC_TRUE;
- /* hurry up mode needs noise reduction, even small */
- p_sys->i_noise_reduction = 1;
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "rc_buffer_size" ) ) )
- {
- p_sys->i_rc_buffer_size = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "rc_buffer_aggressivity" ) ) )
- {
- p_sys->f_rc_buffer_aggressivity = atof( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "i_quant_factor" ) ) )
- {
- p_sys->f_i_quant_factor = atof( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "noise_reduction" ) ) )
- {
- p_sys->i_noise_reduction = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "mpeg4_matrix" ) ) )
- {
- p_sys->b_mpeg4_matrix = VLC_TRUE;
- }
- /* crop */
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "croptop" ) ) )
- {
- p_sys->i_crop_top = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "cropbottom" ) ) )
- {
- p_sys->i_crop_bottom = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "cropleft" ) ) )
- {
- p_sys->i_crop_left = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "cropright" ) ) )
- {
- p_sys->i_crop_right = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "keyint" ) ) )
- {
- p_sys->i_key_int = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "bframes" ) ) )
- {
- p_sys->i_b_frames = atoi( val );
- }
-#if LIBAVCODEC_BUILD >= 4673
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "hq" ) ) )
- {
- if( !strcmp( val, "rd" ) )
- {
- p_sys->i_hq = FF_MB_DECISION_RD;
- }
- else if( !strcmp( val, "bits" ) )
- {
- p_sys->i_hq = FF_MB_DECISION_BITS;
- }
- else if( !strcmp( val, "simple" ) )
- {
- p_sys->i_hq = FF_MB_DECISION_SIMPLE;
- }
- else
- {
- p_sys->i_hq = FF_MB_DECISION_RD;
- }
- }
-#else
- if( sout_cfg_find( p_stream->p_cfg, "hq" ) )
- {
- p_sys->i_hq = VLC_TRUE;
- }
-#endif
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "qmin" ) ) )
- {
- p_sys->i_qmin = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "qmax" ) ) )
- {
- p_sys->i_qmax = atoi( val );
- }
- if( ( val = sout_cfg_find_value( p_stream->p_cfg, "threads" ) ) )
- {
- p_sys->i_threads = atoi( val );
- }
- if( sout_cfg_find( p_stream->p_cfg, "trellis" ) )
- {
- p_sys->b_trellis = VLC_TRUE;
- }