It is currently Wed Dec 13, 2017 6:03 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Thu Jan 05, 2017 11:36 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
Are you stuck with 8-bit data in your Scanline buffer? That's going to be a problem, especially since the NES itself has 512 colors.
Normally I'd expect 32-bit ARGB (b byte, g byte, r byte, a byte) in a scanline buffer.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Thu Jan 05, 2017 12:30 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
8bit where? Creating a problem from another problem? All the colors use RGB (24bits here) without problems!


Top
 Profile  
 
PostPosted: Thu Jan 05, 2017 12:35 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
never mind, misunderstood this line:
unsigned int *tl=&tbuffer[256]; /* scanline buffer, 256 pixels */

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Fri Jan 06, 2017 12:00 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Well, I added square aspect to the 3x, 4x and 4.5x upscalers. For 3x and 4.5x I had to place a counter at every N repeated pixels - if counter == N, the pixel is NOT repeated, in order to fix the generated image length.

It was a nice exercise. :roll:


Top
 Profile  
 
PostPosted: Thu Jan 12, 2017 3:30 am 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 260
Location: Russia
rainwarrior wrote:
In the general case for resizing pixel art while changing the pixel aspect ratio, my best suggestion is to use nearest-neighbour to resize to the nearest integer-multiple size, then use a bilinear filter to resize to the final target resolution. In this case:

1. Nearest Neighbour: 256 x 240 >> 768 x 720
2. Linear Filter: 768 x 720 >> 876 x 720

Agree.
Here is attach comparsion with RockNES 5.30b:
Nearest Neighbour: 256 x 240 >> 512 x 480
and then 512 x 480 interpolated with linear filter to 2x/3x/4x + NTSC aspect ratio.


Attachments:
interp.rar [145.17 KiB]
Downloaded 33 times
Top
 Profile  
 
PostPosted: Thu Jan 12, 2017 1:10 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
tokumaru showed me the resizing problem (original->interpolation->3x), so I did original->3x->interpolation, OK, thanks a lot!
However, you're still pointing the image distortion due to the nearest neighbor method used, as you did in the past. :shock: :cry:

In short words, I'm upset... but I did my best. Currently, there's more criticism than help with code improvements. The code is there and no, I'm no more google-ing image upscaling/filtering stuff. There's already a bunch of 2x, 3x, 4x, Nx filtering codes available and open source, but requires the project to be open source too, even NTSC-like effect is available (although the glowing effect isn't present). Plus, I wouldn't like to add 3rd-party sources in my project.
retreating...


Last edited by Zepper on Thu Jan 12, 2017 1:55 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Jan 12, 2017 1:34 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
I'm not sure if you actually read my suggestions or not.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group