Custom Colors : standardizing a semi-transparent grey - page 8 - General Discussion and Assistance - CHDK Forum  

Custom Colors : standardizing a semi-transparent grey

  • 106 Replies
  • 33595 Views
*

Offline nafraf

  • *****
  • 1308
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #70 on: 28 / October / 2014, 01:37:13 »
Advertisements
I tried to make screenshots with chdkptp to show up my color differences.
But first of all in the canon menu the colors on the screenshot are totally different. :(
Can I change this?
Please test this patch.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #71 on: 29 / October / 2014, 00:01:12 »
Another suggestion for palette cleanup.

Attached patch moves all the camera specific color definitions out of core/gui_draw.h into a new file for each camera (platform_palette.h). It also removes the CAM_BITMAP_PALETTE definition.

Seems to work ok on my cameras; but needs more testing before committing to SVN.

This allows each camera to be tuned without affecting any others, or adding lots of #ifdefs to gui_draw.h.
The downside is duplication of values into each of the new files, instead of one definition in gui_draw.h.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #72 on: 29 / October / 2014, 10:48:36 »
Good idea. Works for my A720 and SX220. The color test produces the same results like the recent trunk version.

msl
CHDK-DE:  CHDK-DE links

Re: Custom Colors : standardizing a semi-transparent grey
« Reply #73 on: 29 / October / 2014, 17:13:00 »
I tried to make screenshots with chdkptp to show up my color differences.
But first of all in the canon menu the colors on the screenshot are totally different. :(
Can I change this?
Please test this patch.

Thank you,

much better now for the canon menues.

But in the colour test area are still discrepancies.
I will post pictures the next days.
IXUS 970 IS 100b


Re: Custom Colors : standardizing a semi-transparent grey
« Reply #74 on: 29 / October / 2014, 19:27:22 »
Seems to work ok on my cameras; but needs more testing before committing to SVN.
Tested okay on :
  • A560
  • A1200
  • IXUS120_SD940
  • G10
  • Powershot N
  • SX50HS
  • S100
using CHDK Color Test in both shooting and playback modes.

Quote
This allows each camera to be tuned without affecting any others, or adding lots of #ifdefs to gui_draw.h.
The "blues" are bad (i.e. non-existent) on the A560 even though there are blues in the palette.  But they were that way before the patch so when this gets committed to the autobuild I'll tweak the platform_palette.h file and submit a patch.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #75 on: 29 / October / 2014, 20:04:14 »
Also OK on ixus65_sd630 and ixus870_sd880.

There's one issue with the recently added numeric raw color display for the palette viewer: it's only meaningful on cameras with 256-entry palette. The vid_get_palette_type() and vid_get_palette_size() functions could be used to decide whether (or how) to display the currently selected color, but those are not currently exported.

A potential improvement (for non-custom-palette ports) would be to use colors according to the current operating mode (play/rec), but this would probably require a lot of editing work and easily cause regressions...

Re: Custom Colors : standardizing a semi-transparent grey
« Reply #76 on: 29 / October / 2014, 20:20:30 »
There's one issue with the recently added numeric raw color display for the palette viewer: it's only meaningful on cameras with 256-entry palette. The vid_get_palette_type() and vid_get_palette_size() functions could be used to decide whether (or how) to display the currently selected color, but those are not currently exported.
Is the check to see if vid_get_bitmap_active_palette() returns 0 not sufficient?  Worked okay for my only VxWorks camera.

Quote
A potential improvement (for non-custom-palette ports) would be to use colors according to the current operating mode (play/rec), but this would probably require a lot of editing work and easily cause regressions...
Would you need to edit every color reference in every file?  Or could you just change the #defines now in platform_palette.h from constants to something that references elements of one of two arrays depending on the shooting / playback mode?

Code: [Select]
#define COLOR_RED  0x56to
Code: [Select]
unsigned char *  palette_ptr ;
#define COLOR_RED  palette_ptr[0x56]
Of course the trick is resetting palette_ptr from something like spytask to the current palette each time the Canon mode changes. 

« Last Edit: 29 / October / 2014, 22:07:35 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #77 on: 29 / October / 2014, 23:42:20 »
A potential improvement (for non-custom-palette ports) would be to use colors according to the current operating mode (play/rec), but this would probably require a lot of editing work and easily cause regressions...

This was something I played with a while ago; but put on the back-burner due to the complexity.

My original idea was to convert the 'color' data type in CHDK to a 16 bit value rather than an 8 bit value.
Values >= 256 would be CHDK colors, while values < 256 would be Canon colors.
CHDK colors would be translated to Canon colors as needed - taking into account mode, etc.

There would be some performance hit; but this could be reduced with a bit of rework of the gui_draw.c code (I think).

Also has an impact on the color values stored in the config files; would need a new config file version, and a code to load/convert the old files.

Perhaps something for 1.4 :)

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline reyalp

  • ******
  • 14082
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #78 on: 30 / October / 2014, 00:05:05 »
This allows each camera to be tuned without affecting any others, or adding lots of #ifdefs to gui_draw.h.
The downside is duplication of values into each of the new files, instead of one definition in gui_draw.h.
This seems like the right direction and work on my cams.

The duplication isn't ideal, but having cameras use the "same" palette with different colors isn't better.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #79 on: 30 / October / 2014, 04:12:43 »
Small update to previous patch.

Moves the CHDK_COLOR_BASE and COLOR_GREY_DK_TRANS values from the platform_camera.h files to the platform_palette.h files.

If there are no issues, I'll add this to SVN over the weekend.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics