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 364856 - pngenc stride problems
pngenc stride problems
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.10
Other Linux
: Normal normal
: 0.10.11
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-25 00:46 UTC by Jason Gerard DeRose
Modified: 2006-11-30 22:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
853x480 (528.03 KB, image/png)
2006-10-25 00:47 UTC, Jason Gerard DeRose
Details
852x480 (525.61 KB, image/png)
2006-10-25 00:49 UTC, Jason Gerard DeRose
Details
851x480 (526.97 KB, image/png)
2006-10-25 00:49 UTC, Jason Gerard DeRose
Details

Description Jason Gerard DeRose 2006-10-25 00:46:07 UTC
I'm working on a DVD ripper and have encounter a strange problem.  I'm creating thumbnails from each title, scaled to the correct aspect ratio taking into account the pixel-aspect-ratio caps property.  At certain target resolutions, the resulting frame is black and white and is sheered to the left (I have png's below to illustrate).  At other resolutions, the color is correct, but the sheer is steeper.  Seems to be a problem with the pixel array access math.

The pipeline is dvdreadsrc ! dvddemux ! mpeg2dec ! videoscale ! ffmpegcolorspace ! pngenc ! fakesink.

I'm picking up the frame in a 'preroll-handoff' handler.  The source video is 720x480 with a pixel-aspect-ratio of 32/27.  If scaled to:

853x480 (correct aspect ratio): black and white, sheered to left.
852x480: no error
851x480: correct color, but even steeper sheer to left
Comment 1 Jason Gerard DeRose 2006-10-25 00:47:55 UTC
Created attachment 75341 [details]
853x480
Comment 2 Jason Gerard DeRose 2006-10-25 00:49:03 UTC
Created attachment 75342 [details]
852x480
Comment 3 Jason Gerard DeRose 2006-10-25 00:49:59 UTC
Created attachment 75343 [details]
851x480
Comment 4 David Schleef 2006-10-26 18:39:42 UTC
Yeah, it's kinda well-known that ffmpegcolorspace doesn't handle widths that aren't multiples of 4.
Comment 5 Wim Taymans 2006-10-27 17:01:06 UTC
David, you have any specific pipeline to demonstrate the ffmpegcolorspace problem? I can't seem to make it fail no matter what width or colorspace I feed it and the code to calculate various strides also seems correct.

pngenc uses the wrong stride when reading the input buffer.
Comment 6 Wim Taymans 2006-10-27 17:11:03 UTC
        * ext/libpng/gstpngenc.c: (gst_pngenc_setcaps), (gst_pngenc_chain):
        * ext/libpng/gstpngenc.h:
        Fix strides. Fixes #364856.
        Cleanup capsnego.
        Set caps on outgoing buffers.