Hi Rama,
Sorry about the confusion. I actually meant the file at the output of the AMR-NB
encoder alone (not the decoded output) . Anyway, thanks for taking time to
answer my questions.
Cheers,
Ashwin
----- Original Message ----
From: Rama Krishna K
To: ashwin_c29
Cc: s...
Sent: Monday, August 4, 2008 11:24:44 PM
Subject: Re: [speechcoding] AMR-NB codec :
Hi Ashwin,
Please find answers below.
Regards,
Rama
On 03/08/2008, ashwin_c29 wrote:
>
> Hi All,
>
> Had a small doubt regarding the AMR codec.
> Why is the file size (file
> obtained at the output of an AMR-NB codec) constant for all AMR rates
> even though there is a different bit allocation for each 20 ms speech
> frame of the input file corresponding to each of these rates.
[Rama]: AMR-NB codec contains both Encoder and Decoder.
Encoder encodes each 20ms speech frame to corrresponding bit rate
specified at the encoder.This is the place where compreesion happens.
for example if you are encoding using 12.2kbps,same 20ms will be
represented by 244 bits.
At the decoder,using these 244 bits we get 160 samples (20ms * 8Khz).
>(Besides the file size is also larger than that of the
input file).
[Rama]: So once it got decoded the file size should be same as input
file.
But perceptually both will be same.
> Am still a novice as regards this codec and
haven't been able to figure this out.
> It would be nice if someone could throw some light on this.
>
> Thanks,
> Ashwin.
Re: AMR-NB codec
Started by ●August 5, 2008
Reply by ●August 6, 20082008-08-06
Hi,Ashwin,
The reason is that,for each bit of the output of AMR-NB encoder is
represent by a WORD,for example, "0X81" represents "0",and "0X7F" represents
"1" in the bitstream.For example,if u use MR122 mode to encode a speech
file. you will get 244 bits per frame,but in each frame,each bit will be
changed into "0x81" or "0X7F".So the output of encoder will be bigger than
the input.maybe you can find more details in 3GPP website or ITU-T website.
Hope this will help u.
Regards,
Dejun
_____
~{7"<~HK~}: s... [mailto:s...]
~{4z1m~} Ashwin Chandrasekaran
~{7"KMJ1 ~{JU<~HK~}: Rama Krishna K
~{3-KM~}: s...
~{VwLb~}: Re: [speechcoding] AMR-NB codec
Hi Rama,
Sorry about the confusion. I actually meant the file at the output of the
AMR-NB encoder alone (not the decoded output) . Anyway, thanks for taking
time to answer my questions.
Cheers,
Ashwin
----- Original Message ----
From: Rama Krishna K
To: ashwin_c29
Cc: s...
Sent: Monday, August 4, 2008 11:24:44 PM
Subject: Re: [speechcoding] AMR-NB codec :
Hi Ashwin,
Please find answers below.
Regards,
Rama
On 03/08/2008, ashwin_c29
com> wrote:
>
> Hi All,
>
> Had a small doubt regarding the AMR codec.
> Why is the file size (file
> obtained at the output of an AMR-NB codec) constant for all AMR rates
> even though there is a different bit allocation for each 20 ms speech
> frame of the input file corresponding to each of these rates.
[Rama]: AMR-NB codec contains both Encoder and Decoder.
Encoder encodes each 20ms speech frame to corrresponding bit rate
specified at the encoder.This is the place where compreesion happens.
for example if you are encoding using 12.2kbps,same 20ms will be
represented by 244 bits.
At the decoder,using these 244 bits we get 160 samples (20ms * 8Khz).
>(Besides the file size is also larger than that of the input file).
[Rama]: So once it got decoded the file size should be same as input file.
But perceptually both will be same.
> Am still a novice as regards this codec and haven't been able to figure
this out.
> It would be nice if someone could throw some light on this.
>
> Thanks,
> Ashwin.
The reason is that,for each bit of the output of AMR-NB encoder is
represent by a WORD,for example, "0X81" represents "0",and "0X7F" represents
"1" in the bitstream.For example,if u use MR122 mode to encode a speech
file. you will get 244 bits per frame,but in each frame,each bit will be
changed into "0x81" or "0X7F".So the output of encoder will be bigger than
the input.maybe you can find more details in 3GPP website or ITU-T website.
Hope this will help u.
Regards,
Dejun
_____
~{7"<~HK~}: s... [mailto:s...]
~{4z1m~} Ashwin Chandrasekaran
~{7"KMJ1 ~{JU<~HK~}: Rama Krishna K
~{3-KM~}: s...
~{VwLb~}: Re: [speechcoding] AMR-NB codec
Hi Rama,
Sorry about the confusion. I actually meant the file at the output of the
AMR-NB encoder alone (not the decoded output) . Anyway, thanks for taking
time to answer my questions.
Cheers,
Ashwin
----- Original Message ----
From: Rama Krishna K
To: ashwin_c29
Cc: s...
Sent: Monday, August 4, 2008 11:24:44 PM
Subject: Re: [speechcoding] AMR-NB codec :
Hi Ashwin,
Please find answers below.
Regards,
Rama
On 03/08/2008, ashwin_c29
com> wrote:
>
> Hi All,
>
> Had a small doubt regarding the AMR codec.
> Why is the file size (file
> obtained at the output of an AMR-NB codec) constant for all AMR rates
> even though there is a different bit allocation for each 20 ms speech
> frame of the input file corresponding to each of these rates.
[Rama]: AMR-NB codec contains both Encoder and Decoder.
Encoder encodes each 20ms speech frame to corrresponding bit rate
specified at the encoder.This is the place where compreesion happens.
for example if you are encoding using 12.2kbps,same 20ms will be
represented by 244 bits.
At the decoder,using these 244 bits we get 160 samples (20ms * 8Khz).
>(Besides the file size is also larger than that of the input file).
[Rama]: So once it got decoded the file size should be same as input file.
But perceptually both will be same.
> Am still a novice as regards this codec and haven't been able to figure
this out.
> It would be nice if someone could throw some light on this.
>
> Thanks,
> Ashwin.
Reply by ●August 6, 20082008-08-06
Hi Ashwin,
If I've understood correctly your question relates to the COD file
output from the decoder. This file is constructed of frames of 250
16-bit words for any mode of the AMR encoder. Each word represents a
single bit of coder output. Any unused bits (i.e. words) are set to
zero, the number of words used at a given rate is determined by that
rate, i.e. 244 words at Mode 7.
There is a readme file with the 'C' reference that kind of explains
the structire of this file - a little better than I have.
I hope I got this right and that it helps.
Kind Regards,
John Rye
--- In s..., Ashwin Chandrasekaran
wrote:
> Hi Rama,
>
> Sorry about the confusion. I actually meant the file at the output
of the AMR-NB encoder alone (not the decoded output) . Anyway, thanks
for taking time to answer my questions.
>
> Cheers,
> Ashwin
>
> ----- Original Message ----
> From: Rama Krishna K
> To: ashwin_c29
> Cc: s...
> Sent: Monday, August 4, 2008 11:24:44 PM
> Subject: Re: [speechcoding] AMR-NB codec :
>
> Hi Ashwin,
>
> Please find answers below.
>
> Regards,
> Rama
>
> On 03/08/2008, ashwin_c29 wrote:
> >
> > Hi All,
> >
> > Had a small doubt regarding the AMR codec.
> > Why is the file size (file
> > obtained at the output of an AMR-NB codec) constant for all AMR
rates
> > even though there is a different bit allocation for each 20 ms
speech
> > frame of the input file corresponding to each of these rates.
> [Rama]: AMR-NB codec contains both Encoder and Decoder.
> Encoder encodes each 20ms speech frame to corrresponding bit rate
> specified at the encoder.This is the place where compreesion
happens.
> for example if you are encoding using 12.2kbps,same 20ms will be
> represented by 244 bits.
> At the decoder,using these 244 bits we get 160 samples (20ms *
8Khz).
>
> >(Besides the file size is also larger than that of the input file).
> [Rama]: So once it got decoded the file size should be same as
input file.
> But perceptually both will be same.
>
> > Am still a novice as regards this codec and haven't been able to
figure this out.
> > It would be nice if someone could throw some light on this.
> >
> > Thanks,
> > Ashwin.
> >
>
If I've understood correctly your question relates to the COD file
output from the decoder. This file is constructed of frames of 250
16-bit words for any mode of the AMR encoder. Each word represents a
single bit of coder output. Any unused bits (i.e. words) are set to
zero, the number of words used at a given rate is determined by that
rate, i.e. 244 words at Mode 7.
There is a readme file with the 'C' reference that kind of explains
the structire of this file - a little better than I have.
I hope I got this right and that it helps.
Kind Regards,
John Rye
--- In s..., Ashwin Chandrasekaran
wrote:
> Hi Rama,
>
> Sorry about the confusion. I actually meant the file at the output
of the AMR-NB encoder alone (not the decoded output) . Anyway, thanks
for taking time to answer my questions.
>
> Cheers,
> Ashwin
>
> ----- Original Message ----
> From: Rama Krishna K
> To: ashwin_c29
> Cc: s...
> Sent: Monday, August 4, 2008 11:24:44 PM
> Subject: Re: [speechcoding] AMR-NB codec :
>
> Hi Ashwin,
>
> Please find answers below.
>
> Regards,
> Rama
>
> On 03/08/2008, ashwin_c29 wrote:
> >
> > Hi All,
> >
> > Had a small doubt regarding the AMR codec.
> > Why is the file size (file
> > obtained at the output of an AMR-NB codec) constant for all AMR
rates
> > even though there is a different bit allocation for each 20 ms
speech
> > frame of the input file corresponding to each of these rates.
> [Rama]: AMR-NB codec contains both Encoder and Decoder.
> Encoder encodes each 20ms speech frame to corrresponding bit rate
> specified at the encoder.This is the place where compreesion
happens.
> for example if you are encoding using 12.2kbps,same 20ms will be
> represented by 244 bits.
> At the decoder,using these 244 bits we get 160 samples (20ms *
8Khz).
>
> >(Besides the file size is also larger than that of the input file).
> [Rama]: So once it got decoded the file size should be same as
input file.
> But perceptually both will be same.
>
> > Am still a novice as regards this codec and haven't been able to
figure this out.
> > It would be nice if someone could throw some light on this.
> >
> > Thanks,
> > Ashwin.
> >
>