mirror of
https://github.com/mpv-player/mpv
synced 2024-12-30 02:52:10 +00:00
video: remove "hard" framedrop mode
Completely useless, and could accidentally be enabled by cycling framedrop modes. Just get rid of it. But still allow triggering the old code with --vd-lavc-framedrop, in case someone asks for it. If nobody does, this new option will be removed eventually.
This commit is contained in:
parent
91be5e5c31
commit
8dfe0c73c9
@ -430,12 +430,12 @@ Video
|
||||
Do not sleep when outputting video frames. Useful for benchmarks when used
|
||||
with ``--no-audio.``
|
||||
|
||||
``--framedrop=<no|yes|hard>``
|
||||
``--framedrop=<no|yes>``
|
||||
Skip displaying some frames to maintain A/V sync on slow systems. Video
|
||||
filters are not applied to such frames. For B-frames even decoding is
|
||||
skipped completely. May produce unwatchably choppy output. With ``hard``,
|
||||
decoding and output of any frame can be skipped, and will lead to an even
|
||||
worse playback experience.
|
||||
skipped completely. May produce unwatchably choppy output.
|
||||
|
||||
The ``--vd-lavc-framedrop`` option controls what frames to drop.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -705,6 +705,10 @@ Video
|
||||
Skips decoding of frames completely. Big speedup, but jerky motion and
|
||||
sometimes bad artifacts (see skiploopfilter for available skip values).
|
||||
|
||||
``--vd-lavc-framedrop=<skipvalue>``
|
||||
Set framedropping mode used with ``--framedrop`` (see skiploopfilter for
|
||||
available skip values).
|
||||
|
||||
``--vd-lavc-threads=<0-16>``
|
||||
Number of threads to use for decoding. Whether threading is actually
|
||||
supported depends on codec. 0 means autodetect number of cores on the
|
||||
|
@ -457,8 +457,7 @@ const m_option_t mp_opts[] = {
|
||||
|
||||
OPT_CHOICE("framedrop", frame_dropping, 0,
|
||||
({"no", 0},
|
||||
{"yes", 1},
|
||||
{"hard", 2})),
|
||||
{"yes", 1})),
|
||||
|
||||
OPT_FLAG("untimed", untimed, M_OPT_FIXED),
|
||||
|
||||
|
@ -377,7 +377,7 @@ static int decode_image(struct MPContext *mpctx)
|
||||
}
|
||||
bool hrseek = mpctx->hrseek_active && mpctx->video_status == STATUS_SYNCING;
|
||||
int framedrop_type = hrseek && mpctx->hrseek_framedrop ?
|
||||
1 : check_framedrop(mpctx, -1);
|
||||
2 : check_framedrop(mpctx, -1);
|
||||
d_video->waiting_decoded_mpi =
|
||||
video_decode(d_video, pkt, framedrop_type);
|
||||
bool had_packet = !!pkt;
|
||||
|
@ -75,6 +75,7 @@ struct vd_lavc_params {
|
||||
int skip_loop_filter;
|
||||
int skip_idct;
|
||||
int skip_frame;
|
||||
int framedrop;
|
||||
int threads;
|
||||
int bitexact;
|
||||
int check_hw_profile;
|
||||
@ -101,6 +102,7 @@ const struct m_sub_options vd_lavc_conf = {
|
||||
OPT_DISCARD("skiploopfilter", skip_loop_filter, 0),
|
||||
OPT_DISCARD("skipidct", skip_idct, 0),
|
||||
OPT_DISCARD("skipframe", skip_frame, 0),
|
||||
OPT_DISCARD("framedrop", framedrop, 0),
|
||||
OPT_INTRANGE("threads", threads, 0, 0, 16),
|
||||
OPT_FLAG("bitexact", bitexact, 0),
|
||||
OPT_FLAG("check-hw-profile", check_hw_profile, 0),
|
||||
@ -114,6 +116,7 @@ const struct m_sub_options vd_lavc_conf = {
|
||||
.skip_loop_filter = AVDISCARD_DEFAULT,
|
||||
.skip_idct = AVDISCARD_DEFAULT,
|
||||
.skip_frame = AVDISCARD_DEFAULT,
|
||||
.framedrop = AVDISCARD_NONREF,
|
||||
},
|
||||
};
|
||||
|
||||
@ -592,14 +595,16 @@ static int decode(struct dec_video *vd, struct demux_packet *packet,
|
||||
int ret;
|
||||
vd_ffmpeg_ctx *ctx = vd->priv;
|
||||
AVCodecContext *avctx = ctx->avctx;
|
||||
struct vd_lavc_params *lavc_param = ctx->opts->vd_lavc_params;
|
||||
AVPacket pkt;
|
||||
|
||||
if (flags & 2)
|
||||
avctx->skip_frame = AVDISCARD_ALL;
|
||||
else if (flags & 1)
|
||||
avctx->skip_frame = AVDISCARD_NONREF;
|
||||
else
|
||||
if (flags) {
|
||||
// hr-seek framedrop vs. normal framedrop
|
||||
avctx->skip_frame = flags == 2 ? AVDISCARD_NONREF : lavc_param->framedrop;
|
||||
} else {
|
||||
// normal playback
|
||||
avctx->skip_frame = ctx->skip_frame;
|
||||
}
|
||||
|
||||
mp_set_av_packet(&pkt, packet, NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user