Lefungus
21st June 2003, 21:49
Hello
I've been playing a bit with xvid lately, and the compare function of avisynth. It calculates psnr from two clips.
I wasn't satisfied about psnr and searched different video quality metrics.
I found JNDMetrix-IQ, a full software that use DCT, and contrast masking/temporal masking. The concept was great.
http://www.sarnoff.com/products_services/video_vision/jndmetrix/documents/jndmetrix_overview.pdf
But it's patented/closed software
Then i found that
http://ise.stanford.edu/class/ee392j/projects/xiao_report.pdf
I found it feasible, so that's what i tried to implement in the following filter VqmCalc.
I'm still a newbie in c/c++. I learned coding for avisynth with this filter. So it's badly coded, slow and buggy. But i'll improve it as time pass.
I can't replicate results found on the previous white-paper as some vital informations are lacking like the matrix we need to use for spatial masking.
In this filter, i use MPEG Matrix with hope it reflects a bit Human Visual System.
No temporal masking is implemented in this method.
I've done a few experiments with a little clip encoded with xvid at constant quant2/quant4/quant6 and quant2 with VHQ1
Keep in mind these results may not reflect video quality
Mean VQM:
Quant2: 37.16
Quant4: 52.58
Quant6: 63.12
Quant2+VHQ1: 37.74
More points (may) means less quality. It seems to scale well with Quants but it doesn't like VHQ.
It will only work with YV12. And it seems to not works with B-Frames.
The clip must be mod8. If not it may crash :)
Another bugs i've encountered are:
-May crash when the log already exist
-May crash during the clip, try again until it works
I hope you're not afraid to test it :)
an example:
a=AVIsource("J:\Video\Source.avs")
b=AVIsource("J:\Video\Quant6.avi")
return VqmCalc(a,b,"results.log")
PS: I use fdct_mmx from xvid sources, so i guess i need to release it GPL, and include GPL headers. I'm not sure if i can, because it's inspired from a white paper. I'll be glad to receive any help on this subject.
[edited]: Corrected Links
VqmCalc-0.21 (http://perso.wanadoo.fr/reservoir/dl/VqmCalc-0.21.rar)
VqmCalcSrc-0.21 (http://perso.wanadoo.fr/reservoir/dl/VqmCalcSrc-0.21.rar)
SSIM-0.24 (http://perso.wanadoo.fr/reservoir/dl/SSIM-0.24.rar)
SSIMSrc-0.24 (http://perso.wanadoo.fr/reservoir/dl/SSIMSrc-0.24.rar)
I've been playing a bit with xvid lately, and the compare function of avisynth. It calculates psnr from two clips.
I wasn't satisfied about psnr and searched different video quality metrics.
I found JNDMetrix-IQ, a full software that use DCT, and contrast masking/temporal masking. The concept was great.
http://www.sarnoff.com/products_services/video_vision/jndmetrix/documents/jndmetrix_overview.pdf
But it's patented/closed software
Then i found that
http://ise.stanford.edu/class/ee392j/projects/xiao_report.pdf
I found it feasible, so that's what i tried to implement in the following filter VqmCalc.
I'm still a newbie in c/c++. I learned coding for avisynth with this filter. So it's badly coded, slow and buggy. But i'll improve it as time pass.
I can't replicate results found on the previous white-paper as some vital informations are lacking like the matrix we need to use for spatial masking.
In this filter, i use MPEG Matrix with hope it reflects a bit Human Visual System.
No temporal masking is implemented in this method.
I've done a few experiments with a little clip encoded with xvid at constant quant2/quant4/quant6 and quant2 with VHQ1
Keep in mind these results may not reflect video quality
Mean VQM:
Quant2: 37.16
Quant4: 52.58
Quant6: 63.12
Quant2+VHQ1: 37.74
More points (may) means less quality. It seems to scale well with Quants but it doesn't like VHQ.
It will only work with YV12. And it seems to not works with B-Frames.
The clip must be mod8. If not it may crash :)
Another bugs i've encountered are:
-May crash when the log already exist
-May crash during the clip, try again until it works
I hope you're not afraid to test it :)
an example:
a=AVIsource("J:\Video\Source.avs")
b=AVIsource("J:\Video\Quant6.avi")
return VqmCalc(a,b,"results.log")
PS: I use fdct_mmx from xvid sources, so i guess i need to release it GPL, and include GPL headers. I'm not sure if i can, because it's inspired from a white paper. I'll be glad to receive any help on this subject.
[edited]: Corrected Links
VqmCalc-0.21 (http://perso.wanadoo.fr/reservoir/dl/VqmCalc-0.21.rar)
VqmCalcSrc-0.21 (http://perso.wanadoo.fr/reservoir/dl/VqmCalcSrc-0.21.rar)
SSIM-0.24 (http://perso.wanadoo.fr/reservoir/dl/SSIM-0.24.rar)
SSIMSrc-0.24 (http://perso.wanadoo.fr/reservoir/dl/SSIMSrc-0.24.rar)