Re: Jpeg Encoder: YCC Clipping error




"Jeff Vidal" <jeffvidal@xxxxxxxxx> wrote in message
news:1180190792.014773.150250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I'm a student and I have to write a Jpeg encoder using matlab.
I wrote it, for me it looks all good but the generated JPEG files are
wrong.

For instance, this is what I get: www.gvidal.fr/misc/out.jpg

The middle of the image seems good though...

I have used a tool called "JPEGsnoof" for analyzing my jpg file, and I
get some:
ERROR: YCC clipped

Can somebody see my Jpeg file and tell me, if possible, what is wrong
in my encoder code ?
This would be great.


just making a guess from the image:

you subtract the DC coefficients from one another, right?...

say, your image is 2x2:1x1:1x1, so you encode the blocks:
Y1 Y2
Y3 Y4
Cb Cr

now, keep in note that when encoding, each DC has the previous DC
subtracted, so that each is the difference from the previous.

(note that there is a lot that can go wrong in JPEG, one has to work out one
little detail at a time...).


otherwise:
I have never even touched matlab, so yeah...


Thank you for your help,

G. Vidal



.