EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Union/type help..

Started by Micah Stevens January 16, 2005
On Wednesday 19 January 2005 05:27 pm, onestone wrote:
>  So preservation of the english language now
becomes a good excuse to be
>  anti-social. :@}
>
>  More seriously, many years ago when I first started working on voice
>  codecs I developed a rather odd voice compression method, and, in a
>  series of experiments, over 3 years, eventually increased the
>  compression ratio such that a 16 bit recording, at 8000sps (128000 bits
>  per second) reduced to 600 bits. I was told (by a whole bunch of faculty
>  at melbourne university) that it was impossible to reduce data this far
>  and still retain intelligence that would still enable the content to be
>  clear. So I demonstrated it to them. Not only was the speech clear
>  enough to be easily intelligible, but you could readily recognise the
>  speaker as well. Sure it echoed, had a few pure sinusoidal artifacts,
>  and clicks and pops, but it went to show that theory is only that, until
>  someone proves or disproves it. Just to grandstand a little I reduced it
>  still further. It got a bit messy, like listening under a shower, but
>  even at 300bps you could make out the original data.
>
>  So, when someone tells me you can only reduce something so far I remain
>  skeptical until I've failed.
>
>  Al

Well, I didn't state an actual limit, but I think you'll agree that
it's self 
evident that if compression increases until the data no longer contains 
meaningful information, then it's too far. 

As to what that actual limit is, that's another issue. :) 
-Micah 

Beginning Microcontrollers with the MSP430

On Monday 17 January 2005 10:35 am, Sepp Holzmayr wrote:
>  Just had one of my Under-The-Shower-Ideas....
will only work if you're
>  not going to process data between getting and transmitting. But look:
>  (Same assumptions as in my last mail!!)
>
>  int buffer;
>  char *transmit;
>
>  int GetADVal1 (void);
>  int GetADVal2 (void);
>  void SendByte (char x);
>
>  ...
>
>  buffer = (GetADVal1() & 0x0FFF);
>  transmit = &buffer;
>  SendByte(*transmit);
>  buffer = ( (buffer & 0x0F00) >>8 ) & ( (GetADVal2 &
0x0FFF) <<4 );
>  SendByte(*transmit++);
>  SendByte(*transmit);
>

Hey Sepp, 

Just so I know your strategey, can you tell me if this is what's happening?

1) Get first 12 bit conversion and place it in a 16 bit variable
2) let transmit point to the memory location of the buffer variable
3) send the lower 8 bits of the memory location referred to by transmit
4) let buffer be equal to the upper 4 bits of the original sample, shifted 
down to the lower 4 bits, and then put the second sample in the upper 12 bits 
of the variable by shifting it up 4 places.

5) (this is what I'm unclear on due to my inexperience in c) Send the lower
8 
bits of the variable, then increment the transmit pointer, which would then 
push it 8 bits higher in memory? (or does a pointer increment on the MSP go 
16 bits higher in memory?) 

6) send this upper 8 bits..

I would do this a little different by losing the pointer and doing more bit 
shifting, but maybe the pointer method is more effiecient? Any ideas on this?

My translation: 

 buffer = (GetADVal1() & 0x0FFF);
 SendByte(buffer);
 buffer = ( (buffer & 0x0F00) >>8 ) & ( (GetADVal2 & 0x0FFF)
<<4 );
 SendByte(buffer);
 SendByte(buffer >> 8);

Any thoughts on the difference? 

-Micah 

