Enhanced decoding of YJK images

Pagina 3/5
1 | 2 | | 4 | 5

Van sd_snatcher

Prophet (3450)

afbeelding van sd_snatcher

10-11-2013, 19:54

Excellent initiative, hit9918! The results are very promising for a first version.

I'll try to take a better look at the code when I have some free time for doing MSX stuff.

PS: Do you know how to code in Python? It would be wonderful to have this as a Python-Fu plugin, to export the files directly from GIMP.

Van sd_snatcher

Prophet (3450)

afbeelding van sd_snatcher

10-11-2013, 20:29

For anyone wanting to test, I uploaded the original Gulliver image (scaled to MSX resolution) here:

Here's also the Gulliver image I converted using some YUV filtering and a bit of manual tweaking. It's interesting to compare with hit9918 algorithm. The YUV filtering is based in the algorithm used by mpeg and DVcam chroma subsampling.

Original Gulliver image, scaled to 256x212

YUV filtered:

hit9918's algorithm:

Note: After perfected, hit9918's algorithm has the potential to reach better results, because it calculates the color error for each 4 pixels set, while the YUV chroma subsampling are meant for realtime conversion.

Van hit9918

Prophet (2901)

afbeelding van hit9918

11-11-2013, 01:05

It is two things.
Sum up some more neighbour pixels rgb to smoothen the blocks color. Very easy once one got the idea.
The other thing is I get the Y in a "search and rate" style.

That one is using the fomula the vdp uses for yjk->rgb, while sliding the Y for 0 to 31, for making a comparison rgb versus rgb.
How to get at the Y was not described in the document you posted.
I did a direct way to calculate Y, but that is worse.
It is unclear whether it is worse because of loosing one bit precision every now and then,
because I didn't really know what I am doing with all the bitshifts.

I also had a whole different way, that did find the JK by "try all possibilities", with rgb vs rgb ratings.
Locking gigahertz cpu for a minute.
Given the ratings, this too removed some cases of jaggies. But at enormous cpu cost.

There seems to be different cases of jaggies. Some easy to attack, some harder.
The most catastrophic case I found: an object of MSX1 color 8 red on color 5 blue sky.
The two colors are of same brightness! Things end up with empty blank blocks of all the same Y, all shape is lost.

And in other cases photos go awesome without problem.

Van hit9918

Prophet (2901)

afbeelding van hit9918

13-11-2013, 06:27

I have removed the VDPs jaggies! With a hack with set adjust in BASIC Big smile

Problematic images much worse than the red hat go super without needing converter smear!
I cant believe what I am seeing.

get the demo at
http://sites.google.com/site/tueftlerlabs/home/downloads/screen12converter.zip

Van hit9918

Prophet (2901)

afbeelding van hit9918

13-11-2013, 08:28

maybe I should add.
the PC monitor must be same hz as the MSX.
e.g. PAL MSX on 100Hz PC screen, exactly double hz works, too.
and maybe the emulator still looses some frames, but thats not the fault of MSX.

On the real machine, I guess now some images look better on RGB than on composite.
But now that I think of it... within a rasterline, there is still that YJK limit that is similar to composite.
So, I would expect that with this method the TV makes above average output!

Van enribar

Paragon (1113)

afbeelding van enribar

08-11-2015, 01:27

Ok so... I was browsing a CD with some old Italian software made at early 90s.
At those days, I realized that SCREEN 12 images were far better than the last produced with recent algorithms!
(I don't have make comparisons with the hit9918 solution, so maybe it's better.)
They were made with Columbus utility. This utility claims that can display SCC photos with 54252 colours!

Van hit9918

Prophet (2901)

afbeelding van hit9918

08-11-2015, 03:39

try out the demo! maybe nobody has seen it? Back then I interpreted the silence as "problem finished"?
Now retrying it, some emulator filename mangeling made a showstopper.
So now I made a new release with folder "msxfiles". Still the above link.

I can't remember all the details.
There was a problem picture with jaggies.
And the analog TV would soften it, but on RGB monitor it is a problem.
And the demo shows a picture of the thread showing how analog TV does it.
And it shows the original picture for comparison.

And something is funny... because you look at all that on your MSX2+ Big smile

There is a converter in the other folder, try it out.

Van hit9918

Prophet (2901)

afbeelding van hit9918

08-11-2015, 03:41

Van enribar

Paragon (1113)

afbeelding van enribar

08-11-2015, 14:06

I write U in pvt

Van hit9918

Prophet (2901)

afbeelding van hit9918

08-11-2015, 18:35

@enribar,
I dont know all the file formats of the package you mailed.
Didn't you get my converter to run? It reads 24bit images like .png .jpg .
I got no feedback whether anyone has seen my demo.
Whether is clear what it does.

IT USES FLICKER AND HORIZONTAL SET ADJUST TO REMOVE JAGGIES.

This time the flicker is not about more colors.
Every second frame, set adjust is moved 2 pixels horizontal and the second image itself has the pic moved 2 pixels.
So, the screen stands still, but the jaggies zones are wiggeled horizontal forth and back 2 pixels.

Problem pixels get an unprecedenced second chance as they are in a different position versus the jaggies grid.

you could do this manualy with other converters.
take a 24bit image, shift it 2 pixels to the right, that is the second image.
then use the adjust flicker code of the autoexec.bas .
with the file extensions ".s12" and ".12s" I tried to express the different shift.

Pagina 3/5
1 | 2 | | 4 | 5