changeset 9823:da375915f47c

"psnr" & related code is only for the -HEAD (unstable) XviD branch.
author rguyom
date Fri, 04 Apr 2003 15:22:59 +0000
parents 1e761763566c
children 39b68c2664ec
files libmpcodecs/ve_xvid.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ve_xvid.c	Fri Apr 04 15:04:26 2003 +0000
+++ b/libmpcodecs/ve_xvid.c	Fri Apr 04 15:22:59 2003 +0000
@@ -374,6 +374,7 @@
     return 1;
 }
 
+#ifdef XVID_API_UNSTABLE
 static double
 sse_to_PSNR(double sse, double pixels)
 {
@@ -381,12 +382,14 @@
     // 4.34294481903251827652 = 10/log(10)
     // 11.08252709031685229249 = log(255*255)
 }
+#endif
 
 static void
 uninit(struct vf_instance_s* vf)
 {
     struct vf_priv_s *fp = vf->priv;
 
+#ifdef XVID_API_UNSTABLE
     if (xvidenc_psnr) {
 	double p = (double)fp->pixels * (double)fp->nb_frames;
         printf ("PSNR: Y:%2.2f, Cb:%2.2f, Cr:%2.2f, All:%2.2f\n", 
@@ -395,6 +398,7 @@
 		sse_to_PSNR(xvid_error[2], p/4), 
 		sse_to_PSNR(xvid_error[0] + xvid_error[1] + xvid_error[2], p*1.5));
     }
+#endif
     vbrFinish(&fp->vbr_state);
 }
 
@@ -474,6 +478,7 @@
 	break;
     }
 
+#ifdef XVID_API_UNSTABLE
     if (xvidenc_psnr) {
         static FILE *fvstats = NULL;
         char filename[20];
@@ -508,6 +513,7 @@
 
 	fp->nb_frames++;
     }
+#endif
     
     // write output
     muxer_write_chunk(fp->mux, fp->enc_frame.length, fp->enc_frame.intra==1 ? 0x10 : 0);