improving encoding (possibly big perceptual gains)
with all the recent discussions over improving lavc, i've got some ideas. mainly i'm worried that psnr is very misleading when trying to improve motion estimation decisions since often a particular motion vector will give better psnr but much worse actual quality due to loss of small detail and mud/blocking. because of this, i'd like to suggest that lavc be extended to measure the 'uqi' (universal [image] quality index) proposed by the paper at this site: http://www.cns.nyu.edu/~zwang/files/research/quality_index/demo_lena.html i think the images there speak for themselves regarding how stupid psnr is as a judge of quality. however, printing statistics isn't much use if you can't actually improve encoding. so the main idea is too add a *cmp function to measure the uqi and use this for motion estimation and optimal quantization and qprd, etc. maybe also the ratecontrol engine itself. this should do a much better job of telling when it's ok to use poor quantization, zero ac coeffs, etc. and when it will look like shit (like the last lena picture ;). the next more ambitious idea is for future codecs, perhaps snow: to use only the correlation part of uqi to evaluate motion vectors, then measure the difference in mean and variance and store those in the bitstream. this would allow complex changes such as fades and changes in lighting to be encoded almost entirely with motion vectors, whereas mpeg4 codecs usually use dct-coded residue for such scenes with horrible quality as the result unless qp is 2 or less. ideas, anyone? sorry i'm too lame to code on lavc.. actually i don't know the codebase and i'm busy working on another project right now. however the *cmp system seems extensible enough that adding a uqi method to it should be easy. the other things (quantization, qprd, rate control) might be more difficult. rich
Hi On Wed, Dec 28, 2005 at 04:09:32PM -0500, Rich Felker wrote:
with all the recent discussions over improving lavc, i've got some ideas. mainly i'm worried that psnr is very misleading when trying to improve motion estimation decisions since often a particular motion vector will give better psnr but much worse actual quality due to loss of small detail and mud/blocking.
because of this, i'd like to suggest that lavc be extended to measure the 'uqi' (universal [image] quality index) proposed by the paper at this site:
http://www.cns.nyu.edu/~zwang/files/research/quality_index/demo_lena.html
i think the images there speak for themselves regarding how stupid psnr is as a judge of quality.
however, printing statistics isn't much use if you can't actually improve encoding. so the main idea is too add a *cmp function to measure the uqi and use this for motion estimation and optimal quantization and qprd, etc. maybe also the ratecontrol engine itself. this should do a much better job of telling when it's ok to use poor quantization, zero ac coeffs, etc. and when it will look like shit (like the last lena picture ;).
theres a problem with using this quality meassure for any decission, look at it, it pretty much ignores brightness changes, not only will that ignore flickering/blinking but if done per block brightness will be off per block this will not look good at all -> PSNR is still the better cmp function for these decissions, maybe it should be done in dct domain and different frequencies should be weighted differently maybe a closer to 0 error should be considered less wrong then a farther away from zero error ... [...] -- Michael
On Mon, Jan 02, 2006 at 07:37:40PM +0100, Michael Niedermayer wrote:
Hi
On Wed, Dec 28, 2005 at 04:09:32PM -0500, Rich Felker wrote:
with all the recent discussions over improving lavc, i've got some ideas. mainly i'm worried that psnr is very misleading when trying to improve motion estimation decisions since often a particular motion vector will give better psnr but much worse actual quality due to loss of small detail and mud/blocking.
because of this, i'd like to suggest that lavc be extended to measure the 'uqi' (universal [image] quality index) proposed by the paper at this site:
http://www.cns.nyu.edu/~zwang/files/research/quality_index/demo_lena.html
i think the images there speak for themselves regarding how stupid psnr is as a judge of quality.
however, printing statistics isn't much use if you can't actually improve encoding. so the main idea is too add a *cmp function to measure the uqi and use this for motion estimation and optimal quantization and qprd, etc. maybe also the ratecontrol engine itself. this should do a much better job of telling when it's ok to use poor quantization, zero ac coeffs, etc. and when it will look like shit (like the last lena picture ;).
theres a problem with using this quality meassure for any decission, look at it, it pretty much ignores brightness changes, not only will
It doesn't. There are 3 factors: correlation, brightness, and contrast. If you think the brightness and/or contrast are weighted too low for use in encoding decisions you can apply an appropriate exponent to them.
that ignore flickering/blinking but if done per block brightness will be off per block this will not look good at all -> PSNR is still the better cmp function for these decissions, maybe it should be done in dct domain and different frequencies should be weighted differently maybe a closer to 0 error should be considered less wrong then a farther away from zero error ...
IMO this does not address the problem I'm talking about. A motion block with correlaton perfect but brightness way off is still very good since a single DC coefficient can encode the residue perfectly and no detail will be lost. PSNR-based motion estimation will often choose a solid or near-solid block when there's very little detail, resulting in the same kinda ugliness that we've been seeing. (The coefficients of the residue are very small and high-frequency so they get quantized to 0..) Rich
Hi On Mon, Jan 02, 2006 at 01:56:59PM -0500, Rich Felker wrote: [...]
that ignore flickering/blinking but if done per block brightness will be off per block this will not look good at all -> PSNR is still the better cmp function for these decissions, maybe it should be done in dct domain and different frequencies should be weighted differently maybe a closer to 0 error should be considered less wrong then a farther away from zero error ...
IMO this does not address the problem I'm talking about. A motion block with correlaton perfect but brightness way off is still very good since a single DC coefficient can encode the residue perfectly and no detail will be lost. PSNR-based motion estimation will often choose a solid or near-solid block when there's very little detail, resulting in the same kinda ugliness that we've been seeing. (The coefficients of the residue are very small and high-frequency so they get quantized to 0..)
SATD and DCT based cmp functions are available and probably outperform Correlation+Brightness but feel free to implement a better one, just look at the cvslog entries of a case where a new cmp function was added [...] -- Michael
On Mon, Jan 02, 2006 at 01:56:59PM -0500, Rich Felker wrote:
On Mon, Jan 02, 2006 at 07:37:40PM +0100, Michael Niedermayer wrote:
On Wed, Dec 28, 2005 at 04:09:32PM -0500, Rich Felker wrote:
with all the recent discussions over improving lavc, i've got some ideas. mainly i'm worried that psnr is very misleading when trying to improve motion estimation decisions since often a particular motion vector will give better psnr but much worse actual quality due to loss of small detail and mud/blocking.
because of this, i'd like to suggest that lavc be extended to measure the 'uqi' (universal [image] quality index) proposed by the paper at this site:
http://www.cns.nyu.edu/~zwang/files/research/quality_index/demo_lena.html
i think the images there speak for themselves regarding how stupid psnr is as a judge of quality.
however, printing statistics isn't much use if you can't actually improve encoding. so the main idea is too add a *cmp function to measure the uqi and use this for motion estimation and optimal quantization and qprd, etc. maybe also the ratecontrol engine itself. this should do a much better job of telling when it's ok to use poor quantization, zero ac coeffs, etc. and when it will look like shit (like the last lena picture ;).
theres a problem with using this quality meassure for any decission, look at it, it pretty much ignores brightness changes, not only will
It doesn't. There are 3 factors: correlation, brightness, and contrast. If you think the brightness and/or contrast are weighted too low for use in encoding decisions you can apply an appropriate exponent to them.
Just a small comment: I don't think one measurement or the other will do the trick. Having several available to choose from and use simultaneously will IMO give the best results. Diego
Hello, Please note from Zhou Wang's site that he did further research into image quality metrics to produce SSIM for images and then VSSIM for videos. There is also an interesting looking wavelett-based method. http://www.cns.nyu.edu/~zwang/files/research.html#quality Regards, Rob
participants (4)
-
dalias@aerifal.cx -
diego@biurrun.de -
michaelni@gmx.at -
robert.swain@gmail.com