Page 1 of 2

Scaling: needs to go wider % range

PostPosted: 2. Apr 2015, 02:28
by Technologov
Range of scaling 100%...200% is not wide enough.
Like: 25% to 400% or more... would be better.

1. This will allow to eliminate "Scaled" mode completely.
hint: if GA installed, use "dynamic resolution resizing, if not : scale automatically ! ", plus allow manual scaling...
2. This will allow running ancient guests (DOS + Win2000) on modern Retina displays.

DOS:
320x240 (on many games)

Modern Retina:
5120x2880 (on new Apple iMac)

So even 1000% in some cases may not be enough... but 200% ? Obviously not enough.
On the other hand - @ 25% people will be able to put lots of small VM windows all around.

Re: Scaling: needs to go wider % range

PostPosted: 3. Apr 2015, 16:02
by twipley
Hmm yes, automatic scaling sound nice.

Also, is an integer-scaling (scaling algorithm) mode selectable or has been implemented?

It would solve bugs such as https://www.virtualbox.org/ticket/10852 (Automatic integer-factor scaling under full-screen mode)

Re: Scaling: needs to go wider % range

PostPosted: 3. Apr 2015, 16:31
by loukingjr
twipley wrote:It would solve bugs such as https://www.virtualbox.org/ticket/10852 (Automatic integer-factor scaling under full-screen mode)

A non-implemented feature is not a bug. It is a non-implemented feature. It's like saying GIMP won't play my MP3s so it has a bug.

Re: Scaling: needs to go wider % range

PostPosted: 3. Apr 2015, 17:38
by twipley
Oh yeah, where did I have my head, you're right.

Then, it would satisfy this "feature request."

Re: Scaling: needs to go wider % range

PostPosted: 3. Apr 2015, 17:40
by loukingjr
better :wink:

Re: Scaling: needs to go wider % range

PostPosted: 7. Apr 2015, 18:39
by loukingjr
Scaling may very well need a wider range. Microsoft has already said they are planning on supporting 8K screens and there is a rumor that Apple may release an 8K iMac later this year or the beginning of next. 7,680 x 4,320 resolution.

Re: Scaling: needs to go wider % range

PostPosted: 10. Apr 2015, 10:53
by bostjan
First of all, thank you for adding scaling to windowed and fullscreen mode!

I agree with Technologov. Wider ranges.

For starters, the biggest difference for least effort can be had if you enable a simple multiplier scaling. 100%, 200%, 300%, etc. Scaling which simply multiplies pixels. This mode is also best for situations when one does not want any scale blur, as it keeps everything optimally sharp. Even if you have blurry intermediary scale options, I think that round multipliers should scale like this (or only blur as an option).

Then, maybe support for intermediary values, such as 150%, 82%, 822%, etc. Here an interesting question is which algo to use, whether to enable machine acceleration of scaling etc.

Best (as also others have pointed out) would be this: windowed and fullscreen mode with "auto" scaling. One that scales to the edge, but does not distort aspect ratio of the image. One can then use fullscreen mode with full submersion, the screen is as if guest was completely native.

The reason this is so important is also that the desktop is usually different resolution than the game we run. Or several different games. One would have to constantly change the zoom level, when one works on the desktop, and then for all other situations.

"auto" would always scale so as to fill the whole area (but keep some black borders when image ratios do not match). Be it windowed or fullscreen. User does not need to manually search for the exact %. In windowed mode, it would work like current Scale mode, only that window could be resized to any size and would keep some black edges when aspects would not match.

Current Scale mode does not work like this because it remembers the last window size and when I switch to a resolution with a different aspect ratio, it will distort the image. "auto" scaling with black edges would fix all that.

Please also see my ticket where I first described it: https://www.virtualbox.org/ticket/12816
Thanks again for adding this!

Re: Scaling: needs to go wider % range

PostPosted: 11. Apr 2015, 15:10
by twipley
What you are calling "simple-multiplier scaling" might also be called "integer-factor scaling." In the options pane, could be an optional tick for, as you're pertinently suggesting, automatic scaling. Or, even that could well be selected by default. However, I think there also should be an option for preserving what you're rightly calling "optimally-sharp scaling."

