[xiph-commits] r6925 - trunk/ffmpeg2theora

j at dactyl.lonelymoon.com j
Tue Jun 29 12:21:29 PDT 2004


Author: j
Date: Tue Jun 29 12:21:29 2004
New Revision: 6925

Modified:
trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
change aspect ratio in header from frame ratio to pixel ratio.



Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2004-06-29 19:17:03 UTC (rev 6924)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2004-06-29 19:21:29 UTC (rev 6925)
@@ -139,14 +139,19 @@
fps = (double) venc->frame_rate / venc->frame_rate_base;
#ifdef FFMPEGCVS
if(venc->sample_aspect_ratio.num!=0){
-			this->aspect_numerator=venc->sample_aspect_ratio.num*(float)venc->width;
-			this->aspect_denominator=venc->sample_aspect_ratio.den*(float)venc->height;
+			//the way vlc is doing it right now.
+			//this->aspect_numerator=venc->sample_aspect_ratio.num*(float)venc->width;
+			//this->aspect_denominator=venc->sample_aspect_ratio.den*(float)venc->height;
+			this->aspect_numerator=venc->sample_aspect_ratio.num;
+			this->aspect_denominator=venc->sample_aspect_ratio.den;
//fprintf(stderr,"  Aspect %.2f/1\n",this->aspect_numerator/this->aspect_denominator);
}
#else
if(venc->aspect_ratio!=0){
-			this->aspect_numerator=venc->aspect_ratio*10000;
-			this->aspect_denominator=10000;
+			//this->aspect_numerator=venc->aspect_ratio*10000;
+			//this->aspect_denominator=10000;
+			this->aspect_numerator=(venc->aspect_ratio/(float)venc->width)*10000;
+			this->aspect_denominator=10000/(float)venc->height;
//fprintf(stderr,"  Aspect %.2f/1\n",this->aspect_numerator/this->aspect_denominator);
}




More information about the commits mailing list