19 October 2016, 23:24 | #21 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
I tried my custom HAM6 converter on your source image. This is interlaced.
|
20 October 2016, 00:00 | #22 | |||
Registered User
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
|
Quote:
Quote:
Quote:
Thank you everyone for your valued input! |
|||
20 October 2016, 01:13 | #23 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,749
|
|
20 October 2016, 01:16 | #24 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
https://github.com/alpine9000/amiga_...tools/imagecon The algorithm is pretty simple, It does a brute force search of the starting palette, so takes a LONG time to do the conversion even on a really fast i7. |
20 October 2016, 01:55 | #25 | |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Quote:
In HAM8 mode every pixel can either select a base colour (in which case all eight bits per component of the base colour are used), or it can modify just the upper six bits of either the red, green or blue component. The lower two bits aren't touched, so they remain however the last base colour left them. What this means is that once you've set a base colour, you can modify the upper 6 bits of each gun and access 262,144 colours in total. To access the colours in between you need to change the lowest two bits of each component, and you can only do that by selecting a different base colour. If you set the lower 2 bits of each component uniquely for all 64 colours in the base palette, it's possible for HAM8 mode to access any of the AGA chipset's 16,777,216 colours - but in practice this isn't particularly useful. |
|
20 October 2016, 04:05 | #26 |
m68k all the way
Join Date: Aug 2011
Location: Koalaland
Posts: 523
|
EHB = a poor man's HAM
|
20 October 2016, 06:41 | #27 |
Registered User
Join Date: May 2010
Location: Helsinki, Finland
Posts: 1,341
|
Also consider that a 640x512 image has less than 330 thousand pixels; even if each individual pixel in the image had a different colour you wouldn't come close to using all 16 million. Any real world photo is likely to display just fine with far less, as long as they are appropriately chosen.
|
20 October 2016, 08:21 | #28 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,749
|
Quote:
Although 262144 is technically not entirely accurate, it's the number that's most relevant. |
|
20 October 2016, 08:27 | #29 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
|
20 October 2016, 11:02 | #30 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,749
|
Aga can output more than 30khz.
Interlace flicker depends on the update frequency and phosphor layer of the CRT monitor. |
20 October 2016, 11:40 | #31 |
Registered User
Join Date: Sep 2011
Location: Paris/France
Posts: 274
|
Hello
>262144 [...] the number that's most relevant. In fact there is 256 values possibles for each R, G or B channels (any value from 0 to 255) Lets see HAM8: Among them 64 can be obtained when "M"odifying an pixel (like 0 4 8 12 16 etc...) But also the palette can be defined to use 64 other values (like 1 2 3 5 6 7 9 etc...) those can be obtained when "H"olding a pixel to the palette So the total is 64+64 values values possibles for each R, G or B channels So 128*128*128 = 2097152 = 2 mega pixels not 16 as often said... Alain Thellier |
20 October 2016, 11:55 | #32 |
Registered User
Join Date: Feb 2008
Location: Northampton/UK
Posts: 524
|
But you can change the base palette per line, so both HAM modes can achieve more than that. In fact, if you screen drag one HAM picture down to reveal another in workbench, that's exactly what you are doing.
|
20 October 2016, 13:53 | #33 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,749
|
Quote:
A HAM pixel can do any of the four following things: 1. Be set to a palette color. 2. Take on the color of the pixel to the left, and set the red component. 3. Take on the color of the pixel to the left, and set the green component. 4. Take on the color of the pixel to the left, and set the blue component. For the first pixel type this means 4 bits per channel in HAM6, and 8 bits per channel in HAM8. For pixel types 2, 3 and 4 you can set 4 bits of the changing component in HAM6, and 6 bits in HAM6. Since most pixels in a HAM image are usually of types 2, 3 and 4, most of the pixels are usually 6 bits per channel in HAM8. A big factor here is the fact that there are only 64 palette colors in HAM8, making it hard to use the extra bits you can get from the palette, hence the number 262144 being the most relevant. When you start using palette slicing in HAM8 and use the right conversion algorithm, it may be possible to make better use of the palette color's 8 bit channels. So basically HAM8 pixels can have 8 bit components, but they usually become 6 bits rather quickly. |
|
20 October 2016, 19:49 | #34 |
Registered User
Join Date: Sep 2011
Location: Paris/France
Posts: 274
|
@Thorham
I reread your post and I dont see exactly what you wanted to add to my post: Types 2,3,4 allow to adjust 64 values and the 64 palette colors (if well defined like greys with only "other" values) allow to set (type1) 64 other values So: " the total is 64+64 values values possibles for each R, G or B channels So 128*128*128 = 2097152 = 2 mega pixels" @khph_re I agree ... Alain Thellier |
20 October 2016, 20:07 | #35 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
So going with your approach it will be like 2+2+2=6 bits and 6+6+6=18 ; 6+18 =24. |
|
21 October 2016, 05:36 | #36 |
Registered User
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
|
I found this, which looks to be a good reference: http://shanson.com/spencer/Amiga-AA-Chipset.pdf
|
21 October 2016, 09:48 | #37 |
Registered User
Join Date: Sep 2011
Location: Paris/France
Posts: 274
|
Hello
@pandy71 >Isn't better to define problem that 2 LSB are from CLUT No because you can access only 64 colors from the palette in Ham8 so you cant recover ALL the possibles values from 0 to 255 but only 64 ones >2+2+2=6 bits and 6+6+6=18 ; 6+18 =24. This formula would let suppose that if it have been load a color palette (so with a 8 bits precision) in a pixel then you can modify in the next pixel ONLY the 6 MSB bits for (say) the red channel: but this is not the case because it REPLACE the (say) red channel so you lose the 2 LSB bits Alain |
21 October 2016, 09:58 | #38 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
I think the maximum number of theoretical colours you can display in HAM is a moot point.
Because of the "rules" of ham for any given pixel you are selecting the best colour from a relatively small number of colour options. So unless you construct an image that perfectly matches the ham constrainsts you will never get anywhere near that maximum number of colours. Am I missing the point of this discussion? |
21 October 2016, 11:02 | #39 | ||
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,741
|
Quote:
Quote:
So all this discussion is purely academic (display HW probably can be bend in clever way to have 4096 pixels in line and for sure you may have 4096 lines but RAM will be main limitation as we have only 2MB CHIP not 24MB). Last edited by pandy71; 21 October 2016 at 11:07. |
||
21 October 2016, 11:20 | #40 |
Registered User
Join Date: Jan 2015
Location: Melbourne, Australia
Posts: 548
|
Well this has been very interesting, thank you everyone! I appreciate all the input. That's a good point about RAM usage, can anyone let us know what the ram usage for a 320x200 ham8 screen? I'm not entirely sure how to calculate it to be honest, is it an 8-bitplane screenmode?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HAM6 on AGA in WinUAE displays incorrectly | Photon | support.WinUAE | 12 | 29 March 2016 08:44 |
Converting JPG to HAM6/EHB with ImageStudio | jman | support.Apps | 0 | 21 June 2011 17:42 |
Demonstration and Interview with Jan Derogee | trackah123 | Amiga scene | 2 | 22 February 2009 13:19 |
Multiple HAM8 pictures? | killergorilla | support.Other | 4 | 15 February 2007 14:41 |
First public demonstration of Dragon(Elbox) | ppill | News | 15 | 09 December 2006 23:29 |
|
|