How about a "4:3 Expanded" view mode? ie. "16:9 Pan and Scan", or "14:9 Stretched"
#16
thx jmarshall so much , i will try it tonight.

to add new view mode , must modify XBoxRenderer.cpp ?

dear jmarshall , can you speed this bug fix?
http://forum.xbmc.org/showthread.php?tid=21328
Reply
#17
Yes, to add a new viewmode you must modify CXBoxRenderer::SetViewMode(), as well as adding in the option to be switchable from the GUI side of things (probably just the range in GUISettings.cpp, and wherever that setting is used.)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#18
jmarshall Wrote:Yes, to add a new viewmode you must modify CXBoxRenderer::SetViewMode(), as well as adding in the option to be switchable from the GUI side of things (probably just the range in GUISettings.cpp, and wherever that setting is used.)


thx you jmarshall, after i read source CXBoxRenderer::SetViewMode(),

only set g_stSettings.m_fZoomAmount and g_stSettings.m_fPixelRatio

g_stSettings.m_fZoomAmount = 1.0;

but i can't find out how to calc g_stSettings.m_fPixelRatio from fSourceFrameRatio
Reply
#19
thx you jmarshall, after i read source CXBoxRenderer::SetViewMode(),

only set g_stSettings.m_fZoomAmount and g_stSettings.m_fPixelRatio

g_stSettings.m_fZoomAmount = 1.0;

but i can't find out how to calc g_stSettings.m_fPixelRatio from fSourceFrameRatio

i try to understand code :

RECT SrcRect, DestRect;
float fAR;
float fSourceFrameRatio = GetAspectRatio();
g_application.m_pPlayer->GetVideoRect(SrcRect, DestRect);
g_application.m_pPlayer->GetVideoAspectRatio(fAR);

g_stSettings.m_fPixelRatio = fSourceFrameRatio / fAR ;

or g_stSettings.m_fPixelRatio = ((SrcRect.right - SrcRect.left)/(SrcRect.bottom - SrcRect.top)) / fAR ;

or the are same?
Reply
#20
jmarshall Wrote:Try:
Code:
strSizing.Format("Sizing: (%i,%i %2.2f:1)->(%i,%i) (Zoom x%2.2f) AR:%2.2f:1 (Pixels: %2.2f:1)",
                       SrcRect.right - SrcRect.left, SrcRect.bottom - SrcRect.top,(float)(SrcRect.right - SrcRect.left)/(SrcRect.bottom - SrcRect.top),
                       DestRect.right - DestRect.left, DestRect.bottom - DestRect.top, g_stSettings.m_fZoomAmount, fAR*g_stSettings.m_fPixelRatio, g_stSettings.m_fPixelRatio);


Dear jmarshall i try this code , but it's also not work right.
it always show 1.00:1 not right moive org AR.

Image
Image
Image
Image
Reply
#21
after channge code to :

Code:
strSizing.Format("Sizing: (%i,%i) %2.2f:1->(%i,%i) (Zoom x%2.2f) AR:%2.2f:1 (Pixels: %2.2f:1)",
                       SrcRect.right - SrcRect.left, SrcRect.bottom - SrcRect.top,(float)((float)(SrcRect.right - SrcRect.left)/(float)(SrcRect.bottom - SrcRect.top)),
                       DestRect.right - DestRect.left, DestRect.bottom - DestRect.top, g_stSettings.m_fZoomAmount, fAR*g_stSettings.m_fPixelRatio, g_stSettings.m_fPixelRatio);

it work , so good!

i try to modify XBoxRenderer.cpp VIEW_MODE_ORIGINAL mode to i need.
Reply
#22
after modify XBoxRenderer.cpp VIEW_MODE_ORIGINAL mode to , it's work so good!

thx jmarshall!
great thx. i think this mode is more useful than old ORIGINAL mode

Code:
else // if (g_stSettings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_ORIGINAL)
  { // zoom image so that the height is the original size
    RECT SrcRect, DestRect;
    float fAR;
    g_application.m_pPlayer->GetVideoRect(SrcRect, DestRect);
    g_application.m_pPlayer->GetVideoAspectRatio(fAR);
  
    g_stSettings.m_fZoomAmount = 1.0;
    g_stSettings.m_fPixelRatio = (float)(((float)(SrcRect.right - SrcRect.left)/(float)(SrcRect.bottom - SrcRect.top)) / fAR) ;
  }
Reply
#23
In the rescent XBMC builds, there is something wrong with 14:9 display format, it's not 14:9 anymore. It's stretched like 4:3. Anybody knows how to fix this ?
Reply
#24
nothing wrong, just changed. it stretches to 14:9, then zooms to expand.

fixable in source.
Reply
#25
Why did you changed it ?. Can it be like before ? For me the picture is now too stretched out
Reply
#26
because it was requested. it made sense to us.

and, the picture is stretch just as much as it was before. in addition it is cropped a bit during the zoom.

and quite frankly, cannot understand why ppl mess with aspect ratios in the first place.

you can use the custom view mode to do what you want.
Reply
#27
Ok, but when I use custom view mode , it must be done in almost every movie. due the resolution changes
Reply
#28
but why do you use them at all? are all your movies wrong aspect? if they are letterboxed, just tick the crop bars option.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#29
elupus Wrote:but why do you use them at all? are all your movies wrong aspect?

This topic prompts me to ask a question I've been wondering about...

elupus, I know that I can embed pixel aspect ratio information in an mpeg4 stream. If I do so, am I correct in assuming that it gets handled by mplayer during decoding - ie *IT* scales the image it generates in software as per the specified PAR?

Whereas if I don't embed the PAR, but rather use (for example) a 'stretch' mode to adjust the aspect ratio, that in this case the scaling is handled by the display hardware / gpu - ie less cpu impact?

I have been experimenting with anamorphic encodes of HD material, and would prefer hardware over software scaling for obvious reasons; ie software decodes the pixels, hardware scales it to the desired display aspect ratio (DAR) while scaling for video output?

For example, I've done some 960x720 encodes that say 'square pixel' for embedded PAR, that I then play back using 'stretch 16:9' to get to 1280x720, and I have not observed any cpu impact from this (but I've only done a few tests so far). I'm concerned that if I embed the 'actual' PAR that I will take a cpu hit... Will I?

If this is the case, is there any way to tell XBMC about the desired *DAR* for a movie other than manually tweaking the 'display mode' popup? Perhaps something in the header for the avi/mkv/... container (as opposed to embedded in the data stream)? Alternatively...

I'm aware that I can create a movie specific mplayer config file, but it isn't clear where the split between the mplayer code and the xbox/xbmc specific display driver code is (the mplayer docs don't mention an 'xbox display driver') or even if that config file is the correct place to twiddle such things...

Anyway, I'd appreciate clarification as to 'how things work'; it might provide both me and mataman with additional options for controlling playback scaling.

Thanks!
Reply
#30
All scaling is done using the GPU. Mplayer just passes the frame and the PAR and we do the rest.

And no, there's no DAR in most containers, but this ofcourse is just a bit of trivial maths, given the PAR and frame size.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
How about a "4:3 Expanded" view mode? ie. "16:9 Pan and Scan", or "14:9 Stretched"0