There is obviously a finite limit, but I suspect it will be far smaller 
than many people realise. I occasionally spend a few hours on my own 
version of MP3, started in 1994. I now have it to `15:1 compression with 
3% rms distortion of the original signal, but am still a long way from 
the target of 38:1. I achieved my compression using 'models', amongst 
other things. It was just an interesting aside on your comment regarding 
word contraction. Incidentally I got there purely accidentally. I didn't 
know anything about DSP algorthms, or DSP tools. They were in their 
commercial infancy then, and information suitable for a beginner 30 
years out of high schoool was very difficult to find. (A lot of branches 
of modern electronics use a symbology that has a totally different 
meaning to when I was taught.) I set out to try and derive a way to 
extract the single most dominant pure tone from a complex audio 
waveform. I ended up, after quite a while, with my compression 
algorithm, and a filter with odd properties.

So not everything I do is by design. ;@}

Al

Micah Stevens wrote:
> On Wednesday 19 January 2005 05:27 pm, onestone wrote:
> 
>> So preservation of the english language now becomes a good excuse to be
>> anti-social. :@}
>>
>> More seriously, many years ago when I first started working on voice
>> codecs I developed a rather odd voice compression method, and, in a
>> series of experiments, over 3 years, eventually increased the
>> compression ratio such that a 16 bit recording, at 8000sps (128000 bits
>> per second) reduced to 600 bits. I was told (by a whole bunch of
faculty
>> at melbourne university) that it was impossible to reduce data this far
>> and still retain intelligence that would still enable the content to be
>> clear. So I demonstrated it to them. Not only was the speech clear
>> enough to be easily intelligible, but you could readily recognise the
>> speaker as well. Sure it echoed, had a few pure sinusoidal artifacts,
>> and clicks and pops, but it went to show that theory is only that,
until
>> someone proves or disproves it. Just to grandstand a little I reduced
it
>> still further. It got a bit messy, like listening under a shower, but
>> even at 300bps you could make out the original data.
>>
>> So, when someone tells me you can only reduce something so far I remain
>> skeptical until I've failed.
>>
>> Al
> 
> 
> Well, I didn't state an actual limit, but I think you'll agree
that it's self 
> evident that if compression increases until the data no longer contains 
> meaningful information, then it's too far. 
> 
> As to what that actual limit is, that's another issue. :) 
> -Micah 
> 
> 
> .
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 


Haha.. I find most of my accomplishments come by accident.. 

On Thursday 20 January 2005 02:32 am, onestone wrote:
>  There is obviously a finite limit, but I suspect it will be far smaller
>  than many people realise. I occasionally spend a few hours on my own
>  version of MP3, started in 1994. I now have it to `15:1 compression with
>  3% rms distortion of the original signal, but am still a long way from
>  the target of 38:1. I achieved my compression using 'models',
amongst
>  other things. It was just an interesting aside on your comment regarding
>  word contraction. Incidentally I got there purely accidentally. I
didn't
>  know anything about DSP algorthms, or DSP tools. They were in their
>  commercial infancy then, and information suitable for a beginner 30
>  years out of high schoool was very difficult to find. (A lot of branches
>  of modern electronics use a symbology that has a totally different
>  meaning to when I was taught.) I set out to try and derive a way to
>  extract the single most dominant pure tone from a complex audio
>  waveform. I ended up, after quite a while, with my compression
>  algorithm, and a filter with odd properties.
>
>  So not everything I do is by design. ;@}
>
>  Al
>
>  Micah Stevens wrote:
>  > On Wednesday 19 January 2005 05:27 pm, onestone wrote:
>  >> So preservation of the english language now becomes a good excuse
to be
>  >> anti-social. :@}
>  >>
>  >> More seriously, many years ago when I first started working on
voice
>  >> codecs I developed a rather odd voice compression method, and, in
a
>  >> series of experiments, over 3 years, eventually increased the
>  >> compression ratio such that a 16 bit recording, at 8000sps
(128000 bits
>  >> per second) reduced to 600 bits. I was told (by a whole bunch of
>  >> faculty at melbourne university) that it was impossible to reduce
data
>  >> this far and still retain intelligence that would still enable
the
>  >> content to be clear. So I demonstrated it to them. Not only was
the
>  >> speech clear enough to be easily intelligible, but you could
readily
>  >> recognise the speaker as well. Sure it echoed, had a few pure
>  >> sinusoidal artifacts, and clicks and pops, but it went to show
that
>  >> theory is only that, until someone proves or disproves it. Just
to
>  >> grandstand a little I reduced it still further. It got a bit
messy,
>  >> like listening under a shower, but even at 300bps you could make
out
>  >> the original data.
>  >>
>  >> So, when someone tells me you can only reduce something so far I
remain
>  >> skeptical until I've failed.
>  >>
>  >> Al
>  >
>  > Well, I didn't state an actual limit, but I think you'll
agree that it's
>  > self evident that if compression increases until the data no longer
>  > contains meaningful information, then it's too far.
>  >
>  > As to what that actual limit is, that's another issue. :)
>  > -Micah
>  >
>  >
>  > .
>  >
>  >
>  > .


The 2024 Embedded Online Conference