home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
Improvement Suggestions
Zoom : adding 'no aspect ratio change' in general settings
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Frodo" data-source="post: 69195" data-attributes="member: 10277"><p>Hi!</p><p></p><p>Great idea on the aspect ratio's</p><p>I think it will be simple to add support for this once we figured out the math. Since i'm no expert on aspect ratio stuff i would like to ask you guys to help me a bit with it;-)</p><p></p><p>To calculate a correct aspect ratio we need to look at the following parameters:</p><p></p><p><strong>1. The screen display width/height. </strong></p><p>The screen displaysize is the entire width/height on which we can present the video. In fullscreen this is simply the entire mediaportal window, but in preview mode its much smaller</p><p>Example when desktop is set to 1024x768 then in fullscreen mode the screen display size is also 1024x768</p><p></p><p><strong>2. The video width/height</strong></p><p>This is the width/height of the video itself. </p><p>Some examples</p><p> PAL = 720x576</p><p> NTSC = 704x480</p><p> HDTV 1080i = 1920x1080</p><p> HDTV 720p = 1280x720</p><p>Offcourse these are just examples, the video can be any size. </p><p></p><p><strong>3. The video aspect ratio</strong></p><p>The aspect ratio in which the video was encoded. </p><p>example For PAL this can be 4:3 or 16:9</p><p></p><p><strong>4. The pixel aspect ratio</strong></p><p>This one is a bit harder to understand.</p><p>On VGA screens a pixel has the same width/height so its aspect ratio is 1:1 </p><p>However on a TV screen a pixel is however not 1:1, if i remember correctly its 768/767. On a plasma/lcd screen it maybe different as well</p><p></p><p><strong>5. The desired aspect ratio</strong></p><p>The aspect ratio the user desires. Normally this will be the same as 3. The video aspect ratio, but for example if you you choose stretch mode, then the desired aspect ratio is different then the video aspect ratio</p><p></p><p>Now if suppose we the 5 parameters</p><p>We then must come up with a formula which gives me 2 rectangles:</p><p></p><p>1) the rectangle which specifies which region of the video source should be displayed</p><p></p><p>2) the rectangle which specifies where on the screen the rectangle in 1) should be displayed</p><p></p><p>The video source rectangle specifies the left/top,width/height of a rectangle which should be copied.</p><p>Example:zoom mode. In this case you need to copy a region of the video source and not the entire video source </p><p>so if video is 720x576 then we might copy (10,10)-(700,557)</p><p></p><p>The rectangle onscreen tells us where exactly on screen we're gonna display the video region copied in step1</p><p>so if we again have the (10,10)-(700,557) then we might copy that to</p><p>(0,100)-(1024,758) which produces a 100pixel black bar on the top & bottom</p><p></p><p>So... who can give me the math??</p><p></p><p>Here are some tasks:</p><p>1)</p><p>screen display : 1024x768</p><p>video : 720x576</p><p>video AR : 4:3</p><p>pixel AR : 0.9 : 1</p><p>desired AR : 4:3</p><p>video source rect : ???</p><p>display rect : ???</p><p></p><p>2)</p><p>screen display : 800x600</p><p>video : 1920x1080</p><p>video AR : 16:9</p><p>pixel AR : 0.75 : 1</p><p>desired AR : 14:9</p><p>video source rect : ???</p><p>display rect : ???</p><p></p><p></p><p></p><p>Frodo</p></blockquote><p></p>
[QUOTE="Frodo, post: 69195, member: 10277"] Hi! Great idea on the aspect ratio's I think it will be simple to add support for this once we figured out the math. Since i'm no expert on aspect ratio stuff i would like to ask you guys to help me a bit with it;-) To calculate a correct aspect ratio we need to look at the following parameters: [b]1. The screen display width/height. [/b] The screen displaysize is the entire width/height on which we can present the video. In fullscreen this is simply the entire mediaportal window, but in preview mode its much smaller Example when desktop is set to 1024x768 then in fullscreen mode the screen display size is also 1024x768 [b]2. The video width/height[/b] This is the width/height of the video itself. Some examples PAL = 720x576 NTSC = 704x480 HDTV 1080i = 1920x1080 HDTV 720p = 1280x720 Offcourse these are just examples, the video can be any size. [b]3. The video aspect ratio[/b] The aspect ratio in which the video was encoded. example For PAL this can be 4:3 or 16:9 [b]4. The pixel aspect ratio[/b] This one is a bit harder to understand. On VGA screens a pixel has the same width/height so its aspect ratio is 1:1 However on a TV screen a pixel is however not 1:1, if i remember correctly its 768/767. On a plasma/lcd screen it maybe different as well [b]5. The desired aspect ratio[/b] The aspect ratio the user desires. Normally this will be the same as 3. The video aspect ratio, but for example if you you choose stretch mode, then the desired aspect ratio is different then the video aspect ratio Now if suppose we the 5 parameters We then must come up with a formula which gives me 2 rectangles: 1) the rectangle which specifies which region of the video source should be displayed 2) the rectangle which specifies where on the screen the rectangle in 1) should be displayed The video source rectangle specifies the left/top,width/height of a rectangle which should be copied. Example:zoom mode. In this case you need to copy a region of the video source and not the entire video source so if video is 720x576 then we might copy (10,10)-(700,557) The rectangle onscreen tells us where exactly on screen we're gonna display the video region copied in step1 so if we again have the (10,10)-(700,557) then we might copy that to (0,100)-(1024,758) which produces a 100pixel black bar on the top & bottom So... who can give me the math?? Here are some tasks: 1) screen display : 1024x768 video : 720x576 video AR : 4:3 pixel AR : 0.9 : 1 desired AR : 4:3 video source rect : ??? display rect : ??? 2) screen display : 800x600 video : 1920x1080 video AR : 16:9 pixel AR : 0.75 : 1 desired AR : 14:9 video source rect : ??? display rect : ??? Frodo [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Zoom : adding 'no aspect ratio change' in general settings
Contact us
RSS
Top
Bottom