Both of our tickets quite meet in purpose. "Restrict scaling to integer (zooming) values" seems much-pertinent.

Then again, another option could be added, to the effect of "do not care to maintain the aspect ratio." Although, I don't get why would someone go that way. I'd personally keep that as an option not in the GUI as such, but only activeable from the command line. This parameter would override the "sharp scaling" flag, toggleable through the GUI.

I think it's awesome that devs are putting efforts in implementing these scaling features. Is something else to be said?

Re: Scaling: needs to go wider % range

PostPosted: 12. Apr 2015, 02:21
by Legorol
I am missing something in my knowledge here, can someone please explain to me why this new scaling was introduced and what does it give over the scaling mode that was already in versions 4.x? In addition, the scaling mode in 4.x gives much better quality graphics. Why is the quality worse with the new solution? Is there a technical reason?

For example, I use MS-DOS guest in VirtualBox. Under 4.x, I could scale it to arbitrary size using the scaling mode, just by dragging the corner of the window. The result had good graphics quality. Under 5.x, the graphics quality is poor, text is hard to read when scaled.

Re: Scaling: needs to go wider % range

PostPosted: 12. Apr 2015, 12:38
by Technologov
Old scaling had a problem:
it was incompatible with "dynamic resolution resizing" -- i.e. in normal mode, when dragging window, guest will change it's resolution dynamically. New scaling is compatible.
In old scaling -- dragging window will change scaling %, but not guest's resolution.

I don't think new scaling is good, but I understand why it was added. This means, that I bet scaling will be re-designed yet again in the future.

read on my ideas:
https://forums.virtualbox.org/viewtopic ... 15&t=67284

Re: Scaling: needs to go wider % range

PostPosted: 12. Apr 2015, 17:27
by Legorol
I'm afraid I still don't see why "old scaling had a problem" or how was it "incompatible with dynamic resolution resizing".

Functionality in 4.x with GA installed:
- Without scaling mode, dragging the window corner changes guest's resolution.
- With scaling mode turned on, dragging the window corner scales the guest screen relative to the guest's current resolution.
Scaling is compatible with any guest resolution. The workflow is simple: turn off scaling mode and drag window to change resolution, then turn on scaling mode on drag window to change scaling factor. You already have complete freedom to achieve an arbitrary combination of guest resolution and scaling on top of that.

Functionality in 5.0 with GA installed:
- All the functionality present in 4.x is still present.
- Additionally, a set of fixed scaling factors can be applied without turning scaling mode on.
- Scaling graphics quality is dramatically reduced both without and with scaling mode on.
While the ability to apply a fixed scaling factor may introduce a bit of extra convenience in terms of setting things up, it isn't in fact providing any new core functionality that wasn't already achievable in 4.x.

In my opinion, the limited extra convenience in 5.0 is not worth the drop in graphics quality. In particular, it should not affect what happens when scaling mode is on. As it is, it's a step backwards.

Re: Scaling: needs to go wider % range

PostPosted: 12. Apr 2015, 18:14
by Technologov
You're right, just in v4.x it was inconvenient to switch between scaled mode and normal mode.
If you think old style scaling image quality degraded, then it is a regression-bug. You should open a new ticket, in this forum.

Re: Scaling: needs to go wider % range

PostPosted: 13. Apr 2015, 09:31
by bostjan
Legorol wrote:I'm afraid I still don't see why "old scaling had a problem"


Scaling in 4.3.X has the following limitations:
1. There is no scaling in fullscreen mode. Scale mode is windowed. This means that fully submersed experience cannot be achieved.
2. Scaled mode does not resize window. If your desktop is 1920x1200 and the game you run is 640x480, you will get a distorted desktop (squashed to 4:3) when you return from the game. Who says that I don't want to also work on the desktop? And I would need to manually switch all the time (and I do).

