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 775377 - opencv: cvlaplace/cvsobel/edgedetect should use the already mapped outimage
opencv: cvlaplace/cvsobel/edgedetect should use the already mapped outimage
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-30 03:07 UTC by Nicolas Dufresne (ndufresne)
Modified: 2016-12-02 02:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cvsobel: Remove redundant CAPS event handler (3.39 KB, patch)
2016-12-02 02:56 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
cvsobel: Avoid extra copy of the output image (2.73 KB, patch)
2016-12-02 02:56 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
cvlaplace: Remove redundant CAPS event handler (3.85 KB, patch)
2016-12-02 02:56 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
cvlaplace: Avoid extra copy of the output image (2.93 KB, patch)
2016-12-02 02:56 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
edgedetect: Remove redundant CAPS event handler (3.47 KB, patch)
2016-12-02 02:56 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
edgedetect: Avoid extra copy of the output image (2.90 KB, patch)
2016-12-02 02:56 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Nicolas Dufresne (ndufresne) 2016-11-30 03:07:23 UTC
Those element maps again the output buffer in order to write the result. In fact, the buffer is already mapped and accessible through the IplImage. The implementation of the map also ignores VideoMeta and ignore the map return value.

It's likely that we can save a copy while fixing this.
Comment 1 Nicolas Dufresne (ndufresne) 2016-12-02 02:56:14 UTC
Created attachment 341194 [details] [review]
cvsobel: Remove redundant CAPS event handler

There is already a cv_set_caps() implemented, so just do the
entire work there.
Comment 2 Nicolas Dufresne (ndufresne) 2016-12-02 02:56:18 UTC
Created attachment 341195 [details] [review]
cvsobel: Avoid extra copy of the output image

Simply produce the result into the output image provided by the base
class. This avoid useless copy. This also removes unchecked buffer map
and ensure that GstVideoMeta is respected (for stride mostly).
Comment 3 Nicolas Dufresne (ndufresne) 2016-12-02 02:56:22 UTC
Created attachment 341196 [details] [review]
cvlaplace: Remove redundant CAPS event handler

There is already a cv_set_caps() implemented, so just do the
entire work there.
Comment 4 Nicolas Dufresne (ndufresne) 2016-12-02 02:56:26 UTC
Created attachment 341197 [details] [review]
cvlaplace: Avoid extra copy of the output image

Simply produce the result into the output image provided by the base
class. This avoid useless copy. This also removes unchecked buffer map
and ensure that GstVideoMeta is respected (for stride mostly).
Comment 5 Nicolas Dufresne (ndufresne) 2016-12-02 02:56:29 UTC
Created attachment 341198 [details] [review]
edgedetect: Remove redundant CAPS event handler

There is already a cv_set_caps() implemented, so just do the
entire work there.
Comment 6 Nicolas Dufresne (ndufresne) 2016-12-02 02:56:33 UTC
Created attachment 341199 [details] [review]
edgedetect: Avoid extra copy of the output image

Simply produce the result into the output image provided by the base
class. This avoid useless copy. This also removes unchecked buffer map
and ensure that GstVideoMeta is respected (for stride mostly).
Comment 7 Nicolas Dufresne (ndufresne) 2016-12-02 02:58:56 UTC
Those also fixes error when using glimagesink right after those filters because
buffers were not being unmapped.

Attachment 341194 [details] pushed as 7a284f1 - cvsobel: Remove redundant CAPS event handler
Attachment 341195 [details] pushed as 02b20f6 - cvsobel: Avoid extra copy of the output image
Attachment 341196 [details] pushed as 50e0165 - cvlaplace: Remove redundant CAPS event handler
Attachment 341197 [details] pushed as ff6ed23 - cvlaplace: Avoid extra copy of the output image
Attachment 341198 [details] pushed as 63d4c89 - edgedetect: Remove redundant CAPS event handler
Attachment 341199 [details] pushed as 79b7d07 - edgedetect: Avoid extra copy of the output image