[Bug 772872] audioconvert: superfluous quantization when converting S24LE to S24LE causing extra CPU load
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Oct 18 19:35:37 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=772872
--- Comment #17 from Petr Kulhavy <brain at jikos.cz> ---
With exactly the same caps on both sides
audio-converter.c:converter_passthrough() is not called at all, as oppose to
what I originally thought. So this is OK.
But there is still a 2% CPU difference between:
gst-launch-1.0 audiotestsrc is-live=true samplesperbuffer=48 !
"audio/x-raw,format=(string)S32LE,rate=(int)48000,channels=(int)2,channel-mask=(int)0x3"
! audioconvert !
"audio/x-raw,format=(string)S32LE,rate=(int)48000,channels=(int)2,channel-mask=(int)
0x3" ! fakesink
and
gst-launch-1.0 audiotestsrc is-live=true samplesperbuffer=48 !
"audio/x-raw,format=(string)S32LE,rate=(int)48000,channels=(int)2,channel-mask=(int)0x3"
! fakesink
which I don't see a particular reason for.
After some deeper profiling I'm starting to believe that this is due to heavy
cache misses and lot of processing in gst_audio_convert_submit_input_buffer():
DLmr Ir
-- line 790 ----------------------------------------
. . return TRUE;
. .
. . return FALSE;
. . }
. .
. . static GstFlowReturn
. . gst_audio_convert_submit_input_buffer (GstBaseTransform *
base,
. . gboolean is_discont, GstBuffer * input)
. 207,660 {
. . GstAudioConvert *this = GST_AUDIO_CONVERT (base);
. .
2 155,745 if (base->segment.format == GST_FORMAT_TIME) {
51,713 363,405 input =
182,156 29,903,118 => ???:gst_audio_buffer_clip (51915x)
. . gst_audio_buffer_clip (input, &base->segment,
this->in_info.rate,
. . this->in_info.bpf);
. .
. 103,830 if (!input)
. . return GST_FLOW_OK;
. . }
. .
77,937 467,235 return GST_BASE_TRANSFORM_CLASS
(parent_class)->submit_input_buffer (base,
8 14,328,618 => ???:0x0003f070'2 (51915x)
. . is_discont, input);
. . }
and in gst_capsfilter_prepare_buf():
DLmr Ir
-- line 391 ----------------------------------------
. . * This ensures that caps event is sent if we can, so that
pipelines like:
. . * gst-launch filesrc location=rawsamples.raw !
. . * audio/x-raw,format=S16LE,rate=48000,channels=2 !
alsasink
. . * will work.
. . */
. . static GstFlowReturn
. . gst_capsfilter_prepare_buf (GstBaseTransform * trans,
GstBuffer * input,
. . GstBuffer ** buf)
21,037 519,150 {
. . GstFlowReturn ret = GST_FLOW_OK;
. . GstCapsFilter *filter = GST_CAPS_FILTER (trans);
. .
. . /* always return the input as output buffer */
. 103,830 *buf = input;
. .
18 415,320 if (GST_PAD_MODE (trans->srcpad) == GST_PAD_MODE_PUSH
4 1,661,280 && !gst_pad_has_current_caps (trans->sinkpad)) {
357,815 29,280,131 => ???:0x048c2088 (103830x)
--
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