[x264-devel] commit: Display SSIM measurement in db as well (Jason Garrett-Glaser )
git at videolan.org
git at videolan.org
Wed Jun 9 20:38:09 CEST 2010
x264 | branch: stable | Jason Garrett-Glaser <darkshikari at gmail.com> | Wed Jun 2 15:47:26 2010 -0700| [2d2abd8286f3744d79349a162e506f6502c52c56] | committer: Jason Garrett-Glaser
Display SSIM measurement in db as well
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=2d2abd8286f3744d79349a162e506f6502c52c56
---
encoder/encoder.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 9c89eeb..238f2b6 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -58,6 +58,11 @@ static float x264_psnr( int64_t i_sqe, int64_t i_size )
return -10.0 * log10( f_mse );
}
+static float x264_ssim( float ssim )
+{
+ return -10.0 * log10( 1 - ssim );
+}
+
static void x264_frame_dump( x264_t *h )
{
FILE *f = fopen( h->param.psz_dump_yuv, "r+b" );
@@ -3069,9 +3074,8 @@ void x264_encoder_close ( x264_t *h )
if( h->param.analyse.b_ssim )
{
- x264_log( h, X264_LOG_INFO,
- "SSIM Mean Y:%.7f\n",
- SUM3( h->stat.f_ssim_mean_y ) / i_count );
+ float ssim = SUM3( h->stat.f_ssim_mean_y ) / i_count;
+ x264_log( h, X264_LOG_INFO, "SSIM Mean Y:%.7f (%6.3fdb)\n", ssim, x264_ssim( ssim ) );
}
if( h->param.analyse.b_psnr )
{
More information about the x264-devel
mailing list