[XviD-devel] lossless rescale

Marco Al xvid-devel@xvid.org
Fri, 2 Aug 2002 10:28:14 +0200


Florin Andrei wrote:
> Recently, i've seen on Freshmeat an announcement of a software that
> claims to perform "lossless JPEG rescale".
> According to the author, the logic is like this: normally, an
> application like Gimp, when rescaling a JPEG image, it actually performs
> a conversion to plain bitmap, applies the rescale algo to the bitmap,
> then converts the bitmap back to JPEG. Because JPEG is a lossy format,
> the whole process brings a noticeable loss of quality.
> Now, if the program knows "everything" about JPEG, a transformation
> could be applied without going through decoding to bitmap / recoding to
> JPEG. Therefore, the loss of quality is much smaller, if any.
> 
> I wonder if a similar thing can be done to DivX. Is it possible, at
> least theoretically?
> If it is, does the codec needs to provide some special hooks in the API?

I guess it rescales the DCT bases functions before applying the IDCT.
I think calling that lossless is a bit of a misnomer though ... it will
probably be better than simple bilinear interpolation because the DCT
captures the image statistics better, but I dont think its guarantueed to
be optimal ... in fact I wouldnt be surprised to see ringing artifacts.

Marco