[vlc-devel] [PATCH 1/3] video_output: don't use the private pool for the blend picture
Thomas Guillem
thomas at gllm.fr
Fri Aug 14 10:51:29 CEST 2020
What about the cost of allocating a picture each time?
On Thu, Aug 13, 2020, at 14:13, Steve Lhomme wrote:
> Create one on the fly each time. We don't need to preallocate some
> pictures if we're never going to use them. Also we don't to know the target
> format in advance.
>
> It may cause issues if the format is opaque. But this is currently not handled
> either.
> ---
> src/video_output/video_output.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/video_output/video_output.c
> b/src/video_output/video_output.c
> index dacb6a669a7..6097b9df7f9 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -1312,12 +1312,11 @@ static int
> ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
> picture_t *snap_pic = todisplay;
> if (do_early_spu && subpic) {
> if (sys->spu_blend) {
> - picture_t *blent =
> picture_pool_Get(sys->private.private_pool);
> + picture_t *blent =
> picture_NewFromFormat(&filtered->format);
> if (blent) {
> - video_format_CopyCropAr(&blent->format,
> &filtered->format);
> picture_Copy(blent, filtered);
> if (picture_BlendSubpicture(blent, sys->spu_blend,
> subpic)) {
> - picture_Release(todisplay);
> + picture_Release(filtered);
> snap_pic = todisplay = blent;
> } else
> {
> --
> 2.26.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list