Image Compression in an FPGA

Someone is looking to generate compressed images in an FPGA to display graph data on a browser. Looking around the GIF, TIFF or PNG formats seem rather straightforward to implement. Anyone know of an implementation of one of these in an HDL? It doesn't need to implement the entire standard, just enough to generate one image style.

--

Rick
Reply to
rickman
Loading thread data ...

Does it actually need to be compressed, or will wrapping headers around uncompressed data be enough? All of those have uncompressed formats that will be accepted by a web browser - that may suffice if you aren't concerned about bandwidth, and would be easier to implement.

Theo

Reply to
Theo Markettos

Yes, I suspect he can even use a fully uncompressed format like bitmap. His requirements to be for the format to be "widely supported" which doesn't indicate how recent the browsers need to be and to produce the image files with little working memory.

He seems to like SVG which seems to meet the latter requirement well if meeting the former requirement is a bit fuzzy. It looks like nearly all browsers currently support SVG but only the more recent versions of some.

He does not seem to be limited to connection bandwidth and has not indicated his needed update rate. This guy often posts discussion points without giving details until you offer a solution that does not meet one of the unmentioned requirements. Looks like SVG may be the way he goes.

--

Rick
Reply to
rickman

There are lots of JPEG encoders out there. Maybe use one?

Tomas D.

Reply to
Tomas D.

Thanks for the advice. I will use it in the spirit it was intended. :)

--

Rick
Reply to
rickman

If you're just plotting X/Y then SVG may suffice, if you can make a suitable wrapper around it.

One other thought - get the browser to do the work. Just emit the data in whatever format you fancy - JSON is a simple one, but even base64 might work

- and then just include some Javascript that plots it in the browser for you. There's lots of libraries for that:

formatting link
You can just use a URL so don't need the JS framework on the FPGA.

Lots of 'analytics' sites do this - download the table of (eg) share prices as XML or JSON and plot locally, rather than plotting server-side. Makes for better interaction too - easier to navigate when your browser has the dataset.

Theo

Reply to
Theo Markettos

JPEG is not very good at reproducing line art with high contrast ratio. For example save a screen capture in TIFF, PNG, and JPEG and you'll see that JPEG gives the most blurring and artefacts unless you set it for very little compression. PNG is quite good at achieving compression on computer-generated images with text or line drawings.

--
Gabor
Reply to
GaborSzakacs

The reason I've offered JPEG is because it's available on OpenCores and tested to work fine. I am not sure if there's PNG encoder anywhere available for free... And I wonder what's the logic utilization difference.

Reply to
Tomas D.

The guy is using SVG which is not only much more highly compressed compared to JPG, it is *much* easier to produce. I don't think he has any trouble finding someone to write the code. Even if a core is stated to be "working", you need to do your due diligence and verify any core you use. That is often as much work as writing the core.

--

Rick
Reply to
rickman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.