[xiph-commits] r15756 - trunk/ffmpeg2theora/src

j at svn.xiph.org j at svn.xiph.org
Sun Mar 8 04:56:28 PDT 2009


Author: j
Date: 2009-03-08 04:56:27 -0700 (Sun, 08 Mar 2009)
New Revision: 15756

Modified:
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
fix --no_upscaling together with --max_size

Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-03-07 19:35:54 UTC (rev 15755)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-03-08 11:56:27 UTC (rev 15756)
@@ -364,17 +364,6 @@
             this->picture_width = this->picture_width - this->picture_width%2;
         }
 
-        if(this->no_upscaling) {
-            if(this->picture_width && this->picture_width > venc->width) {
-                this->picture_width = venc->width;
-                this->picture_height = venc->height;
-            }
-            if(this->fps < (double)this->framerate_new.num / this->framerate_new.den) {
-                this->framerate_new.num = vstream->r_frame_rate.num;
-                this->framerate_new.den = vstream->r_frame_rate.den;
-            }
-        }
-
         if(this->preset == V2V_PRESET_PREVIEW){
             if(abs(this->fps-30)<1 && (venc->width!=NTSC_HALF_WIDTH || venc->height!=NTSC_HALF_HEIGHT) ){
                 this->picture_width=NTSC_HALF_WIDTH;
@@ -492,6 +481,18 @@
             this->picture_width = this->picture_width + this->picture_width%2;
           }
         }
+
+        if(this->no_upscaling) {
+            if(this->picture_width && this->picture_width > venc->width) {
+                this->picture_width = venc->width;
+                this->picture_height = venc->height;
+            }
+            if(this->fps < (double)this->framerate_new.num / this->framerate_new.den) {
+                this->framerate_new.num = vstream->r_frame_rate.num;
+                this->framerate_new.den = vstream->r_frame_rate.den;
+            }
+        }
+
         if(this->picture_height==0 &&
             (this->frame_leftBand || this->frame_rightBand || this->frame_topBand || this->frame_bottomBand) ){
             this->picture_height=venc->height-



More information about the commits mailing list