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 662949 - [h264parse] Doesn't use PAR from bitstream
[h264parse] Doesn't use PAR from bitstream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-28 16:38 UTC by Edward Hervey
Modified: 2011-12-01 08:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
codecparser: Compute pixel-aspect-ratio (3.55 KB, patch)
2011-10-28 16:39 UTC, Edward Hervey
none Details | Review
h264parse: If the bitstream provides a pixel-aspect-ratio, use it (3.10 KB, patch)
2011-10-28 16:39 UTC, Edward Hervey
none Details | Review

Description Edward Hervey 2011-10-28 16:38:42 UTC
We don't read (and even less use) the pixel aspect ratio from the codec bitstream.
Comment 1 Edward Hervey 2011-10-28 16:39:19 UTC
Created attachment 200193 [details] [review]
codecparser: Compute pixel-aspect-ratio

Avoids callers having to dig the info in the VUI
Comment 2 Edward Hervey 2011-10-28 16:39:23 UTC
Created attachment 200194 [details] [review]
h264parse: If the bitstream provides a pixel-aspect-ratio, use it
Comment 3 Sebastian Dröge (slomo) 2011-10-29 10:03:09 UTC
You should only use the in-stream PAR if there's no PAR inside the container (or upstream for that matter). The same applies to the framerate too.

(That's at least the behaviour we implement in most/all decoders and I think parsers should be the same)
Comment 4 Edward Hervey 2011-11-03 12:05:02 UTC
I can modify it so that it only overrides it if the upstream PAR is 1/1.

This is what gst-ffmpeg does, and makes sense.
Comment 5 Sebastian Dröge (slomo) 2011-11-07 13:22:13 UTC
If upstream provides a PAR it should really use that PAR. If (in the case of qtdemux) upstream doesn't really know the PAR it should simply not set the PAR on the caps. Elements should be able to trust the caps provided by upstream.

So, set the PAR from the h264 stream only if upstream didn't put a PAR field into the caps. This requires a change in qtdemux and the same should be changed in the ffmpeg decoders too
Comment 6 Matej Knopp 2011-11-26 20:48:20 UTC
Some containers have PAR set that is wrong, but it is still set. Shouldn't PAR from stream take precedence?
Comment 7 Sebastian Dröge (slomo) 2011-11-27 12:22:08 UTC
Usually the PAR from the container is the more correct one
Comment 8 Alessandro Decina 2011-12-01 08:10:30 UTC
commit 4474db4e71007c47a54af0e497ed500f4affb96e
Author: Alessandro Decina <alessandro.d@gmail.com>
Date:   Thu Dec 1 09:02:46 2011 +0100

    h264parse: let upstream PAR override in-stream PAR

commit 21b063a78c6edfcd9ab1f1ea23ff1efb55ba85bf
Author: Alessandro Decina <alessandro.decina@collabora.co.uk>
Date:   Wed Nov 23 18:26:44 2011 +0100

    h264parse: rework PAR parsing
    
    And in the process refactor _update_src_caps a bit

commit 6d85d4882aafbdc5701551923b76dafa353dd332
Author: Luciana Fujii Pontello <lucianafujii@collabora.co.uk>
Date:   Wed Nov 16 00:03:12 2011 -0500

    h264parse: respect pixel-aspect-ratio
    
    Parse pixel-aspect-ratio in vui information.