<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Op 09-02-12 15:50, Voit, Florian schreef:
<blockquote
cite="mid:79C0EA6E7AD7CE4A85EDAF482B5456B20356D05E@EXCHSRV.fokus.fraunhofer.de"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi <span lang="EN-US">everyone</span>,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’m currently working on
project trying to send sensor data from a microcontroller
over radio to another device.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I need compression
because the radio has not enough bandwidth to send it
without.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Because the sensor data
quiet much resembles audio data I got the best compression
results using lossless audio codecs instead of data
compression algorithms like Lempel-Ziv.</span></p>
</div>
</blockquote>
<br>
Biggest problem here is that you won't get a 'guaranteed
compression', as it is lossless. If you would feed the thing random
data, it won't be any more compact than uncompressed and what should
the device behave like then? FLAC compression is to save overall
traffic or disk space, not to push data over a small channel.<br>
<br>
However, I you would come up with some idea to handle those
overflows, it might well be a solution.<br>
<br>
<blockquote
cite="mid:79C0EA6E7AD7CE4A85EDAF482B5456B20356D05E@EXCHSRV.fokus.fraunhofer.de"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p>I won’t have
an OS on the microprocessor so I’ll have to get the
streaming encoder to work ‘bare metal’. The situation will
be that the senor will constantly deliver samples which will
be stored in a buffer. The buffer should then be compressed
and sent.</span></p>
</div>
</blockquote>
<br>
So, is there a buffer *after* conversion for sending? See the
problem above.<br>
<br>
<blockquote
cite="mid:79C0EA6E7AD7CE4A85EDAF482B5456B20356D05E@EXCHSRV.fokus.fraunhofer.de"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p>Here is my
question:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Do you think it is
possible to use FLAC compression in this use-case? Is it
possible to customize the codec to my needs without having
to rewrite the whole thing?</span></p>
</div>
</blockquote>
<br>
I guess that would depend on the architecture, as you're working
OS-less. I think I do have a better idea for you: can you just try
to reduce the amount of data your sending? Do you need 16-bit audio
or would 8 bit suffice? Or something in between? What about reducing
the samplerate? If you do need a large dynamic range but only a
fairly low resolution, you could try to send using a non-standard
floating-point format or something like ADPCM? That would be far
easier to program and could probably be sufficient.<br>
<br>
Good luck!<br>
</body>
</html>