diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-09-01 12:26:38 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-08 02:27:08 +0000 |
commit | 826ce82cad315f7a48f9c971d3a5fa005a9eab46 (patch) | |
tree | f7112d46fc83de7f1b28252fe004f1ec41deee80 /video/decode | |
parent | 4d853c55454481c60d3d096a9bc4205e8adec766 (diff) | |
download | mpv-826ce82cad315f7a48f9c971d3a5fa005a9eab46.tar.bz2 mpv-826ce82cad315f7a48f9c971d3a5fa005a9eab46.tar.xz |
vd_lavc: disable cropping by decoder
Cropping by decoder has limitations with regards to aligment and hwdec.
It doesn't work to offset top left corner with hwdec and even with
software decoding it don't crop fully when resulting data would not be
aligned.
VO cropping is way more robust.
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/vd_lavc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 0c87005ddd..54a9975915 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -80,6 +80,7 @@ struct vd_lavc_params { int threads; bool bitexact; bool old_x264; + bool apply_cropping; bool check_hw_profile; int software_fallback; char **avopts; @@ -120,6 +121,7 @@ const struct m_sub_options vd_lavc_conf = { {"vd-lavc-o", OPT_KEYVALUELIST(avopts)}, {"vd-lavc-dr", OPT_CHOICE(dr, {"auto", -1}, {"no", 0}, {"yes", 1})}, + {"vd-apply-cropping", OPT_BOOL(apply_cropping)}, {"hwdec", OPT_STRINGLIST(hwdec_api), .help = hwdec_opt_help, .flags = M_OPT_OPTIONAL_PARAM | UPDATE_HWDEC}, @@ -772,6 +774,7 @@ static void init_avctx(struct mp_filter *vd) avctx->skip_loop_filter = lavc_param->skip_loop_filter; avctx->skip_idct = lavc_param->skip_idct; avctx->skip_frame = lavc_param->skip_frame; + avctx->apply_cropping = lavc_param->apply_cropping; if (lavc_codec->id == AV_CODEC_ID_H264 && lavc_param->old_x264) av_opt_set(avctx, "x264_build", "150", AV_OPT_SEARCH_CHILDREN); |