SCALER xBRZ (SDL1)

Here you can discuss the development of patches.

Re: xBRZ - High quality image scaling support for DOSBox

Postby 2mg » 2014-9-09 @ 19:21

truth5678 wrote:Probably best to stay on-topic to this thread so others can easily read the above posts for related information. I guess it's also a courtesy to the developer(s) who worked on the patch.


In that case, I guess I'll have to use xBRZ Zenju provided in his download link on pg. 1 and copy it to DAUM :) I'll try to find out if that one is newer compared to one on Gulikoza's page. I've read that DAUM supports it under special configuration.

PS: Zenju implemented it into another emulator, but I still think DOSBox could use shader/filter support.
( http://www.snes9x.com/phpbb3/viewtopic.php?t=15191 )
2mg
Newbie
 
Posts: 33
Joined: 2014-3-21 @ 12:52

Re: xBRZ - High quality image scaling support for DOSBox

Postby truth_deleted » 2014-9-09 @ 19:46

Perhaps try this patch, too: viewtopic.php?f=41&t=36342.
truth_deleted
 

Re: xBRZ - High quality image scaling support for DOSBox

Postby 2mg » 2014-9-11 @ 16:32

Well, one final bump, maybe more code-savvy people will notice it!
2mg
Newbie
 
Posts: 33
Joined: 2014-3-21 @ 12:52

Re: xBRZ - High quality image scaling support for DOSBox

Postby Dominus » 2014-9-11 @ 16:36

Please let this be the final bump on the whole forum. We do not like bumps.
User avatar
Dominus
DOSBox Moderator
 
Posts: 7644
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: xBRZ - High quality image scaling support for DOSBox

Postby gulikoza » 2014-9-11 @ 17:30

I read this topic, however I failed to find a specific question/issue I could answer to. There have been a few suggestions already, so I was waiting to see what happens...

As far as the D3D patch is concerned, surely it'd be possible to add support for other shader formats. But the patch as it is now was targeted for the fx (HLSL) format and heavily modified for the hq2x shader specifically so supporting other formats would mean a substantial rewrite. Unfortunately I don't have the time to take on such a project at the moment...
Since there is no (official) interest to look into adding OpenGL shader support, I don't see this moving forward much.
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: xBRZ - High quality image scaling support for DOSBox

Postby FeedingDragon » 2014-9-11 @ 19:51

If I was a better programmer, I'd be willing to put the work into it. But I just don't understand things enough to do it :( From what I've been reading, though, OpenGL "should" be fairly straight forward in implementing. But everything I've tried in my other project comes out all wrong. Not sure how to type this out, but everything I tried to scale OpenGL output ends up with the image the same size, just bands of background added in... I really should have taken some screen shots to show you.... I'll try with text...

Original image...

xxxxxxx
xxxxxxx
xxxxxxx

After scaling

x x x x x x x

x x x x x x x

x x x x x x x

Notice the spaces added in? The individual "pixels" stay the same (the x's), but background (the spaces,) are added in to produce the new size. If the size is doubled, it adds in single background pixels. If tripled, it adds them in pairs, etc... When partials are needed, then every few pixels will have an "extra" background pixel added in. I eventually gave up (on my other project,) and just upgraded to SDL2 and used it's HW rendering routine for the fine tuning with straight pixel multiplication for the integer scaling. Crude and time consuming, but it gets the job done.
Feeding Dragon
User avatar
FeedingDragon
Oldbie
 
Posts: 821
Joined: 2003-8-24 @ 03:25
Location: Central Texas

Re: xBRZ - High quality image scaling support for DOSBox

Postby 2mg » 2014-9-11 @ 23:02

gulikoza wrote:I read this topic, however I failed to find a specific question/issue I could answer to. There have been a few suggestions already, so I was waiting to see what happens...

As far as the D3D patch is concerned, surely it'd be possible to add support for other shader formats. But the patch as it is now was targeted for the fx (HLSL) format and heavily modified for the hq2x shader specifically so supporting other formats would mean a substantial rewrite. Unfortunately I don't have the time to take on such a project at the moment...
Since there is no (official) interest to look into adding OpenGL shader support, I don't see this moving forward much.


You should check libretro on GitHub to see what they are trying to implement - AFAIK it's a cross platform cross API(unsure?) type of shaders and filters. They also offer a converter, but I'm not sure for what shader formats. And perhaps what the OP posted, about xBRZ itself, at least coding it in .fx format, since you're shaders pack offers xBR (btw, are they up to date?).

FeedingDragon wrote:If I was a better programmer, I'd be willing to put the work into it. But I just don't understand things enough to do it :( From what I've been reading, though, OpenGL "should" be fairly straight forward in implementing. But everything I've tried in my other project comes out all wrong. Not sure how to type this out, but everything I tried to scale OpenGL output ends up with the image the same size, just bands of background added in... I really should have taken some screen shots to show you.... I'll try with text...

...

Notice the spaces added in? The individual "pixels" stay the same (the x's), but background (the spaces,) are added in to produce the new size. If the size is doubled, it adds in single background pixels. If tripled, it adds them in pairs, etc... When partials are needed, then every few pixels will have an "extra" background pixel added in. I eventually gave up (on my other project,) and just upgraded to SDL2 and used it's HW rendering routine for the fine tuning with straight pixel multiplication for the integer scaling. Crude and time consuming, but it gets the job done.


I think there are sharpeners and upscalers and resizers that try what I believe is exactly what you are doing - scaling but staying true to image that was upscaled and leave it as true and pixely as possible, see libretro on GitHub. Or RetroArch, you should ask there for help.
2mg
Newbie
 
Posts: 33
Joined: 2014-3-21 @ 12:52

Re: xBRZ - High quality image scaling support for DOSBox

Postby leileilol » 2014-9-12 @ 05:04

Aren't RetroArch trying to move away from nVidia cg?
Voodoo2s aren't 100mhz stock
Geforce256 isn't released as a beta on New Years '99 under the Quadro brand
DOS gaming isn't a bilinear 320x200 16:10
DOS PCs aren't better than the Macintosh
DOSBox is not for running Windows 9x
SGL != Glide
User avatar
leileilol
l33t++
 
Posts: 9365
Joined: 2006-12-16 @ 18:03

Re: xBRZ - High quality image scaling support for DOSBox

Postby gulikoza » 2014-9-12 @ 05:46

2mg wrote:You should check libretro on GitHub to see what they are trying to implement - AFAIK it's a cross platform cross API(unsure?) type of shaders and filters. They also offer a converter, but I'm not sure for what shader formats. And perhaps what the OP posted, about xBRZ itself, at least coding it in .fx format, since you're shaders pack offers xBR (btw, are they up to date?).


Most shaders on my page have been contributed by another user...I don't know all of them :)

What shader would you like to be converted? https://github.com/libretro/common-shad ... r-v3.7a.cg is already HLSL, it would need only a few adjustments to make it work, would that be ok?
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: xBRZ - High quality image scaling support for DOSBox

Postby 2mg » 2014-9-12 @ 09:46

gulikoza wrote:
2mg wrote:You should check libretro on GitHub to see what they are trying to implement - AFAIK it's a cross platform cross API(unsure?) type of shaders and filters. They also offer a converter, but I'm not sure for what shader formats. And perhaps what the OP posted, about xBRZ itself, at least coding it in .fx format, since you're shaders pack offers xBR (btw, are they up to date?).


Most shaders on my page have been contributed by another user...I don't know all of them :)

What shader would you like to be converted? https://github.com/libretro/common-shad ... r-v3.7a.cg is already HLSL, it would need only a few adjustments to make it work, would that be ok?


Posts like these make my day :kiss:

Actually, in order of what I'd like to see is xBRZ MultiThreaded > xBRZ > xBR. Your pick mate!

PS: and of course, a DOSBox patch for .cg support, or maybe a .fx <-> .cg converter? I'm not asking, I'm merely suggesting!
2mg
Newbie
 
Posts: 33
Joined: 2014-3-21 @ 12:52

Re: xBRZ - High quality image scaling support for DOSBox

Postby gulikoza » 2014-9-12 @ 14:08

Please give me an exact link to the shader...I can't search the forums for the latest version and I don't have the time to port C code...
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: xBRZ - High quality image scaling support for DOSBox

Postby 2mg » 2014-9-12 @ 14:50

gulikoza wrote:Please give me an exact link to the shader...I can't search the forums for the latest version and I don't have the time to port C code...


http://sourceforge.net/projects/hqmame/ ... p/download - latest xBRZ source

download/file.php?id=11430 - modified Zenju's DOSBox+xBRZ from 1st page, if you need to see that implementation

http://board.byuu.org/viewtopic.php?f=10&t=2248 - xBR thread

http://hqmame.sourceforge.net/ScalerTest.zip - scaler comparison executable+unscaled test images, see why xBR and xBRZ are awesome

And ofcourse, libretro shader repositories on github for .cg implementation and converter:
https://github.com/libretro/common-shaders
2mg
Newbie
 
Posts: 33
Joined: 2014-3-21 @ 12:52

Re: xBRZ - High quality image scaling support for DOSBox

Postby gulikoza » 2014-9-12 @ 15:20

See, that's the problem. The first link is C implementation. Can't use that... the second one as well, I assume.
Third link is a 27 page thread on the forum...don't have time to read it all. Fourth link is just a zip with images and a dll.

Fifth link has shaders, but none of them are xBRZ and 50+ different files with xbr in the name. Which one do I use?
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: xBRZ - High quality image scaling support for DOSBox

Postby kolano » 2014-9-12 @ 15:46

gulikoza wrote:See, that's the problem. The first link is C implementation. Can't use that... the second one as well, I assume.
Third link is a 27 page thread on the forum...don't have time to read it all. Fourth link is just a zip with images and a dll.

Fifth link has shaders, but none of them are xBRZ and 50+ different files with xbr in the name. Which one do I use?


I thought we had already explained that xBRZ is a CPU implementation, not a shader one. It's unclear if it can be implemented as a shader. Though it may be possible, I don't think any shader based implementation of it exists today.
User avatar
kolano
Oldbie
 
Posts: 527
Joined: 2010-12-26 @ 21:03

Re: xBRZ - High quality image scaling support for DOSBox

Postby gulikoza » 2014-9-12 @ 15:50

So why does 2mg want a shader?
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: xBRZ - High quality image scaling support for DOSBox

Postby 2mg » 2014-9-12 @ 21:40

Because I know squat about coding, and that problem didn't even cross my mind :(

I also suspected that your shaders.zip used old implementations of xBR - which worried me performance-wise how much FPS are they eating away. And also, perhaps making some .cg vs .fx compatibility with DOSBox patch?

And the fact that xBRZ looks so fine, tried it on another emulator...

I contacted Zenju to check this thread again...

PS: Zenju also described how it would be possible to implement it on the 1st page I believe (again, I'm not a coder).

Tnx for replying so far!
2mg
Newbie
 
Posts: 33
Joined: 2014-3-21 @ 12:52

Re: xBRZ - High quality image scaling support for DOSBox

Postby truth_deleted » 2014-9-12 @ 21:58

I've (exclusively) used "5xbr-v3.7a.cg" in RetroArch and consider it one of the best, if the not best, 'shader' for producing a good image which is upscaled from much lower resolution. That would be a wonderful addition to your extensive list of available shaders.

I believe I had tried the xBRZ patch from this thread and it did show merely fair performance in SimCity2k, so I instead used the OpenGL-HQ patch to upscale the image.
truth_deleted
 

Re: xBRZ - High quality image scaling support for DOSBox

Postby gulikoza » 2014-9-13 @ 08:08

There you go :)

Not much testing has been done beyond a simple check if the shader displays something, so if somebody can doublecheck the results...
You do not have the required permissions to view the files attached to this post.
User avatar
gulikoza
Oldbie
 
Posts: 1705
Joined: 2004-6-25 @ 14:53

Re: xBRZ - High quality image scaling support for DOSBox

Postby 2mg » 2014-9-13 @ 10:23

Will try it when I get some time to load some games.

About xBRZ, we wait for Zenju, I suppose.
2mg
Newbie
 
Posts: 33
Joined: 2014-3-21 @ 12:52

Re: xBRZ - High quality image scaling support for DOSBox

Postby truth_deleted » 2014-9-13 @ 11:11

Thanks! The 5xbr shader produces very good results for SimCity2k. The performance is also very good. To run, I used Ykhwong's build (7/25/13) which includes your d3d patch and d3dx9_43.dll, added 5xbr-v3.7a.fx to a shaders/ directory, edited line in dosbox.conf so pixelshader=5xbr-v3.7a.fx forced, but also added the required Scaling.inc file to shaders/.
truth_deleted
 

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 1 guest