Zoom do not keep aspect ratio (3 Viewers)

fer2

Portal Member
April 13, 2007
17
0
Home Country
Spain Spain
I have a 16:9 screen and the zoom feature (also zoom14:9) is fundamental to see movies from TV channels (fake 16:9 letterbox, etc).

I found that something is wrong with these two zoom modes in MP since the aspect ratio is lost and some vertical enlargement apears. I tried different resolutions, crops, and screens adjudstments (of course to get a squared box). Everything is well scaled for 4:3 but not for the zoomed versions. It is like an internal scale factor is wrong for these modes.

Did anybody notice this? May be I'm doing something wrong??

I'm using the SVN from april the 10th 2007.

Thank you!!!
 

daniel_1980

Portal Pro
August 19, 2006
148
1
Home Country
Germany Germany
I noticed this at least 1/2 year ago, and it is still the same (with every codec I tried). I think in the zoom modes the PAR is not considered when playing 4:3 content.
 

lkuech

Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    51
    Hamburg
    Home Country
    Germany Germany
    Hi all.

    I have taken a look into the source code. I looks like the "zoom" mode works a little bit different depending on several parameters (like screensize and videosize).

    Can you please post a snippet of your log file after switching to the "zoom" mode?

    The result for example may look like this:
    Code:
    [Info.][5]: PlaneScene: crop T, B  : 10, 10
    [Info.][5]: PlaneScene: crop L, R  : 13, 13
    [Info.][5]: PlaneScene: video WxH  : 768x576
    [Info.][5]: PlaneScene: video AR   : 768:576
    [Info.][5]: PlaneScene: screen WxH : 1284x721
    [Info.][5]: PlaneScene: AR type    : Zoom
    [Info.][5]: PlaneScene: PixelRatio : 1
    [Info.][5]: PlaneScene: src        : (13,83)-(755,494)
    [Info.][5]: PlaneScene: dst        : (0,0)-(1284,721)

    Maybe that will help us to understand what if the zoom mode does not what it should ;)

    Bye
    Lars
     

    daniel_1980

    Portal Pro
    August 19, 2006
    148
    1
    Home Country
    Germany Germany
    NORMAL:
    -------
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: crop T, B : 2, 1
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: crop L, R : 12, 9
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: video WxH : 768x576
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: video AR : 768:576
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: screen WxH : 666x499
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: AR type : Normal
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: PixelRatio : 1,3299
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: src : (12,2)-(759,575)
    2007-04-18 17:59:36.671875 [Info.][12]: PlaneScene: dst : (387,91)-(887,590)


    ....

    ZOOM:
    -----
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: crop T, B : 2, 1
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: crop L, R : 12, 9
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: video WxH : 768x576
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: video AR : 768:576
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: screen WxH : 1024x768
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: AR type : Zoom
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: PixelRatio : 1,3299
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: src : (12,97)-(759,479)
    2007-04-18 17:59:43.125000 [Info.][12]: PlaneScene: dst : (0,0)-(1024,768)
     

    fer2

    Portal Member
    April 13, 2007
    17
    0
    Home Country
    Spain Spain
    This the log for my modes:
    NORMAL:
    2007-04-18 19:57:25.781250 [Info.][14]: PlaneScene: crop T, B : 0, 0
    2007-04-18 19:57:25.781250 [Info.][14]: PlaneScene: crop L, R : 0, 0
    2007-04-18 19:57:25.781250 [Info.][14]: PlaneScene: video WxH : 768x576
    2007-04-18 19:57:25.796875 [Info.][14]: PlaneScene: video AR : 768:576
    2007-04-18 19:57:25.796875 [Info.][14]: PlaneScene: screen WxH : 763x595
    2007-04-18 19:57:25.796875 [Info.][14]: PlaneScene: AR type : Normal
    2007-04-18 19:57:25.796875 [Info.][14]: PlaneScene: PixelRatio : 1,3996
    2007-04-18 19:57:25.812500 [Info.][14]: PlaneScene: src : (0,0)-(768,576)
    2007-04-18 19:57:25.812500 [Info.][14]: PlaneScene: dst : (113,2)-(680,597)

    ZOOM14:9 and ZOOM:
    2007-04-18 19:57:20.250000 [Info.][14]: PlaneScene: crop T, B : 0, 0
    2007-04-18 19:57:20.265625 [Info.][14]: PlaneScene: crop L, R : 0, 0
    2007-04-18 19:57:20.265625 [Info.][14]: PlaneScene: video WxH : 768x576
    2007-04-18 19:57:20.265625 [Info.][14]: PlaneScene: video AR : 768:576
    2007-04-18 19:57:20.265625 [Info.][14]: PlaneScene: screen WxH : 763x595
    2007-04-18 19:57:20.281250 [Info.][14]: PlaneScene: AR type : Zoom14to9
    2007-04-18 19:57:20.281250 [Info.][14]: PlaneScene: PixelRatio : 1,3996
    2007-04-18 19:57:20.281250 [Info.][14]: PlaneScene: src : (0,50)-(768,525)
    2007-04-18 19:57:20.281250 [Info.][14]: PlaneScene: dst : (77,2)-(715,597)
    2007-04-18 19:57:21.890625 [Info.][14]: PlaneScene: crop T, B : 0, 0
    2007-04-18 19:57:21.906250 [Info.][14]: PlaneScene: crop L, R : 0, 0
    2007-04-18 19:57:21.906250 [Info.][14]: PlaneScene: video WxH : 768x576
    2007-04-18 19:57:21.906250 [Info.][14]: PlaneScene: video AR : 768:576
    2007-04-18 19:57:21.921875 [Info.][14]: PlaneScene: screen WxH : 763x595
    2007-04-18 19:57:21.921875 [Info.][14]: PlaneScene: AR type : Zoom
    2007-04-18 19:57:21.921875 [Info.][14]: PlaneScene: PixelRatio : 1,3996
    2007-04-18 19:57:21.921875 [Info.][14]: PlaneScene: src : (0,103)-(768,471)
    2007-04-18 19:57:21.937500 [Info.][14]: PlaneScene: dst : (15,2)-(778,597)

    It seems to me that the cutting values shown in the "src" are wrong calculated since they do not keep the 16:9 aspect ratio. For example, in the ZOOM mode the orignal image is vertically cut between 103 and 471 which yields an AR:
    AR=768/(471-103)=2.0869... <> 1.77777...=16/9
    the vertical band width should be: x=768*9/16=432, so the "src" box should be something similar to:

    PlaneScene: src : (0,72)-(768,504)

    The zoom14to9 admits a similar correction.

    I think the source code badly calculates these figures. Please, I hope you can correct this!!!
     

    Noelix

    Portal Pro
    February 18, 2006
    393
    1
    Salt Lake City, UT
    Home Country
    United States of America United States of America
    Same problem here - I never knew what the damn zoom modes were good for since all they did was stretch the image horizontally, and still not getting rid of the false letterboxing. I ended up finding a solution to this with the Autocropper plugin. Once you map the action->autozoom to a button on your remote it works great. Unfortunately I had to scour the forums to find that out.
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    51
    Hamburg
    Home Country
    Germany Germany
    Well... the problem seems to be clear.
    All zoom modes that have to calculate horizontal or vertical borders did not take the "global" pixel ratio into their calculations. Because of this only users with non squared pixels noticed this effect.
    If you look at the values I have posted above you will see that with squared pixels ([Info.][5]: PlaneScene: PixelRatio : 1) the values fit pretty well.

    A normal PAL 4:3 video is 768x576. A 16:9 crop out of it should have a vertical border of ~72. (576 - (2 * 72) = 432 ... 768 / 432 = 1,777_ = 16:9).

    If you now take a look at the value fer2 has posted you will find a vertical border of 103 :eek:
    But if you divide this value by the PixelRatio set by fer2 you get 103 / 1,3996 = 73.5.

    I have build a quick fix for all zoom mode using borders. Please test it deeply with all modes (Pan and Scan, Zoom, Zoom 14:9) and report it back here.

    It is a modified core.dll compiled under the SVN of today.
    Make a backup of your original file and replace it with this one.

    I will delete this file sooner or later because of its size.
    If these changes work, I will post these changes at sourceforge.

    EDIT: Attachment removed because the change is part of the SVN's now.

    Bye
    Lars
     

    daniel_1980

    Portal Pro
    August 19, 2006
    148
    1
    Home Country
    Germany Germany
    Replacing the core.dll causes MP not to start. I use stable release 0.2.2.0. I'm not into using svn etc., so I won't be able to test this in the near future.
     

    Users who are viewing this thread

    Top Bottom