🔒 Locked
JPEG decoder fixed point implementation
Advertisement
Original Post
Hi, I am currently developing a 3d mobile game which uses many textures. Now currently I am using png format for textures. I converted the textures to jpeg format and found that it is much smaller than png. I want to use jpeg files (because of its smaller size) but the problem is that I dont have a jpeg decoder. I want to know that if I want to implement a jpeg decoder myself then how should I proceed. I hope I was able explain my problem. Please give me some pointers. regards, Pradip.B
Quote:
Original post by pradip913
I converted the textures to jpeg format and found that it is much smaller than png.
Note that the main difference between jpeg and png is that the latter compresses lossless, while jpeg images often show severe artifacts. But I guess it might be negligible on mobile platforms.
Quote:
I want to use jpeg files (because of its smaller size) but the problem is that I dont have a jpeg decoder. I want to know that if I want to implement a jpeg decoder myself then how should I proceed. I hope I was able explain my problem. Please give me some pointers.
Have you already checked google(code), sourceforge, and the like? Writing decoders for standardized imagery is typically error prone and about reinventing wheels. Do yourself a favor, and try to find a free library, but look at the license terms.
Quote:
Original post by pradip913
I checked DevIL but it requires libjpeg.
What is the problem with libjpeg?
Quote:
To be honest I would like to write a simple jpeg decoder using fixed point :).
I wonder that, if you want to write it yourself, why are you asking questions here and don't start writing, because we have already given you the right pointers: JPEG Standards.
Or is your question about how fixed point math works? Actually, it's quite simple. Wikipedia gives some starting points.
libjpeg has compile time switches that lets you choose floating point or integer. Now I am not sure if it is for encoding only or also for decoding, but since it is an old library and floating point operations were much slower in the past I would guess, it also affects decoding.
I know it has a lot of extra unnecessary stuff, but maybe it will be a good starting point...
I know it has a lot of extra unnecessary stuff, but maybe it will be a good starting point...
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement