Re: real-time compression algorithms on fpga
- From: "Melanie Nasic" <quinn_the_esquimo@xxxxxxxxxx>
- Date: Tue, 20 Dec 2005 15:48:00 +0100
Hi Dag-Erling,
thanks for your response. Either there are some components of your code
missing or it's more sophisticated than I can imagine. The fact is I didn't
get the point here. What does this algorithm do? How does it work? Is it
proprietary or a standard solution?
I forgot to mention that I want my compression scheme to be lossless and not
based on perceptional irrelevancy reductions.
Regards, Melanie
""Dag-Erling Smørgrav"" <des@xxxxxx> schrieb im Newsbeitrag
news:86wthz4zad.fsf@xxxxxxxxxxxxx
> "Melanie Nasic" <quinn_the_esquimo@xxxxxxxxxx> writes:
>> Because of the high data rate I cannot spend much time on DFT or DCT
>> and on data modelling. What I am looking for is a way to compress
>> the pixel data in spatial not spectral domain because of latency
>> aspects, processing complexity, etc. Because of the sequential data
>> transmission line by line a block matching is also not possible in
>> my opinion. The compression ratio is not so important, factor 2:1
>> would be sufficient. What really matters is the real time
>> capability. The algorithm should be pipelineable and fast. The
>> memory requirements should not exceed 1 kb.
>
> You don't say anything about quality.
>
> Here's C code for a lossy compressor / decompressor which consistently
> achieves a 2:1 ratio for 8 bpp grayscale images:
>
> #include <stdint.h>
> #include <stdio.h>
>
> int
> compress(FILE *fin, FILE *fout)
> {
> uint8_t pin[2], pout;
>
> for (;;) {
> if (fread(&pin, sizeof pin, 1, fin) != 1)
> return (ferror(fin) ? -1 : 0);
> pout = (pin[0] + pin[1]) / 2;
> if (fwrite(&pout, sizeof pout, 1, fout) != 1)
> return -1;
> }
> }
>
> int
> decompress(FILE *fin, FILE *fout)
> {
> uint8_t pin, pout[2];
>
> for (;;) {
> if (fread(&pin, sizeof pin, 1, fin) != 1)
> return (ferror(fin) ? -1 : 0);
> pout[0] = pout[1] = pin;
> if (fwrite(&pout, sizeof pout, 1, fout) != 1)
> return -1;
> }
> }
>
> (note that the code assumes that the size of the input stream is an
> even number)
>
> DES
> --
> Dag-Erling Smørgrav - des@xxxxxx
.
- Follow-Ups:
- Re: real-time compression algorithms on fpga
- From: Dag-Erling Smørgrav
- Re: real-time compression algorithms on fpga
- Prev by Date: Re: PAQ compression
- Next by Date: Re: PAQ compression
- Previous by thread: Re: The Helsinki Code, Part III
- Next by thread: Re: real-time compression algorithms on fpga
- Index(es):
Relevant Pages
|
Loading