After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726363 - vaapipostproc does not copy buffer meta across when it should
vaapipostproc does not copy buffer meta across when it should
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 720305
 
 
Reported: 2014-03-14 18:49 UTC by Simon Farnsworth
Modified: 2014-07-03 21:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] postproc: Copy input buffer metadata across to output when using VPP (1.21 KB, patch)
2014-03-14 18:50 UTC, Simon Farnsworth
none Details | Review
Minor fix for complier dependent issue (1.36 KB, patch)
2014-06-27 11:00 UTC, Simon Farnsworth
none Details | Review

Description Simon Farnsworth 2014-03-14 18:49:51 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.
Comment 1 Simon Farnsworth 2014-03-14 18:50:05 UTC
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(-)
Comment 2 Gwenole Beauchesne 2014-06-18 13:53:51 UTC
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].
Comment 3 Gwenole Beauchesne 2014-06-18 13:58:42 UTC
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?
Comment 4 Simon Farnsworth 2014-06-18 13:59:31 UTC
It's crop regions that I've noticed; I have no examples with anything other than crop regions.
Comment 5 Gwenole Beauchesne 2014-06-18 14:26:40 UTC
Could you please try the current git master branch? Thanks.
Comment 6 Simon Farnsworth 2014-06-19 12:57:31 UTC
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.
Comment 7 Simon Farnsworth 2014-06-27 11:00:35 UTC
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.
Comment 8 Gwenole Beauchesne 2014-07-03 21:15:47 UTC
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>