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 687284 - audioconvert: prefer output formats with the same depth or at least a higher depth
audioconvert: prefer output formats with the same depth or at least a higher ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-31 17:59 UTC by rohde
Modified: 2012-12-12 16:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use sample width to make an educated guess on the output format (5.12 KB, patch)
2012-10-31 17:59 UTC, rohde
none Details | Review
Enhance current code to prefer an exact match on sample depth if possible (5.24 KB, patch)
2012-10-31 19:04 UTC, rohde
committed Details | Review
Try to match audio format even better on signed/unsigned formats (6.49 KB, patch)
2012-11-01 18:00 UTC, rohde
rejected Details | Review

Description rohde 2012-10-31 17:59:46 UTC
Created attachment 227741 [details] [review]
Use sample width to make an educated guess on the output format

Audioconvert should attempt to match the outgoing sample width with the ingoing. At the moment it can do things like convert S24BE to S16LE even though S24LE is supported.
Comment 1 Tim-Philipp Müller 2012-10-31 18:09:37 UTC
Is this still needed after

 commit a66ff00908432bb984269433aadd27ba5ec86841
 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
 Date:   Thu Oct 18 22:13:09 2012 +0200

    audioconvert: enhance transforming caps
    
    ... so as to preserve input format precision,
    and preferably not convert at all.

?
Comment 2 rohde 2012-10-31 18:12:50 UTC
(In reply to comment #1)
> Is this still needed after
> 
>  commit a66ff00908432bb984269433aadd27ba5ec86841
>  Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
>  Date:   Thu Oct 18 22:13:09 2012 +0200
> 
>     audioconvert: enhance transforming caps
> 
>     ... so as to preserve input format precision,
>     and preferably not convert at all.
> 
> ?

In my test case S8 gets converted into S32LE without the patch. So unless my test is broken it seems like it is needed.
Comment 3 rohde 2012-10-31 19:04:01 UTC
Created attachment 227751 [details] [review]
Enhance current code to prefer an exact match on sample  depth if possible
Comment 4 Sebastian Dröge (slomo) 2012-11-01 13:33:02 UTC
commit bc4389806d17c8ea27d952b5b539ee9235fa3027
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 1 14:31:29 2012 +0100

    audioconvert: Also ignore the SIGNED flag when matching an output format

commit c286f8ffa2fe78aa4c43d7e589271c53b6578a36
Author: Rasmus Rohde <rohde@duff.dk>
Date:   Wed Oct 31 20:01:05 2012 +0100

    audioconvert: Prefer output formats with the same depth or at least a higher depth
    
    Enhance current code to prefer an exact match on sample depth if
    possible. Also ignore GST_AUDIO_FORMAT_FLAG_UNPACK when checking
    equality on the flags.
Comment 5 rohde 2012-11-01 18:00:38 UTC
Created attachment 227833 [details] [review]
Try to match audio format even better on signed/unsigned formats
Comment 6 Sebastian Dröge (slomo) 2012-12-12 16:32:46 UTC
Comment on attachment 227833 [details] [review]
Try to match audio format even better on signed/unsigned formats

I don't think this really makes sense as for audioconvert it doesn't make a performance difference if signedness needs to be converted or not with the current code.