Re: real-time compression algorithms on fpga



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


.



Relevant Pages

  • [GIT PULL] BZIP2/LZMA compression support for v2.6.30
    ... Add kernel image compression mode config options: ... -static int fill_inbuf; ...
    (Linux-Kernel)
  • Re: [PATCH 00/16] DRBD: a block device for HA clusters
    ... the compression of the bitmap transfer we just added very recently. ... during testing of this encoding, applying it to an already gzip'ed file ... gzip compression is _much_ more effective. ... static inline int vli_decode_bits ...
    (Linux-Kernel)
  • Re: 2.6.9-rc1-mm2 Inconsistent kallsyms
    ... Changed the compression method from stem compression to "table lookup" ... static unsigned int kallsyms_expand_symbol(unsigned int off, char *result) ... * maps these to the most used substrings (tokens). ...
    (Linux-Kernel)
  • [GIT PULL] bzip2/lzma kernel compression
    ... bzip2/lzma: x86 kernel compression support ... -static int fill_inbuf; ... new file mode 100644 ...
    (Linux-Kernel)
  • [PATCH] kallsyms: speed up /proc/kallsyms
    ... Changed the compression method from stem compression to "table lookup" - * compression ... given the offset to where the symbol is in the compressed stream */ static unsigned int kallsyms_expand_symbol(unsigned int off, char *result) { ... * maps these to the most used substrings (tokens). ...
    (Linux-Kernel)

Loading