[vlc-commits] [Git][videolan/vlc][master] 2 commits: dav1d: add extra buffers for super resolution with older dav1d
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Apr 22 09:35:13 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
5477d56f by Steve Lhomme at 2023-04-22T09:15:20+00:00
dav1d: add extra buffers for super resolution with older dav1d
- - - - -
a3917a6b by Steve Lhomme at 2023-04-22T09:15:20+00:00
dav1d: fix compilation with older dav1d versions
This is a regression from 47486d9992c3c58a929ec535b2da59ecc325a367
- - - - -
1 changed file:
- modules/codec/dav1d.c
Changes:
=====================================
modules/codec/dav1d.c
=====================================
@@ -204,10 +204,14 @@ static int NewPicture(Dav1dPicture *img, void *cookie)
v->i_height = (img->seq_hdr->max_height + 0x7F) & ~0x7F;
v->i_chroma = dec->fmt_out.i_codec;
+#if DAV1D_API_VERSION_MAJOR >= 6
dec->i_extra_picture_buffers = p_sys->s.max_frame_delay;
+#else
+ dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1);
+#endif
if (img->seq_hdr->super_res)
// dav1d seems to buffer more pictures when using super resolution
- dec->i_extra_picture_buffers += p_sys->s.max_frame_delay > 1 ? 2 : 1;
+ dec->i_extra_picture_buffers += dec->i_extra_picture_buffers > 1 ? 2 : 1;
if (decoder_UpdateVideoFormat(dec) == 0)
{
@@ -520,15 +524,15 @@ static int OpenDecoder(vlc_object_t *p_this)
dav1d_version(), p_sys->s.n_threads);
dec->i_extra_picture_buffers = p_sys->s.max_frame_delay;
- if (super_res)
- // dav1d seems to buffer more pictures when using super resolution
- dec->i_extra_picture_buffers += p_sys->s.max_frame_delay > 1 ? 2 : 1;
#else
msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads",
dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads);
dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1);
#endif
+ if (super_res)
+ // dav1d seems to buffer more pictures when using super resolution
+ dec->i_extra_picture_buffers += dec->i_extra_picture_buffers > 1 ? 2 : 1;
dec->fmt_out.video.i_width = (dec->fmt_out.video.i_width + 0x7F) & ~0x7F;
dec->fmt_out.video.i_height = (dec->fmt_out.video.i_height + 0x7F) & ~0x7F;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/85bbff1fc719d02faaec1074ac8b5c06d2976b9c...a3917a6ba3a268385141676e6b4bc1a5f6eed205
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/85bbff1fc719d02faaec1074ac8b5c06d2976b9c...a3917a6ba3a268385141676e6b4bc1a5f6eed205
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list