Log in

View Full Version : Suggestion for improving compression


frankio
13th February 2002, 14:27
I already posted this one in the General Discussion forum and it passed unnoticed.
So I decided to post here where many developments are taking place.

I'm not a newbie neither a codec developer but I know grossly how video encoding works.
So my question is:
"Why not embedd resizing algo in any MPEG-4 codec (i.e. Xvid) ?"
just like this:

1. pre-process frame (Motion Prediction etc.) --> stats
2. resize frame
3. compress delta-frame (DCT?)

In this way the codec could take his own internal decision better having more information in a full-screen frame than in a resized one.
The codec dialog should permit which resolution to choose.

I thought about it mainly to get a more accurate DVD encodings, but it can have more applications: it could be the first step for a standard stats file (common with SBC, Xvid etc.), thus allowing everyone to have his favourite output resolution from the same stats.

What do you think of?
I don't know if it is worth the job

-h
13th February 2002, 14:37
Problem - MPEG4 doesn't support such resizing, so we'd no longer be spec-compatible.

There is evidence that it's "better" to reduce the size of an image, apply compression, and resize it again during display. Try this - compress a 1024/768 image to JPEG. Note the file size. Now, resize the original image to 800/600, and compress it to JPEG so the size was the same as the first. If you view both JPEGs at 1024/768, the one you resized to 800/600 will look better 9 times out of 10 (especially at high compression ratios).

But.. it'd mean forking the XviD project. While it's possible, it's a helluva lot of work.

-h

DmitryR
14th February 2002, 16:46
Originally posted by -h

If you view both JPEGs at 1024/768, the one you resized to 800/600 will look better 9 times out of 10 (especially at high compression ratios).


To continue this, I can mention one obvious thing that the JPEG resized to 80/60 will look terribly 10 times out of 10. From here we can conclude that dependence of the quality from the view/store resolution ratio has its maximum. Has anyone an idea how to define it?

trbarry
14th February 2002, 18:57
One (maybe not particularly accurate) way of measuring the quality of the picture is to compare the mean squared error between the input and output images.

I wonder if anyone has studied this using a constant codec and bit rate under various resizings. The comments above suggest there might be a nice smooth curve with an obvious minimum. It would be interesting to know if this was true, and maybe if it could be roughly estimated under some conditions.

- Tom

b0b0b0b
14th February 2002, 19:37
I bet there has been a lot of work done on what makes one version of a picture look better than another.

Maybe if we all had video cards that knew how to do an incredible job of upsizing images, this would be a different story, too.