use the old logic for sizing

This commit is contained in:
Brooke Vibber 2023-05-17 09:53:50 -07:00
parent 5181d41f91
commit 9c0e598ce2
1 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,6 @@ function convert( $src, $dest, $options ) {
$mbits = 1000 * 1000;
$base = intval( $mbits * floatval( $options['quality'] ) );
/*
if ( $bitrate < 1 * $base || $height < 480 ) {
$frameWidth = 640;
$frameHeight = 360;
@ -191,7 +190,6 @@ function convert( $src, $dest, $options ) {
$frameHeight = 1080;
$bitrate = min( $bitrate, $base * 8 );
}
*/
$aspect = $width / $height;
$pixels = $width * $height;
@ -199,6 +197,7 @@ function convert( $src, $dest, $options ) {
// canonical base rate is 1 megabit at 480p
$bitrate = min( $bitrate, 4 * $base );
/*
$minWidth = 640;
$minHeight = 360;
@ -233,6 +232,7 @@ function convert( $src, $dest, $options ) {
$bitrate = min( $bitrate, $maxrate );
}
}
*/
$wide = $aspect > ( $frameWidth / $frameHeight );
$crop = boolval( $options['crop'] );