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 726161 - png plugin handles interlaced png files incorrectly
png plugin handles interlaced png files incorrectly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.2.2
Other All
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-12 09:23 UTC by Rafał Mużyło
Modified: 2014-04-12 11:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
load interlaced png correctly (1.04 KB, patch)
2014-03-12 09:23 UTC, Rafał Mużyło
none Details | Review
a slightly improved patch (1.47 KB, patch)
2014-03-12 13:50 UTC, Rafał Mużyło
none Details | Review
fixed a "typo" in the previous version (1.47 KB, patch)
2014-03-12 13:53 UTC, Rafał Mużyło
none Details | Review
fixed another "typo"...:sigh: (1.59 KB, patch)
2014-03-12 14:04 UTC, Rafał Mużyło
committed Details | Review

Description Rafał Mużyło 2014-03-12 09:23:55 UTC
Created attachment 271582 [details] [review]
load interlaced png correctly

1. gst-launch-1.0 filesrc location=<a png file> ! decodebin ! imagefreze !videoconvert ! autovideosink
2. convert that file to interlaced
3. gst-launch-1.0 filesrc location=<the converted file> ! decodebin ! imagefreze !videoconvert ! autovideosink
4. note the difference

I did some digging around and eventually came up with a fix...
The speed is nearly unacceptable, but that likely the price for progressive load.

On a funny note: as for the FIXME about interlaced images, it was already in 0.10, but the images worked correctly there (likely due to png_read_image autocorrecting stuff).
Comment 1 Rafał Mużyło 2014-03-12 13:50:01 UTC
Created attachment 271600 [details] [review]
a slightly improved patch

Improved previous patch a little bit - if the returned row == NULL (which happens a lot if interlaced), skip even mapping the buffer.
Comment 2 Rafał Mużyło 2014-03-12 13:53:42 UTC
Created attachment 271602 [details] [review]
fixed a "typo" in the previous version
Comment 3 Rafał Mużyło 2014-03-12 14:04:25 UTC
Created attachment 271603 [details] [review]
fixed another "typo"...:sigh:
Comment 4 Thiago Sousa Santos 2014-04-11 23:25:40 UTC
Thanks for your patch. For future reference, if possible, submit the patch using git format-patch for easier merging by maintainers.

commit b32de2794b3a73f78a03f6018aed9150a95ff0aa
Author: Rafał Mużyło <galtgendo@o2.pl>
Date:   Thu Apr 10 10:38:19 2014 -0300

    pngdec: enable libpng interlaced picture handling
    
    Makes libpng deinterlace Adam7 interlaced pictures
    by default. It is the only interlaced format available
    and if the picture isn't interlaced the code should behave
    as before.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726161
Comment 5 Rafał Mużyło 2014-04-12 11:23:19 UTC
(In reply to comment #4)
> Thanks for your patch. For future reference, if possible, submit the patch
> using git format-patch for easier merging by maintainers.
> 

I'm quite aware of git - especially the disk space a clone can take.
Comment 6 Tim-Philipp Müller 2014-04-12 11:50:50 UTC
> I'm quite aware of git - especially the disk space a clone can take.

For what it's worth: if that is really a concern (the git tree is not too difficult to remove again after making the patch, after all), you can simply import a release tarball into an empty inited git directory and then make patches on top of that.