mirror of
https://github.com/mpv-player/mpv
synced 2025-02-23 00:06:56 +00:00
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},
|
||||
|
||||
// draw by slices or whole frame (useful with libmpeg2/libavcodec)
|
||||
{"slices", &vd_use_slices, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||
{"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL},
|
||||
OPT_FLAG_ON("slices", vd_use_slices, 0),
|
||||
OPT_FLAG_OFF("noslices", vd_use_slices, 0),
|
||||
{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
|
||||
|
||||
#ifdef USE_LIBAVCODEC
|
||||
|
@ -16,6 +16,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
|
||||
.playback_speed = 1.,
|
||||
.movie_aspect = -1.,
|
||||
.flip = -1,
|
||||
.vd_use_slices = 1,
|
||||
.lavc_param = (struct lavc_param){
|
||||
.workaround_bugs = 1, // autodetect
|
||||
.error_resilience = 2,
|
||||
|
@ -103,9 +103,6 @@ vd_functions_t *mpcodecs_vd_drivers[] = {
|
||||
|
||||
#include "libvo/video_out.h"
|
||||
|
||||
// libvo opts:
|
||||
int vd_use_slices = 1;
|
||||
|
||||
/** global variables for gamma, brightness, contrast, saturation and hue
|
||||
modified by mplayer.c and gui/mplayer/gtk/eq.c:
|
||||
ranges -100 - 100
|
||||
|
@ -20,8 +20,6 @@ typedef struct vd_functions
|
||||
// NULL terminated array of all 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_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
|
||||
#define VDCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
|
||||
|
@ -226,7 +226,7 @@ static int init(sh_video_t *sh){
|
||||
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;
|
||||
|
||||
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 "config.h"
|
||||
|
||||
#include "options.h"
|
||||
#include "mp_msg.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
|
||||
|
||||
use_callback = (!framedrop && vd_use_slices &&
|
||||
use_callback = (!framedrop && sh->opts->vd_use_slices &&
|
||||
(info->current_picture->flags&PIC_FLAG_PROGRESSIVE_FRAME)) ?
|
||||
MP_IMGFLAG_DRAW_CALLBACK:0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user