Commit fc6f1079 authored by Laurent Aimar's avatar Laurent Aimar

Do not allow direct rendering when the pictures provided by the display are slow to access.

The decoder pictures needs to be read back for rendering subtiles/OSD so
it's better to always use fast pictures for the decoders.

But as we don't have any module that provides slow pictures and are still
usable for DR...
parent ecc645cc
......@@ -959,12 +959,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
bool is_direct = vout->p->decoder_pool == vout->p->display_pool;
picture_t *todisplay = filtered;
if (do_early_spu && subpic) {
if (vout->p->is_decoder_pool_slow) {
is_direct = false;
todisplay = picture_NewFromFormat(&vd->source); /* FIXME a pool ? */
} else {
todisplay = picture_pool_Get(vout->p->private_pool);
}
if (todisplay) {
VideoFormatCopyCropAr(&todisplay->format, &filtered->format);
picture_Copy(todisplay, filtered);
......
......@@ -136,7 +136,6 @@ struct vout_thread_sys_t
picture_pool_t *display_pool;
picture_pool_t *decoder_pool;
picture_fifo_t *decoder_fifo;
bool is_decoder_pool_slow;
vout_chrono_t render; /**< picture render time estimator */
};
......
......@@ -133,7 +133,7 @@ int vout_InitWrapper(vout_thread_t *vout)
video_format_t source = vd->source;
sys->display.use_dr = !vout_IsDisplayFiltered(vd);
const bool allow_dr = !vd->info.has_pictures_invalid && sys->display.use_dr;
const bool allow_dr = !vd->info.has_pictures_invalid && !vd->info.is_slow && sys->display.use_dr;
const unsigned private_picture = 4; /* XXX 3 for filter, 1 for SPU */
const unsigned decoder_picture = 1 + sys->dpb_size;
const unsigned kept_picture = 1; /* last displayed picture */
......@@ -148,7 +148,6 @@ int vout_InitWrapper(vout_thread_t *vout)
sys->dpb_size = picture_pool_GetSize(display_pool) - reserved_picture;
sys->decoder_pool = display_pool;
sys->display_pool = display_pool;
sys->is_decoder_pool_slow = vd->info.is_slow;
} else if (!sys->decoder_pool) {
sys->decoder_pool =
picture_pool_NewFromFormat(&source,
......@@ -161,7 +160,6 @@ int vout_InitWrapper(vout_thread_t *vout)
sys->dpb_size = picture_pool_GetSize(sys->decoder_pool) - reserved_picture;
}
NoDrInit(vout);
sys->is_decoder_pool_slow = false;
}
sys->private_pool = picture_pool_Reserve(sys->decoder_pool, private_picture);
sys->display.filtered = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment