[Bug 773073] audioconvert: endian conversion optimization
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sat Oct 22 09:06:43 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=773073
--- Comment #21 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
(In reply to Petr Kulhavy from comment #20)
> Thank you for the review and the extra info.
>
> How is the ORC integrated into the code? Does it have to be enclosed in
> something like #if ORC_ENABLED and otherwise use the C implementation? Or
> does it take care of everything automatically?
>
> And then where to store the ORC code?
Check the .orc file in gst-libs/gst/audio and just add your stuff there :)
> In ORC I have not found anything for 24-bit handling other than 24->32 bit
> expansion. 24 bits is the actual difficult part that needs optimization. How
> would that be written?
That's actually a good question and I don't know. ORC works on power-of-two
sized types, 24 bits doesn't fit in there. It might make sense to include
assembly for that specific conversion, but that's a big maintainence burden in
the long run.
> Regarding the in-place implementation my idea is the following:
> * gst_audio_converter_new() gets an extra boolean * parameter, where it
> returns if the conversion can be done in-place
>
> * gst_audio_convert_transform() calls gst_base_transform_set_in_place() if
> the above returned value is true
It would be better to call set_in_place() in set_caps(), which is the point
where you have all informations about which formats to convert between.
> * new function gst_audio_convert_transform_ip() needs to be added into
> gstaudioconvert.c - here I'm not sure if it has to be completely separate
> implementation or it can just call gst_audio_convert_transform(base, buf,
> buf);
> The convert_endian() function can already handle in==out
That can probably be the same function, just ensure to add an assertion that
in==out is only allowed if the conversion can be done in-place
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list