GNOME Bugzilla – Bug 726363
vaapipostproc does not copy buffer meta across when it should
Last modified: 2014-07-03 21:15:47 UTC
Buffer meta covers things like crop metadata, which are used elsewhere in the buffer chain (notably by vaapisink) - the attached patch copies it across when using VPP.
Created attachment 271940 [details] [review] [PATCH] postproc: Copy input buffer metadata across to output when using VPP The meta on the input includes things like crop regions; these are important to ensure correct display of material. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> --- gst/vaapi/gstvaapipostproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I think crop regions only need to be copied over in passthrough mode, i.e. without VPP. If VPP is enabled, then the crop region need to be applied to the pipeline with gst_vaapi_filter_set_cropping_rectangle() [bug #720730].
I mean, applied if we additionally have another filter enabled (e.g. scaling). Other meta data would indeed need to be propagated, but do we have any for testing?
It's crop regions that I've noticed; I have no examples with anything other than crop regions.
Could you please try the current git master branch? Thanks.
Current git master works. Looks like: commit b3401dbb294eac4bd91d8d92c1f1ecafe72d8c59 Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Date: Wed Jun 18 16:16:34 2014 +0200 vaapipostproc: add support for crop regions in VPP mode. Apply video cropping regions stored in GstVideoCropMeta, or in older GstVaapiSurfaceProxy representation, to VPP pipelines. In non-VPP modes, the crop meta are already propagated to the output buffers. https://bugzilla.gnome.org/show_bug.cgi?id=720730 fixed it for me.
Created attachment 279378 [details] [review] Minor fix for complier dependent issue Had issues, caused by tmp_rect being overwritten before use in some builds but not others. Attached patch moves it up a scope, so that it's not taken out of scope before the filter call is made.
commit 4d2de696a99201d53371fbe3c0dcb51d33404a9a Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Date: Fri Jun 27 11:57:11 2014 +0100 vaapipostproc: don't let tmp_rect go out of scope. A compiler change showed me that tmp_rect went out of scope before it was used. Move it to the beginning of the function instead. https://bugzilla.gnome.org/show_bug.cgi?id=726363 Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> [added guards for GStreamer 0.10 builds] Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>