[Mplayer-cvslog] CVS: main/libmpcodecs ve_xvid.c,1.21,1.22

Rémi Guyomarch CVS rguyom at mplayerhq.hu
Fri Apr 4 17:23:17 CEST 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv26037

Modified Files:
	ve_xvid.c 
Log Message:

"psnr" & related code is only for the -HEAD (unstable) XviD branch.



Index: ve_xvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_xvid.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ve_xvid.c	4 Apr 2003 05:47:27 -0000	1.21
+++ ve_xvid.c	4 Apr 2003 15:22:59 -0000	1.22
@@ -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);



More information about the MPlayer-cvslog mailing list