mirror of https://github.com/mpv-player/mpv
Move vd_use_slices to options struct
This commit is contained in:
parent
bb679dd40a
commit
7dc4226348
|
@ -242,8 +242,8 @@
|
||||||
{"tskeepbroken", &ts_keep_broken, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
{"tskeepbroken", &ts_keep_broken, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
|
||||||
// draw by slices or whole frame (useful with libmpeg2/libavcodec)
|
// draw by slices or whole frame (useful with libmpeg2/libavcodec)
|
||||||
{"slices", &vd_use_slices, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
OPT_FLAG_ON("slices", vd_use_slices, 0),
|
||||||
{"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
OPT_FLAG_OFF("noslices", vd_use_slices, 0),
|
||||||
{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
|
{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
|
||||||
|
|
||||||
#ifdef USE_LIBAVCODEC
|
#ifdef USE_LIBAVCODEC
|
||||||
|
|
|
@ -16,6 +16,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
|
||||||
.playback_speed = 1.,
|
.playback_speed = 1.,
|
||||||
.movie_aspect = -1.,
|
.movie_aspect = -1.,
|
||||||
.flip = -1,
|
.flip = -1,
|
||||||
|
.vd_use_slices = 1,
|
||||||
.lavc_param = (struct lavc_param){
|
.lavc_param = (struct lavc_param){
|
||||||
.workaround_bugs = 1, // autodetect
|
.workaround_bugs = 1, // autodetect
|
||||||
.error_resilience = 2,
|
.error_resilience = 2,
|
||||||
|
|
|
@ -103,9 +103,6 @@ vd_functions_t *mpcodecs_vd_drivers[] = {
|
||||||
|
|
||||||
#include "libvo/video_out.h"
|
#include "libvo/video_out.h"
|
||||||
|
|
||||||
// libvo opts:
|
|
||||||
int vd_use_slices = 1;
|
|
||||||
|
|
||||||
/** global variables for gamma, brightness, contrast, saturation and hue
|
/** global variables for gamma, brightness, contrast, saturation and hue
|
||||||
modified by mplayer.c and gui/mplayer/gtk/eq.c:
|
modified by mplayer.c and gui/mplayer/gtk/eq.c:
|
||||||
ranges -100 - 100
|
ranges -100 - 100
|
||||||
|
|
|
@ -20,8 +20,6 @@ typedef struct vd_functions
|
||||||
// NULL terminated array of all drivers
|
// NULL terminated array of all drivers
|
||||||
extern vd_functions_t* mpcodecs_vd_drivers[];
|
extern vd_functions_t* mpcodecs_vd_drivers[];
|
||||||
|
|
||||||
extern int vd_use_slices;
|
|
||||||
|
|
||||||
#define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
|
#define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
|
||||||
#define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
|
#define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
|
||||||
#define VDCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
|
#define VDCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
|
||||||
|
|
|
@ -226,7 +226,7 @@ static int init(sh_video_t *sh){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)
|
if(sh->opts->vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)
|
||||||
ctx->do_slices=1;
|
ctx->do_slices=1;
|
||||||
|
|
||||||
if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ)
|
if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "options.h"
|
||||||
#include "mp_msg.h"
|
#include "mp_msg.h"
|
||||||
|
|
||||||
#include "vd_internal.h"
|
#include "vd_internal.h"
|
||||||
|
@ -214,7 +214,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||||
}
|
}
|
||||||
mpeg2_skip(mpeg2dec, 0); //mpeg2skip skips frames until set again to 0
|
mpeg2_skip(mpeg2dec, 0); //mpeg2skip skips frames until set again to 0
|
||||||
|
|
||||||
use_callback = (!framedrop && vd_use_slices &&
|
use_callback = (!framedrop && sh->opts->vd_use_slices &&
|
||||||
(info->current_picture->flags&PIC_FLAG_PROGRESSIVE_FRAME)) ?
|
(info->current_picture->flags&PIC_FLAG_PROGRESSIVE_FRAME)) ?
|
||||||
MP_IMGFLAG_DRAW_CALLBACK:0;
|
MP_IMGFLAG_DRAW_CALLBACK:0;
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ typedef struct MPOpts {
|
||||||
float movie_aspect;
|
float movie_aspect;
|
||||||
float screen_size_xy;
|
float screen_size_xy;
|
||||||
int flip;
|
int flip;
|
||||||
|
int vd_use_slices;
|
||||||
struct lavc_param {
|
struct lavc_param {
|
||||||
int workaround_bugs;
|
int workaround_bugs;
|
||||||
int error_resilience;
|
int error_resilience;
|
||||||
|
|
Loading…
Reference in New Issue