← Back to team overview

me-tv-development team mailing list archive

Re: [Question #60873]: Optional streching of me-tv output to best fit resolution ignoring aspect-ratio?

 

Question #60873 on Me TV changed:
https://answers.launchpad.net/me-tv/+question/60873

CypherDelic gave more information on the question:
For example php-style code for stretching-function:

Needed Variables:
$strength-divider = !read settings-file
$broadcast-x = !read bc-signal-x
$broadcast-y = !read bc-signal-y
$desktop-x = !read desktop-resolution-x
$desktop-y = !read desktop-resolution-y
$output-x = $broadcast-x
$output-y = $broadcast-y

Optional (for easier code handling):
$fo-x = $broadcast-y / $desktop-y ) * $desktop-x
$fo-y = $broadcast-x / $desktop-x ) * $desktop-y

Function:
if ( ( $broadcast-x / $broadcast-y ) < ( $desktop-x / $desktop-y ) ) {
   $output-x = ( ( $fo-x - ( ( $fo-x - $broadcast-x ) / $strength-divider ) ;
   $output-y = $broadcast-y;
} elseif ( ( $broadcast-x / $broadcast-y ) > ( $desktop-x / $desktop-y ) ) {
   $output-y = ( ( $fo-y - ( ( $fo-y - $broadcast-y ) / $strength-divider ) ;
   $output-x = $broadcast-x;
}

Example 1:

broadcast-ar: 16:9
desktop-aspect-ratio: 5:4

$broadcast-x = 720
$broadcast-y = 405

$desktop-x = 1280
$desktop-y = 1024

Result for $strength-divider =1:
$output-x = 720
$output-y = 576

Result for $strength-divider =2:
$output-x = 720
$output-y = 490,5


Example 2:

broadcast-ar: 1:1
desktop-aspect-ratio: 4:3

$broadcast-x = 576
$broadcast-y = 576

$desktop-x = 1024
$desktop-y = 768

Result for $strength-divider = 1:
$output-x = 768
$output-y = 576

Result for $strength-divider = 2:
$output-x = 672
$output-y = 576


Example 3:

broadcast-ar: 4:3
desktop-aspect-ratio: 16:10

$broadcast-x = 720
$broadcast-y = 540

$desktop-x = 1680
$desktop-y = 1050

Result for $strength-divider = 1:
$output-x = 864
$output-y = 540

Result for $strength-divider = 2:
$output-x = 792
$output-y = 540

Hopefully i get a respond soon.

-- 
You received this question notification because you are a member of Me
TV Development, which is an answer contact for Me TV.