From: Saul Wold <sgw@linux.intel.com>
To: Fahad Arslan <fahad_arslan@mentor.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] speex: Scale float input when FIXED_POINT is defined
Date: Fri, 20 Dec 2013 08:14:20 -0800 [thread overview]
Message-ID: <52B46CDC.40003@linux.intel.com> (raw)
In-Reply-To: <1387555576-9567-1-git-send-email-fahad_arslan@mentor.com>
On 12/20/2013 08:06 AM, Fahad Arslan wrote:
> From: Fahad Arslan <Fahad_Arslan@mentor.com>
>
> When Speex is compiled with FIXED_POINT defined, it scales float
> input to +/-32768 instead of +/-1. This was being missed at one
> point causing the input to the resampler to be zeroed. As a result
> there was no audio output.
>
> Signed-off-by: Fahad Arslan <Fahad_Arslan@mentor.com>
> ---
> .../speex/speex/scaling_fix.patch | 12 ++++++++++++
> meta/recipes-multimedia/speex/speex_1.2rc1.bb | 3 ++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-multimedia/speex/speex/scaling_fix.patch b/meta/recipes-multimedia/speex/speex/scaling_fix.patch
> new file mode 100644
> index 0000000..a6340d7
> --- /dev/null
> +++ b/meta/recipes-multimedia/speex/speex/scaling_fix.patch
The patch needs Upstream-Status: and Signed-off-by: tags please
Sau!
> @@ -0,0 +1,12 @@
> +diff -NaurbB a/libspeex/resample.c b/libspeex/resample.c
> +--- a/libspeex/resample.c 2013-12-20 19:47:49.154454769 +0500
> ++++ b/libspeex/resample.c 2013-12-20 19:48:16.558454331 +0500
> +@@ -915,7 +915,7 @@
> + if (in) {
> + for(j=0;j<ichunk;++j)
> + #ifdef FIXED_POINT
> +- x[j+st->filt_len-1]=WORD2INT(in[j*istride_save]);
> ++ x[j+st->filt_len-1]=WORD2INT(32768.*in[j*istride_save]);
> + #else
> + x[j+st->filt_len-1]=in[j*istride_save];
> + #endif
> diff --git a/meta/recipes-multimedia/speex/speex_1.2rc1.bb b/meta/recipes-multimedia/speex/speex_1.2rc1.bb
> index faf63b0..0fea51e 100644
> --- a/meta/recipes-multimedia/speex/speex_1.2rc1.bb
> +++ b/meta/recipes-multimedia/speex/speex_1.2rc1.bb
> @@ -9,7 +9,8 @@ DEPENDS = "libogg"
>
> PR = "r2"
>
> -SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-1.2rc1.tar.gz"
> +SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-1.2rc1.tar.gz \
> + file://scaling_fix.patch"
>
> SRC_URI[md5sum] = "c4438b22c08e5811ff10e2b06ee9b9ae"
> SRC_URI[sha256sum] = "342f30dc57bd4a6dad41398365baaa690429660b10d866b7d508e8f1179cb7a6"
>
next prev parent reply other threads:[~2013-12-20 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 16:06 [PATCH] speex: Scale float input when FIXED_POINT is defined Fahad Arslan
2013-12-20 16:14 ` Saul Wold [this message]
2013-12-24 13:52 ` Arslan, Fahad
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=52B46CDC.40003@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=fahad_arslan@mentor.com \
--cc=openembedded-core@lists.openembedded.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