Is there a way to crop in VAAPI?

Michael Olbrich m.olbrich at pengutronix.de
Tue Aug 6 08:28:49 UTC 2019


On Mon, Aug 05, 2019 at 12:29:33PM -0500, kmliu wrote:
> > If I read the code correctly, then vaapipostproc already suppports>
> GstVideoCropMeta. So I think you could do ... ! vaapih264dec !>
> vaapipostproc ! ... and add a pad probe that adds the crop meta to each>
> buffer.> MichaelIsn't GstVideoCropMeta just a tag that "tells" the
> downstream elements that the frame should be cropped? I'm not sure if it
> would reduce the amount of data copied from graphics memory to main memory.

No, it contains a rectangle that describes the core area[1]. From what I
can see in the vaapipostproc code, this cropping is applied during the
transformation.

Michael

[1] https://gstreamer.freedesktop.org/documentation/video/gstvideometa.html?gi-language=c#GstVideoCropMeta

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


More information about the gstreamer-devel mailing list