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 763006 - checksumsink: Add ability to checksum video planes
checksumsink: Add ability to checksum video planes
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-02 18:44 UTC by Scott D Phillips
Modified: 2018-11-03 13:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH 1/3] debugutils: checksumsink: Make checksum type a property (5.52 KB, patch)
2016-03-02 18:47 UTC, Scott D Phillips
committed Details | Review
[PATCH 2/3] debugutils: checksumsink: Add option to checksum video planes individually (6.84 KB, patch)
2016-03-02 18:47 UTC, Scott D Phillips
none Details | Review
[PATCH 3/3] debugutils: checksumsink: Support GstVideoCropMeta (4.87 KB, patch)
2016-03-02 18:48 UTC, Scott D Phillips
none Details | Review
[PATCH v2 2/3] debugutils: checksumsink: Add option to checksum video planes individually (6.90 KB, patch)
2016-03-03 18:33 UTC, Scott D Phillips
none Details | Review
[PATCH v2 3/3] debugutils: checksumsink: Support GstVideoCropMeta (4.93 KB, patch)
2016-03-03 18:34 UTC, Scott D Phillips
none Details | Review
[PATCH v3 3/3] debugutils: checksumsink: Support GstVideoCropMeta (2.73 KB, patch)
2016-03-03 20:53 UTC, Scott D Phillips
none Details | Review
[PATCH] debugutils: create the `videospy` element (11.27 KB, patch)
2016-04-28 22:26 UTC, Scott D Phillips
none Details | Review

Description Scott D Phillips 2016-03-02 18:44:33 UTC
Enhance checksumsink to optionally generate checksums of individual video planes. These per-plane checksums can be used as a validation aid with H.265 streams which contain decoded_picture_hash SEI messages.
Comment 1 Scott D Phillips 2016-03-02 18:47:21 UTC
Created attachment 322903 [details] [review]
[PATCH 1/3] debugutils: checksumsink: Make checksum type a property
Comment 2 Scott D Phillips 2016-03-02 18:47:54 UTC
Created attachment 322905 [details] [review]
[PATCH 2/3] debugutils: checksumsink: Add option to checksum video planes individually
Comment 3 Scott D Phillips 2016-03-02 18:48:20 UTC
Created attachment 322906 [details] [review]
[PATCH 3/3] debugutils: checksumsink: Support GstVideoCropMeta
Comment 4 Scott D Phillips 2016-03-03 18:33:34 UTC
Created attachment 323014 [details] [review]
[PATCH v2 2/3] debugutils: checksumsink: Add option to checksum video planes individually
Comment 5 Scott D Phillips 2016-03-03 18:34:17 UTC
Created attachment 323015 [details] [review]
[PATCH v2 3/3] debugutils: checksumsink: Support GstVideoCropMeta
Comment 6 Nicolas Dufresne (ndufresne) 2016-03-03 18:55:32 UTC
Review of attachment 323015 [details] [review]:

Looks like a good idea, though I'm not sure about the property. Why do we need a property ?
Comment 7 Scott D Phillips 2016-03-03 18:59:29 UTC
(In reply to Nicolas Dufresne (stormer) from comment #6)
> Review of attachment 323015 [details] [review] [review]:
> 
> Looks like a good idea, though I'm not sure about the property. Why do we
> need a property ?

I was thinking that it would be able to choose multiple ways to checksum the input that you could choose with a property. Do you think it would be better to just always checksum the video planes if video is given? Or maybe to put this into a separate element?
Comment 8 Nicolas Dufresne (ndufresne) 2016-03-03 19:13:14 UTC
My thinking was more that doing a checksum of the data outside the crop area is useless. Maybe you have a valid use case for that ? Note, if you don't support CropMeta, the data will be copied before being sent to this sink.
Comment 9 Scott D Phillips 2016-03-03 19:19:21 UTC
(In reply to Nicolas Dufresne (stormer) from comment #8)
> My thinking was more that doing a checksum of the data outside the crop area
> is useless. Maybe you have a valid use case for that ? Note, if you don't
> support CropMeta, the data will be copied before being sent to this sink.

Ah, right. So the H.265 decoded_picture_hash case is the one where I need to disregard crop data and checksum the whole original frame.

From what you're saying though it sounds like that shouldn't really work for me, but it currently does with gstreamer-vaapi. If I understand correctly it sounds like vaapidecode should be making a copy of just the cropped area if the CropMeta isn't supported instead of its current behavior of sending the full frame.
Comment 10 Nicolas Dufresne (ndufresne) 2016-03-03 20:39:28 UTC
Yes, gstreamer-vaapi miss-behave when VideoMeta or VideoCropMeta is missing. I have told Victor recently. The -base libraries are missing few helpers to help with that (for the crop). The point here, is that there is very little use for calculating the checksum over a portion of the image that falls outside of the crop area, as the values in that portion are not significant. Its like doing the checksum ignoring the VideoMeta.
Comment 11 Scott D Phillips 2016-03-03 20:53:54 UTC
Created attachment 323024 [details] [review]
[PATCH v3 3/3] debugutils: checksumsink: Support GstVideoCropMeta

(In reply to Nicolas Dufresne (stormer) from comment #10)
> Yes, gstreamer-vaapi miss-behave when VideoMeta or VideoCropMeta is missing.
> I have told Victor recently. The -base libraries are missing few helpers to
> help with that (for the crop). The point here, is that there is very little
> use for calculating the checksum over a portion of the image that falls
> outside of the crop area, as the values in that portion are not significant.
> Its like doing the checksum ignoring the VideoMeta.

Yep, understood. Here's an updated patch which removes that useless property.
Comment 12 Tim-Philipp Müller 2016-04-22 19:52:14 UTC
Comment on attachment 322903 [details] [review]
[PATCH 1/3] debugutils: checksumsink: Make checksum type a property

Thanks, pushed this with minor changes (edits to the enum descriptions):

commit 2830145a7121d3c464a82be356d0fe33e3164dd4
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Tue Mar 1 14:54:01 2016 -0800

    checksumsink: add "hash" property and allow more checksum types
    
    Now any GChecksumType can be used by GstChecksumSink, adding
    support for MD5, SHA-256 and SHA-512 in addition to SHA-1.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763006
Comment 13 Tim-Philipp Müller 2016-04-22 23:01:50 UTC
I'm a bit undecided about the other video-specific patches, I'm wondering if it would make sense to add a video-specific subclass/variant instead of adding extra video-specific stuff to this one.

On a side note, I dislike the fact that the element prints things to stdout instead of posting messages with the data on the bus or such. I'm guessing you just pipe the output to stdout and then diff against the expected output?
Comment 14 Scott D Phillips 2016-04-28 22:26:51 UTC
Created attachment 326973 [details] [review]
[PATCH] debugutils: create the `videospy` element

Hi Tim, thanks for the review. I notice that right next to the checksumsink element is the debugspy element that posts messages to the bus instead of printing to stdout. Here's a patch that makes a new element 'videospy' derived from debugspy that posts per-plane checksums to the bus.
Comment 15 GStreamer system administrator 2018-11-03 13:47:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/354.