From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t 2/6] lib/audio: Replace sqrt(a*a + b*b) with hypot(a, b) Date: Mon, 14 May 2018 09:02:47 +0100 [thread overview] Message-ID: <20180514080251.11224-2-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20180514080251.11224-1-chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- lib/igt_audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/igt_audio.c b/lib/igt_audio.c index 2321d1c6e..229ce6c69 100644 --- a/lib/igt_audio.c +++ b/lib/igt_audio.c @@ -266,9 +266,7 @@ bool audio_signal_detect(struct audio_signal *signal, int channels, max = 0; for (i = 0; i < frames / 2; i++) { - amplitude[i] = sqrt(data[i] * data[i] + - data[frames - i] * - data[frames - i]); + amplitude[i] = hypot(data[i], data[frames - i]); if (amplitude[i] > max) max = amplitude[i]; } -- 2.17.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t 2/6] lib/audio: Replace sqrt(a*a + b*b) with hypot(a, b) Date: Mon, 14 May 2018 09:02:47 +0100 [thread overview] Message-ID: <20180514080251.11224-2-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20180514080251.11224-1-chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- lib/igt_audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/igt_audio.c b/lib/igt_audio.c index 2321d1c6e..229ce6c69 100644 --- a/lib/igt_audio.c +++ b/lib/igt_audio.c @@ -266,9 +266,7 @@ bool audio_signal_detect(struct audio_signal *signal, int channels, max = 0; for (i = 0; i < frames / 2; i++) { - amplitude[i] = sqrt(data[i] * data[i] + - data[frames - i] * - data[frames - i]); + amplitude[i] = hypot(data[i], data[frames - i]); if (amplitude[i] > max) max = amplitude[i]; } -- 2.17.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-05-14 8:02 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-14 8:02 [PATCH i-g-t 1/6] overlay: Remove the miscalculation of window position Chris Wilson 2018-05-14 8:02 ` [igt-dev] " Chris Wilson 2018-05-14 8:02 ` Chris Wilson [this message] 2018-05-14 8:02 ` [igt-dev] [PATCH i-g-t 2/6] lib/audio: Replace sqrt(a*a + b*b) with hypot(a, b) Chris Wilson 2018-05-14 10:20 ` Tvrtko Ursulin 2018-05-14 10:20 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin 2018-05-14 8:02 ` [PATCH i-g-t 3/6] igt/gem_ctx_thrash: Order writes between contexts Chris Wilson 2018-05-14 8:02 ` [igt-dev] " Chris Wilson 2018-05-14 10:59 ` Tvrtko Ursulin 2018-05-14 10:59 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin 2018-05-14 15:10 ` Chris Wilson 2018-05-14 15:10 ` [igt-dev] [Intel-gfx] " Chris Wilson 2018-05-15 8:20 ` Tvrtko Ursulin 2018-05-15 8:20 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin 2018-05-15 8:29 ` Chris Wilson 2018-05-15 8:29 ` [igt-dev] [Intel-gfx] " Chris Wilson 2018-05-15 8:45 ` Tvrtko Ursulin 2018-05-15 8:45 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin 2018-05-14 8:02 ` [PATCH i-g-t 4/6] igt/gem_eio: Exercise banning Chris Wilson 2018-05-14 8:02 ` [igt-dev] " Chris Wilson 2018-05-14 11:01 ` Tvrtko Ursulin 2018-05-14 11:01 ` [Intel-gfx] " Tvrtko Ursulin 2018-05-14 8:02 ` [PATCH i-g-t 5/6] tests/gem_eio: Only wait-for-idle inside trigger_reset() Chris Wilson 2018-05-14 8:02 ` [igt-dev] " Chris Wilson 2018-05-14 11:03 ` Tvrtko Ursulin 2018-05-14 11:03 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin 2018-05-14 11:07 ` Chris Wilson 2018-05-14 11:07 ` [Intel-gfx] " Chris Wilson 2018-05-14 8:02 ` [PATCH i-g-t 6/6] tests/gem_exec_latency: New subtests for checking submission from RT tasks Chris Wilson 2018-05-14 8:02 ` [igt-dev] " Chris Wilson 2018-05-14 11:13 ` Tvrtko Ursulin 2018-05-14 11:13 ` [Intel-gfx] " Tvrtko Ursulin 2018-05-14 11:25 ` Chris Wilson 2018-05-14 11:25 ` [Intel-gfx] " Chris Wilson 2018-05-14 8:52 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] overlay: Remove the miscalculation of window position Patchwork 2018-05-14 10:18 ` [PATCH i-g-t 1/6] " Tvrtko Ursulin 2018-05-14 10:18 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin 2018-05-14 10:31 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/6] " 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=20180514080251.11224-2-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.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: linkBe 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.