libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.21k stars 1.82k forks source link

[Feature Request] Integer Zoom Function. #5008

Closed whatwwkd4496 closed 5 years ago

whatwwkd4496 commented 7 years ago

please add separate integer zoom function to guarantee screen fill, example 320x240 source image on a 1600x900 monitor will be multiplied 5x to 1600x1200, so only 1600x900 image will be visible, a clean 16x9 ratio from 4x3 source to display scanlines evenly. and a 256x224 source on a 1600x900 monitor will be multiplied to 7x rather than 6x because 256x6=1536=underscan and 256x7=1792=overscan, so the goal is to fill screen and display scanlines evenly. basicly an automatic integer pan scan that prefers overscan.

dankcushions commented 7 years ago

Can we have an example of a game + core? I think most systems that have ignorable overscan will have option in the core options (eg https://github.com/libretro/nestopia/blob/master/libretro/libretro.cpp#L362), and some others respect the Retroarch video_crop_overscan option: https://github.com/libretro/RetroArch/blob/1a251de6be2c418b1deda205cd31bc1420455073/retroarch.cfg#L228

i think using these options plus the integer scale option should achieve what you want. anything that gets cropped beyond that is probably stuff you wouldn't want hid.

that said i did make script for retropie to try and intelligently calculate resolutions for use with scanline shaders: see https://github.com/dankcushions/crt-pi-configs - when making this script i thought it would be useful to add video modes to Retroarch 'integer scale on X' and 'integer scale on Y' but never got around to it, so i just did the calculation in my script :)

whatwwkd4496 commented 7 years ago

but the point is not to manually set for each core and game but a single general video option to zoom-in in integer factor to fill screen width. screen width devided by input width example: 1920/320=6, or 1366/256=5,335975 will be count as 6 not 5 to make sure no screen width wasted. it's like a switch to chose between normal or zoomed. fit or fill.

whatwwkd4496 commented 7 years ago

i'm sorry i wasn't straight forward before, what i mean is retroarch is currently fitting image to screen by height, what i want is an option to switch between fit by height or width, as for now a 240p on a 1080p with integer scale on will scale to 960p, if there's an option to switch fit by width, a 320 width on a 1920 screen will fill the entire screen, so if this option enabled i can switch between normal and zoomed instantly

hizzlekizzle commented 7 years ago

I believe what he's asking for is, instead of the current behavior, which always rounds down to the nearest integer (that is, similar to floor(x,y)), he wants it to always round up (so, floor(x,y) + 1.0 or round(x,y+0.5)). On a 1080p screen, this would be 5x integer instead of 4x, which the remaining image being cut off by the monitor edges.

whatwwkd4496 commented 7 years ago

yes, but i'm not asking default behaviour to be replaced just given another option to scale input width to screen width integer wise, cropping up and bottom, by a single switch.

whatwwkd4496 commented 7 years ago

i believe generally this is called pan scan and current behaviour is called pillarboxing/letterboxing. can you please add pan scan option?

hizzlekizzle commented 7 years ago

Oh, you want the width to fill up the screen? That's gonna cut off a lot from the top and bottom.

whatwwkd4496 commented 7 years ago

yes, i would like it as an optional feature. that can be switched on and off.

orbea commented 5 years ago

Duplicate of issue https://github.com/libretro/RetroArch/issues/4158.