On2Tech
4th April 2005, 20:25
We've been reviewing the SSIM metric to see if we can use it to help us make our codec better.
Unfortunately, we've found that the lumimask feature as implemented and (as far as we can tell its implemented the way the inventor intended) has at least one serious flaw:
The frame and pixel weighting metrics use the average pixel intensities from 8x8 regions of both the raw and decompressed images to determine the frame / pixel weight.
In effect any 8x8 region in a clip whose raw and decompressed versions sum to an average of less than 40 is given a weight of 0. Unfortunately what this means is that if the source has pixel intensity of 80 and the compressed decompressed version has an intensity of 0 you get a weight of 0.
This is also true on an entire frame. EG if the entire frame has no 8x8 region whose pixel intensities exceed 80, and the decompressed version of the clip is black you will get a frame weight of 0.
you can see an example of this via anonymous ftp to our ftp site:
ssim funny (ftp://ftp.on2.com/ssim.zip)
The example we put up shows an extreme example of what can happen:
ssim.zip contains an avisynth script file and 2 raw clips
- one clip holds 19 black frames and 1 copy of a not so dark image with pixel intensities entirely less than 80
- the other clip holds 20 copies of same darkened image from mobile
Yet the 2 together come out as a perfect match with ssim of 100.0.
I think one way to correct for this problem and still follow the general spirit of lumimasking is to calculate pixel and frame weights from raw clip only.
( Of course this could lead to further problems. like now as long as the source frame is solidly black, the compressed frame could be anything you like )
Unfortunately, we've found that the lumimask feature as implemented and (as far as we can tell its implemented the way the inventor intended) has at least one serious flaw:
The frame and pixel weighting metrics use the average pixel intensities from 8x8 regions of both the raw and decompressed images to determine the frame / pixel weight.
In effect any 8x8 region in a clip whose raw and decompressed versions sum to an average of less than 40 is given a weight of 0. Unfortunately what this means is that if the source has pixel intensity of 80 and the compressed decompressed version has an intensity of 0 you get a weight of 0.
This is also true on an entire frame. EG if the entire frame has no 8x8 region whose pixel intensities exceed 80, and the decompressed version of the clip is black you will get a frame weight of 0.
you can see an example of this via anonymous ftp to our ftp site:
ssim funny (ftp://ftp.on2.com/ssim.zip)
The example we put up shows an extreme example of what can happen:
ssim.zip contains an avisynth script file and 2 raw clips
- one clip holds 19 black frames and 1 copy of a not so dark image with pixel intensities entirely less than 80
- the other clip holds 20 copies of same darkened image from mobile
Yet the 2 together come out as a perfect match with ssim of 100.0.
I think one way to correct for this problem and still follow the general spirit of lumimasking is to calculate pixel and frame weights from raw clip only.
( Of course this could lead to further problems. like now as long as the source frame is solidly black, the compressed frame could be anything you like )