vaapipostproc + (brightness|saturation|contrast) + huge memory leak

Víctor Jáquez vjaquez at igalia.com
Wed Apr 22 06:38:20 UTC 2020


On Tue, 21 Apr 2020 at 12:55, Timtchenko, Michael wrote:
> Hi all,
> i'm currently facing a very strange behaviour within the gstreamer module
> vaapipostproc in version 1.16.2. I'm using this module for postprocessing of
> my video stream. Especially for adjustment of brightness, saturation and
> contrast, by changing the modules properties.
> The decoding of the stream with vaapi, as well as the gl-texture-upload by
> glupload works like a charm. But when the stream is running and I'm trying to
> change the properties for brightness, saturation or contrast many times (in a
> calibration manner), I'm running out of memory.
> Is it possible that there is a huge memory leak? When I'm steadily calibrating
> the mentioned properties for about 30 secs, I get an increase of memory about
> 2 GB. (I know from 14.4.4, that there were some issues related to a mutual
> exclusive color calibration, which were fixed by a patch.)  Could someone
> verify this issue?
> Below I've attached the relevant code sequences:
> Construction:
> ...
>     auto postproc = gst_element_factory_make( "vaapipostproc", "postproc" );
>     auto upload = gst_element_factory_make( "glupload", "upload" );
>     GstCaps* caps = gst_caps_from_string( "video/x-raw(memory:DMABuf), format=RGBA" );
>     if( !gst_element_link_filtered( postproc, upload, caps ) )
> ...
> Setter for Properties (the lines below are executed very often, while stream is running):
> ...
> gfloat tmp = 0.5
> g_object_set( G_OBJECT( vaapipostproc ), "brightness", tmp, NULL );
> ...
> Not sure whether i'm doing wrong, or there is sth broken in vaapipostproc.
> Kind regards
> Michael

Hi Michael,

Are you changing the state of the pipeline frequently? I ask it because there's
a bug, but only reported on decoders:
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/27

How do you measure the memory leak?

You mention "gl-texture-upload" with decoders, but your pipeline uses
dmabuf. Which one are you using completely? Do you have a simple test program to
replicate the leak?

cheers

vmjl


More information about the gstreamer-devel mailing list