| CODENOTIFIER | HelpYou are not signed inSign in |
Project: FFmpeg2theora
Revision: 15147
Author: j
Date: 02 Aug 2008 18:15:10
Changes:if only width or height are given, set the other automaticaly to keep aspect ratio
Files:| ... | ...@@ -344,6 +344,12 @@ | |
| 344 | 344 | } |
| 345 | 345 | this->fps = fps; |
| 346 | 346 | |
| 347 | if(this->picture_width && !this->picture_height) { | |
| 348 | this->picture_height = this->picture_width / ((double)venc->width/venc->height); | |
| 349 | } | |
| 350 | if(this->picture_height && !this->picture_width) { | |
| 351 | this->picture_width = this->picture_height * ((double)venc->width/venc->height); | |
| 352 | } | |
| 347 | 353 | |
| 348 | 354 | if(this->preset == V2V_PRESET_PREVIEW){ |
| 349 | 355 | if(abs(this->fps-30)<1 && (venc->width!=NTSC_HALF_WIDTH || venc->height!=NTSC_HALF_HEIGHT) ){ |