PDA

View Full Version : Best Available Resolution Video Setting


Mojonba
2006-10-25, 02:30
Hello,

Recently I got the Xbox Hd pack and while configuring XBMC's settings I found a setting that altough its working as it should it could be altered to serve us better. I am talking about the "best available" resolution setting in the video settings. Imho, it is a very useful setting to those that have a 4:3 Hdtv. It display will 4:3 content at 480P and 16:9 content at 720P or 1080P. The problem with this setting comes when popular Tv show release groups such as LOL (ie 24, Lost, Prision Break, etc.) encode their videos at 624x352 resolution (not quite 16:9 aspect ratio). This resolution makes Xbmc think the video is to big (by one pixel) to be 16:9 and it will change the xbox's display resolution to 480p in order to make the video fit. It would be nice if there was a subsetting that will crop the video by x amount of pixels (only 1 or 2 in thsi case) to make it 16:9 AR. Although there is now downconversion in displaying a video of this size in 480p, for some it would look nicer if upconverted to 720p or 1080p. I tried explaining this issue as clearly as I can but if someone does not understand what I am trying to say let me know.


Mojo

Markeen
2006-10-25, 10:44
Can you tell us what kind of display device you've got (4:3 or 16:9) and what is its resolution ?

jmarshall
2006-10-25, 13:14
And perhaps more importantly: What are all the settings in the MS Dash for the video modes set to?

Mojonba
2006-10-25, 19:45
I've got a 4:3 DLP Front Projector compatible with 480I & P, 720P, 1080P. I've got my MS Dash settings with all video selections except 1080P. "

I''ll try to explain myself a little better. I think the "Best Available" settings works the following way, (somebody correctme if I am wrong). If a play a 800x600 video xbmc wil change display resolution to 480P and dowscale the video to such resolution (due to fact that it is a 4:3 AR video file and it will have black bars at the sides if it is played at 720P). If I play a 608x336 video the video xbmc plays it at 720P resolution and upscales it. The issue arises with 624x352 videos. XBMC calculates this file's AR and finds that it is not quite 16:9 (16:9 = 1.77778; 624:352 = 1.773) so it changes resolution to 480p in order to display it correctly.

jmarshall
2006-10-26, 10:17
It depends on what you have the widescreen setting set to in the MS Dash. That is the key. If it's not set to widescreen, then yes, it will drop to 480p for non-widescreen items. Which aspect ratio specifies that I'll leave up to Markeen to explain.

Markeen
2006-10-26, 11:14
I have a Sharp XVZ90 video projector which has a 800x600 DLP matrix. It supports 480p, 720p and 1080i but 720p and 1080i are above the native resolution of the projector (800x600) so the projector has to downgrade any 720p or 1080i video signals. If your projector has the same resolution I suggest you stay at 480p even for 16:9 videos.

Mojonba
2006-10-26, 11:17
Yes, the point I am trying to make is that there could be a workaround prevents xbmc from dropping to 480p when playing videos encoded at 624x352 (and there are tons of these) and other "almost widescreen" videos.

Markeen
2006-10-26, 11:24
Concerning your videos with 1.773 AR. XBMC detects that the video wont fit in 720p without black bars on the side and as you specified in MSDash that you have a 4:3 AR screen XBMC chooses the resolution which will display the biggest picture on your screen and that is 480p.

Markeen
2006-10-26, 11:26
My question is why do you want to display those videos at 720p ?

Mojonba
2006-10-26, 11:28
Well I've got a Dell 2200mp (800x600, 1080i max) and the SD built-in scaler sucks bigtime. I do understand that the native res of the PJ is 800x600 and anything higher will be downcoverted but, in my case any content fed to the PJ at 720p or 1080i looks much better regardless of its orginal resolution. So in my case sticking to 480p is not an option. I'll rather watch 4:3 content at 720p with black bars that watch it at 480p full screen.

Markeen
2006-10-26, 11:35
then you should just disable 480p in MSDash don't you think ?

Mojonba
2006-10-26, 11:53
I'll rather watch 4:3 content at 720p with black bars that watch it at 480p full screen I was exagerating a bit. I got carried away pissing at my PJ's scaler, yes its bad.

I still prefer to watch 4:3 content at 480p. The whole point of this is that the Best Available setting works prefectly for people like me who prefer 16:9 content at 720p & 4:3 content at 480p. My problem comes with vids with the damn 1.773 ratio. They look much better upscaled to 720p than at 480p. So in order to workaround this I was suggesting a sort of a tolerance setting for the AR calculation so a couple of decimal points of difference doesnt change the resolution.

Markeen
2006-10-26, 12:13
Actually the 16:9 switch point is used only for 4:3 displays. For 16:9 display devices XBMC switches from 4:3 to 16:9 mode at 8/(3*sqrt(3))=1.53960.

XBMC behaves like that because my assumption was that people want the biggest possible picture on screen. I guess your the exception (as there always is). You'd prefer a slightly smaller picture because you get in your opinion a better image quality.

I guess the 16:9 switch point could be a parameter in AdvancedSettings.xml.

Mojonba
2006-10-27, 03:39
I as well want the bigest possible picture really. There is no difference in picture size of a 624x352 video at 480p or at 720p so size is not an issue here, picture quality is.

Any kind of advanced customization of the switchpoint would be an improvement.

Mojonba
2006-10-27, 03:50
Markeen, you seem to think that I want something strange and that "Im the exception".
I think otherwise, In fact I very much like how the "Best available" currently feature works, very useful in my display case. The only problem I have is with 624x352 videos. The purpose of the feature is however defeated when XBMC calculates that these videos are 4:3 AR when they really are not.

Markeen
2006-10-27, 10:23
you misinterpreted me here, I think your request makes perfect sens. Actually I have a patch ready for you to test :
http://sourceforge.net/tracker/index.php?func=detail&aid=1585614&group_id=87054&atid=581840
I don't have the 'power' to integrate it into the cvs but if you compile your own xbmc it's there for you to try, if you don't compile your own xbmc maybe it's a good time to start ;)

kraqh3d
2006-10-27, 17:24
The setting name "43Display_169SwitchPoint" is really ugly. Why not call it "MinimumWideScreenAR"? That's really what it is. If the AR is equal or greater than the value, then Xbmc uses a widescreen display.

Markeen
2006-10-27, 17:42
I guess you're right but this setting is valid only for display device with 4:3 AR. So maybe 43DisplayMinimumWideScreenAR ?

kraqh3d
2006-10-27, 18:18
Right, this only applies to a 4:3 display. Why not simply "4x3WideScreenAR" ?

Markeen
2006-10-27, 19:13
sold !
settings renamed and patch updated http://sourceforge.net/tracker/index.php?func=detail&aid=1585614&group_id=87054&atid=581840

Mojonba
2006-10-28, 09:03
Great, so is this how it goes?

g_advancedSettings.m_4x3WideScreenAR = "Play with value here";

also i am not familiar with the notation here but so what is the trailing "f" for? floating point?

Thx much

Markeen
2006-10-28, 10:59
no no that's not how it works. Don't change the code but AdvancedSettings.xml like this :
<4x3WideScreenAR>1.773</4x3WideScreenAR>

Mojonba
2006-10-29, 04:49
So create an AdvancedSettings.xml in the UserData folder?

kraqh3d
2006-10-29, 18:30
yes. follow these instructions, and include that new tag in the file.
http://www.xboxmediacenter.com/wiki/index.php?title=AdvancedSettings.xml

Mojonba
2006-10-30, 19:40
Sorry to keep asking but I believe I've done everyhting right and I still dont see a change in 4:3 switch points.

Here's what I have done so far. Downloaded CVS and integrated Markeen files in it (replaced existing ones with same file size). Compiled XBMC and created AdvancedSettings.xml file inside the UserData folder.

Here the contents of my AdvancedSettings.xml
<advancedsettings>
<4x3WideScreenAR>1.7</4x3WideScreenAR>
</advancedsettings>

I have played from values ranging from 1.7 to 1.8 (Greater than & less than).

Thx for letting me know if there is anyhting I am doing wrong.

Markeen
2006-10-31, 12:01
I code and you test, so I guess we'll have to come back and forth :) and I am definitely not sure that this little patch is bug free.
Are you sure that video mode is set to auto ? Do you have a debug log ? If not the entire debug log just the part about starting the video.

spiff
2006-10-31, 12:11
just a fyi.

before this can even be considered integrated into cvs you need to honor the all-advancedsettings-are-lowercase standard

Markeen
2006-10-31, 12:16
sir yes sir ! :)
but let it be bug free first...

Mojonba
2006-11-01, 22:21
I was going over the log and noticed this:

"14:54:40 M: 53972992 ERROR: Error loading P:\advancedsettings.xml, Line 2
Error reading end tag."

Any ideas on what might be causing this?

kraqh3d
2006-11-01, 23:12
Hmm. I'm wondering if it may be invalid xml to use a number as the first letter of a tag.

jmarshall
2006-11-02, 05:11
Yeah, invalid to use a number first.

I asked this when the best mode stuff was initially committed, but why are we insisting this number should be different from the normal 4x3/16x9 switch point? They can both then be set by the advanced settings value.

Cheers,
Jonathan

Markeen
2006-11-02, 11:38
ok I updated the patch and the new new setting name is fullscreen_widescreen_ar. Should work this time I hope. I am sorry but I don't have time these days to test it.

jm I guess you mean set both switch points to 8/(3*sqrt(3)) and add two advanced settings fullscreen_display_widescreen_ar and widescreen_display_widescreen_ar ? I don't agree with the 8/(3*sqrt(3)) for fullscreen display but we've been through this already. I could do it anyway, add the two settings and then we wait for reactions... if any.

Is that ok with everyone ?

jmarshall
2006-11-02, 12:01
No - what I meant was just one setting that adjusted both values (ie they're the same). This will ofcourse mean that the 8/(3sqrt(3)) will be used for fullscreen - not sure why it's not used currently in that case, as it maximizes screenspace. Mind reminding me of the reason?

Markeen
2006-11-02, 13:15
Here is the thread where we discussed it http://xbmc.org/forum/showthread.php?t=17842

Here is the little drawing I made to explain my point but which is not reachable anymore in the original thread : http://perso.orange.fr/markeen/

Mojonba
2006-11-03, 08:16
Markeen: I just finished testing the new patch and as far as Im concerned it works perfectly. I tried with several values to test it thoroughly and it is behaving like it should. For example I have it set at 1.77 so videos with 624x352 stay at 720p. I also played a 640x480 video and it changes res to 480p like expected.

I also skimmed over your discussion several months ago and I believe jmarshall underestimates the amount of people with 4:3 front projector setups.

Mojonba
2006-11-10, 18:34
Is there any chance this option might get integrated to the CVS?