"Auto" scaling in windowed / fullscreen mode would fix everything.
As for the scaling quality, I also hope that the algo improves.


One possible arrangement of options could be this:

1. Checkbox to enable or completely disable scaling.
2. Checkbox/radiobox to select integer scaling or smooth scaling.
3. Checkbox to enable or disable auto scaling. When enabled, exact factor cannot be manually selected (disable section 4.).
4. A control to select exact scaling % factor. In case of integer scaling, select integer number to multiply or divide. Dividing means downscaling (reducing by simply skipping pixels).

In both cases of integer / smooth scaling, I would not limit the factor selection (the user can select even 1% or 100000%).
Instead, add a check when the target resolution is calculated. At this point, both source and available resolution are known.

Let available resolution be the usable client area in window (or fullscreen if we are in fullscreen mode).
Calculating target resolution:
1. If auto scaling is enabled, targer resolution = available resolution.
2. else if integer scaling, find the largest integer which would not overflow available resolution. Calculate target resolution.
3. else if smooth scaling, calculate target resolution from the scaling factor. If the target resolution overflows the available resolution, limit it to available resolution.

At last, don't forget to additionally reduce one dimension of target resolution if required in order to keep the aspect ratio. This may require some extra recalculations in case of integer scaling.

Re: Scaling: needs to go wider % range

PostPosted: 13. Apr 2015, 19:11
by Dsen
Legorol wrote:I am missing something in my knowledge here, can someone please explain to me why this new scaling was introduced and what does it give over the scaling mode that was already in versions 4.x? In addition, the scaling mode in 4.x gives much better quality graphics. Why is the quality worse with the new solution? Is there a technical reason?


I will try to clarify the reason of implementing the new *scale factor* feature in VBox 5.0.

The general idea - is to get rid of the *scaling mode* in the meaning it currently exists.
Initially, *scaling mode* was developed by the request but not by the reasons some users may think it was.
The idea was NOT "to scale guest contents to scale-factor user wants" but instead "to adjust guest contents to size of machine-window user wants".
So the idea was to get the kiosk-like mode where the guest contents is bounded (e.j. scaled to) by the size of machine-window. That's it.
And if users made a decision that this mode is acceptable for other their purposes - it's their choice but not the idea of that old feature.

So yes, *scaling mode* is used to automatically scale the guest contents to the size of machine-window..
But it's always just a machine-window with no menu/status bar and no possibility to go to *full-screen*/*seamless* modes (because *scaling* mode is just another mode).
So we decided that the possibility of guest contents scaling should be independable of any mode, e.j. it should be possible to apply scale-factor to normal/full-screen/seamless modes also.
And then the *scaling mode* itself will become the mode with rare use case when user just wants the machine-window(s) of fixed size where the quality and even aspect-ratio of the guest contents is not of importance.

The scaling quality is the same for scale-factor and *scaling mode* itself. It was just changed to have much more performance..
And since most of beta users already blamed us for that decision, we returned scaling back to smoothness, it will be available to test in subsequent beta.
The current idea is to have a possibility to configure scaling quality option, but since we had not implemented the quality/performance presets for 3D at all, we can't add corresponding option into GUI yet.
So, for now it will be configurable with the "GUI/Scaling/Optimization" extra-data flag supporting "Performance" value to get the fast ugly mode, while the smooth will be the default one.

Re: Scaling: needs to go wider % range

PostPosted: 13. Apr 2015, 20:35
by twipley
bostjan wrote:One possible arrangement of options could be this:

1. Checkbox to enable or completely disable scaling.
2. Checkbox/radiobox to select integer scaling or smooth scaling.
3. Checkbox to enable or disable auto scaling. When enabled, exact factor cannot be manually selected (disable section 4.).
4. A control to select exact scaling % factor. In case of integer scaling, select integer number to multiply or divide.

This quote and this ticket https://www.virtualbox.org/ticket/10852 seem to sum it up very well.

Although I cannot see, at least under fullscreen mode, why would anyone want to prevent VirtualBox from automatically scaling to the highest-possible value, be it either fractional or integer.