optional automatically upstretching of the video-output-resolution to fit aspect-ratio of desktop-resolution depending on a maximum allowed stretching of individual choice.
A function that automatically upscales/
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
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
The common desktop-
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
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-
$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-
$bc-sr-x = $_GET[$
$bc-sr-y = $_GET[$
$bc-sr-ar = ar ( $bc-sr-x , $bc-sr-y );
//Desktop-
$dr-x = $_GET[$
$dr-y = $_GET[$
$dr-ar = ar ( $dr-x , $dr-y );
//An array thats stores information about aspect-meta-modes:
$aspect-
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[$
$sm_d = $sm_d_array [ $aspect-
//An array that stores information about our dividers:
$sm_d-array = array (
//Another variables for calculating fully stretched video-output-
$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.