public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH RFC] libv4lconvert: SDR conversion from U8 to FLOAT
Date: Fri, 15 Nov 2013 21:11:27 +0200	[thread overview]
Message-ID: <528671DF.7040707@iki.fi> (raw)
In-Reply-To: <5280DE3D.5040408@iki.fi>

On 11.11.2013 15:40, Antti Palosaari wrote:
> On 11.11.2013 15:14, Hans Verkuil wrote:
>> On 11/10/2013 06:16 PM, Antti Palosaari wrote:
>>> Convert unsigned 8 to float 32 [-1 to +1], which is commonly
>>> used format for baseband signals.


> I am also going to make some tests to find out if actual float
> conversion is faster against pre-calculated LUT, in Kernel or in
> libv4lconvert and so. Worst scenario I have currently is Mirics ADC with
> 14-bit resolution => 16384 quantization levels => 32-bit float LUT will
> be 16384 * 4 = 65536 bytes. Wonder if that much big LUT is allowed to
> library - but maybe you could alloc() and populate LUT on the fly if
> needed. Or maybe native conversion is fast enough.

That integer to float conversion uses quite much CPU still, even I use 
only 2M sampling rate.

When I do it inside Kernel, in URB completion handler at the same time 
when copying data to videobuf2, using pre-calculated LUTs and using mmap 
it eats 0.5% CPU to transfer stream to app.

When I do same but using libv4lconvert as that patch, it takes ~11% CPU.

And it was only 2M sampling rate, Mirics could go something like 15M.

I wonder if I can optimize libv4lconvert to go near in Kernel LUT 
conversion...

CPU: AMD Phenom(tm) II X4 955 Processor

regards
Antti

-- 
http://palosaari.fi/

  parent reply	other threads:[~2013-11-15 19:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 17:16 [PATCH RFC] libv4lconvert: SDR conversion from U8 to FLOAT Antti Palosaari
2013-11-11 13:14 ` Hans Verkuil
2013-11-11 13:40   ` Antti Palosaari
2013-11-11 13:52     ` Hans Verkuil
2013-11-15 19:11     ` Antti Palosaari [this message]
2013-11-15 19:13       ` Devin Heitmueller
2013-11-15 19:17         ` Antti Palosaari
2013-11-16 14:11           ` Antti Palosaari
2013-11-16 17:28             ` Hans de Goede
2013-11-11 14:19 ` Andy Walls
2013-11-11 14:38   ` Hans Verkuil
2013-11-14 13:45     ` Antti Palosaari
2013-11-14 13:50       ` Hans Verkuil
2013-11-18 17:43   ` Antti Palosaari
2013-11-16 17:27 ` Hans de Goede
2013-11-16 17:34   ` Antti Palosaari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528671DF.7040707@iki.fi \
    --to=crope@iki.fi \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox