optional automatically upstretching of the video-output-resolution to fit aspect-ratio of desktop-resolution depending on a maximum allowed stretching of individual choice.

Registered by criticalmess

A function that automatically upscales/upstretches the video-output resolution-x or -y to fit the desptop-resolution-aspect-ratio, by comparing the aspect-ratio of broadcast-signal with the one of desktop-resolution and avoids a distractive overstretched video-output-resolution by giving the choice to the maximum allowed percent of the video-output beeing stretched to the user.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Not started
Milestone target:
None

Related branches

Sprints

Whiteboard

The common desktop-resolution-aspept-ratios are: 4:3, 5:4, 16:9 and 16:10.
A broadcasting-signal can have any aspect-ratio from 1:1 to 221:100.

Strength-divider tuning/tryouts:

bc-ar: dr-ar: stretch: divider for 15% / 20% / 25% / 30% / 35% / 40% / 45% (full)
1:1 -> 16:9 = X:43,75% = 3 2,2 1,8 1,5 1,3 1,1 1
1:1 -> 16:10 = X:37,5% = 2,5 1,9 1,5 1,3 1,1 1 1
5:4 -> 16:9 = X:29,69% = 2 1,5 1,2 1 1 1 1
1:1 -> 4:3 = X:25% = 1,7 1,3 1 1 1 1 1
4:3 -> 16:9 = X:25% = 1,7 1,3 1 1 1 1 1
5:4 -> 16:10 = X:21,875% = 1,5 1,1 1 1 1 1 1
1:1 -> 5:4 = X:20% = 1,4 1 1 1 1 1 1
4:3 -> 16:10 = X:16,66% = 1,1 1 1 1 1 1 1
16:10 -> 4:3 = Y:16,66% = 1,1 1 1 1 1 1 1
221:100 -> 16:9 = Y:19,56% = 1,4 1 1 1 1 1 1
16:10 -> 5:4 = Y:21,875% = 1,5 1,1 1 1 1 1 1
16:9 -> 4:3 = Y:25% = 1,7 1,3 1 1 1 1 1
221:100 -> 16:10 = Y:27,6% = 1,9 1,4 1 1 1 1 1
16:9 -> 5:4 = Y:29,69% = 2 1,5 1,2 1 1 1 1
221:100 -> 4:3 = Y:39,67% = 2,7 2 1,6 1,4 1,2 1 1
221:100 -> 5:4 = Y:43,44% = 2,9 2,2 1,8 1,5 1,3 1,1 1

You can easily see that even full-stretching-mode in any case will do no more stretching than 43,75% and that such high percentaged are not the regular case. Anyway, if you find stretching to distractive at those rare aspect-ratio-traversals, than you can change settings to a lower maximum-allowed-stretching, so it's not or minimal affecting the stretching of the regular-screen-aspect-ratios. It gets you almost absolut highest efficiency on using your full screen for watching movies.

Since it is not to much complicated I try some coding.

Note: this is PHP-Notation, it may not work exactly that way in C++

$_GET[something] means calling information either from main function or from settings-file.

##begin

//At first set output resolution X,Y to broadcast-resolution X,Y for safe:
$or-x = $bc-sr-x;
$or-y = $bc-sr-y;

//Function for determining the aspect-ratios of resolutions through the greatest common dividers:
ar ( $ar-a , ar-b ) {
    if ( $ar-b > 0) {
       $ar-a / ($ar-a / $ar-b) .':'.$ar-b / ( $ar-a / $ar-b );
    }
}

//Broadcast-signal-resolution-X,Y and aspect-ratio:
$bc-sr-x = $_GET[$bc-signal-resolution-x_width];
$bc-sr-y = $_GET[$bc-signal-resolution-y_heigth];
$bc-sr-ar = ar ( $bc-sr-x , $bc-sr-y );

//Desktop-resolution-X,Y and aspect-ratio, too:
$dr-x = $_GET[$desktop-resolution-x_width];
$dr-y = $_GET[$desktop-resolution-y_heigth];
$dr-ar = ar ( $dr-x , $dr-y );

//An array thats stores information about aspect-meta-modes:
$aspect-meta-mode-array = array (
          array ( '1:1' , '16:9' ) ,
          array ( '1:1' , '16:10' ) ,
          array ( '5:4' , '16:9' ) ,
          array ( '1:1' , '4:3' ) ,
          array ( '4:3' , '16:9' ) ,
          array ( '5:4' , '16:10' ) ,
          array ( '1:1' , '5:4' ) ,
          array ( '4:3' , '16:10' ) ,
          array ( '16:10' , '4:3' ) ,
          array ( '221:100' , '16:9' ),
          array ( '16:10' , '5:4' ),
          array ( '16:9' , '4:3' ),
          array ( '221:100' , '16:10' ),
          array ( '16:9' , '5:4' ),
          array ( '221:100' , '4:3' ),
          array ( '221:100' , '5:4' ));

//Strength-mode setting in percentage and divider:
$sm_p = $_GET[$strength-mode_setting];
$sm_d = $sm_d_array [ $aspect-meta-mode-array [ $bc-sr-ar ] [ $dr-ar ] ] [ $sm_p ];

//An array that stores information about our dividers:
$sm_d-array = array (
                      array ('15'=>'3','20'=>'2,2','25'=>'1,8','30'=>'1,5','35'=>'1,3','40'=>'1,1','45'=>'1'),
                      array ('15'=>'2,5','20'=>'1,9','25'=>'1,5','30'=>'1,3','35'=>'1,1','40'=>'1','45'=>'1'),
                      array ('15'=>'2','20'=>'1,5','25'=>'1,2','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,7','20'=>'1,3','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,7','20'=>'1,3','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,5','20'=>'1,1','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,4','20'=>'1','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,1','20'=>'1','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,1','20'=>'1','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,4','20'=>'1','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,5','20'=>'1,1','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,7','20'=>'1,3','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'1,9','20'=>'1,4','25'=>'1','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'2','20'=>'1,5','25'=>'1,2','30'=>'1','35'=>'1','40'=>'1','45'=>'1'),
                      array ('15'=>'2,7','20'=>'2','25'=>'1,6','30'=>'1,4','35'=>'1,2','40'=>'1','45'=>'1'),
                      array ('15'=>'2,9','20'=>'2,2','25'=>'1,8','30'=>'1,5','35'=>'1,3','40'=>'1,1','45'=>'1'));

//Another variables for calculating fully stretched video-output-resolutions:
$fsor-x= $bc-sr-y / $dr-y * dr-x;
$fsor-y= $bc-sr-x / $dr-x * dr-y;

//Function that checks either X or Y need stretching and finally stretches our output:
stretch ($sm_d)
if ( ( $bc-sr-x / $bc-sr-y ) < ( $dr-x / $dr-y ) ) {
   if ( $sm_d = 1 ) {
      $or-x = $fsor-x;
      $or-y = $bc-sr-y;
   } elseif ( $sm_d > 1 ) {
      $or-x = ( ( $fsor-x - ( ( $fsor-x - $bc-sr-x ) / $sm_d ) ;
      $or-y = $bc-sr-y;
   }
} elseif ( ( $bc-sr-x / $bc-sr-y ) > ( $dr-x / $dr-y ) ) {
   if ( $sm-d = 1 ) {
      $or-y = $fsor-y ;
      $or-x = $bc-sr-x;
   } elseif ( $sm_d > 1 ) {
      $or-y = ( ( $fsor-y - ( ( $fsor-y - $bc-sr-y ) / $sm_d ) ;
      $or-x = $bc-sr-x;
   }
}

Thats it at all. Im pretty tired now. Please accept and push this. Feel free to make C++ and implement it for me-tv, i would like to beta-test my own feature :)

Michael: You should not put important content here. Anyone can delete this.

You are still lacking the detail of what needs to be done. Developer needed.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.