FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-16-2008, 01:02 PM
y17476
Guest
 
Posts: n/a
Default Clip value

Hi,

in leaner PCM to u-law convertion code, some one define CLIP=8159, an
some define CLIP= 32635. Which one is correct?

Thanks in advance!

Ron


Reply With Quote
  #2 (permalink)  
Old 02-17-2008, 03:21 AM
bharat pathak
Guest
 
Posts: n/a
Default Re: Clip value

Ron,

I searched on the web and found g711.c code which mentions
CLIP = 8159.

//============ from the code =====================================

#define BIAS (0x84) /* Bias for linear code. */
#define CLIP 8159

/** linear2ulaw() - Convert a linear PCM value to u-law

//================================================== ==============

http://www.cobalt.chem.ucalgary.ca/p...diochat/g711.c

Regards
Bharat Pathak

Arithos Designs
www.arithos.com





>Hi,
>
>in leaner PCM to u-law convertion code, some one define CLIP=8159, and
>some define CLIP= 32635. Which one is correct?
>
>Thanks in advance!
>
>Ron
>
>
>

Reply With Quote
  #3 (permalink)  
Old 02-17-2008, 05:30 AM
DSPGURU
Guest
 
Posts: n/a
Default Re: Clip value

Ron,

If you should check your codes, I suggest that different codes are
prepared for different numbers of PCM bits for input valus.

Kamar Ruptan
DSP Guru

y17476 wrote:
> Hi,
>
> in leaner PCM to u-law convertion code, some one define CLIP=8159, and
> some define CLIP= 32635. Which one is correct?
>
> Thanks in advance!
>
> Ron

Reply With Quote
  #4 (permalink)  
Old 02-18-2008, 02:53 PM
Jim Thomas
Guest
 
Posts: n/a
Default Re: Clip value

y17476 wrote:
> Hi,
>
> in leaner PCM to u-law convertion code, some one define CLIP=8159, and
> some define CLIP= 32635. Which one is correct?
>
> Thanks in advance!
>
> Ron


The implementation with clip=8159 is probably designed to work with
14-bit data. The implementation with clip=~4x is probably designed to
work with 16-bit data.

--
Jim Thomas Principal Applications Engineer Bittware, Inc
[email protected] http://www.bittware.com (603) 226-0404 x536
The sooner you get behind, the more time you'll have to catch up
Reply With Quote
  #5 (permalink)  
Old 02-18-2008, 07:03 PM
y17476
Guest
 
Posts: n/a
Default Re: Clip value

Thanks you all for your response.

Ron
>y17476 wrote:
>> Hi,
>>
>> in leaner PCM to u-law convertion code, some one define CLIP=8159, and
>> some define CLIP= 32635. Which one is correct?
>>
>> Thanks in advance!
>>
>> Ron

>
>The implementation with clip=8159 is probably designed to work with
>14-bit data. The implementation with clip=~4x is probably designed to
>work with 16-bit data.
>
>--
>Jim Thomas Principal Applications Engineer Bittware, Inc
>[email protected] http://www.bittware.com (603) 226-0404 x536
>The sooner you get behind, the more time you'll have to catch up
>

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved