All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Ser, Simon" <simon.ser@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_audio: normalize samples when extracting channel
Date: Tue, 14 May 2019 15:29:40 +0300	[thread overview]
Message-ID: <20190514122940.GX24299@intel.com> (raw)
In-Reply-To: <ecff393779042cb7c91eb5eaee797d5870c3126e.camel@intel.com>

On Tue, May 14, 2019 at 06:32:58AM +0000, Ser, Simon wrote:
> On Mon, 2019-05-13 at 19:25 +0300, Ville Syrjälä wrote:
> > > -		dst[i] = (double) src[i * n_channels + channel];
> > > +		dst[i] = (double) src[i * n_channels + channel] / INT32_MAX;
> > 
> > Do we care that the most negative value could result
> > in a normalized value < -1.0?
> 
> Ah, good point.
> 
> I'd be tempted not to care. These values are just used to compare the
> amplitude of the signal we send to the amplitude of the signal we
> receive.
> 
> However I agree this could be unexpected, especially if someone uses
> these values for another goal. If we wanted to fix it, would
> -(double)INT32_MIN be enough? (double can represent exact integers up
> to 2^53 - 1)

Whatever works for you.

Either way
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-05-14 12:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13 14:11 [igt-dev] [PATCH i-g-t] lib/igt_audio: normalize samples when extracting channel Simon Ser
2019-05-13 15:38 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-05-13 16:25 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2019-05-14  6:32   ` Ser, Simon
2019-05-14 12:29     ` Ville Syrjälä [this message]
2019-05-13 18:36 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork

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=20190514122940.GX24299@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=simon.ser@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.