CHDK custom palette for analog video output - General Discussion and Assistance - CHDK Forum

CHDK custom palette for analog video output

  • 5 Replies
  • 5131 Views
*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
CHDK custom palette for analog video output
« on: 02 / October / 2016, 14:39:57 »
Advertisements
Some guys use the analog video output to control their flight camera systems.

Most of the CHDK colors are white in this video output mode and thus is the CHDK UI not readable, especially the script console.

Knows anybody a way to adjust the CHDK custom color palette for the analog video output mode? I found no specific value for that mode in active_palette_buffer, only the known values for the record or playback mode.

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14126
Re: CHDK custom palette for analog video output
« Reply #1 on: 02 / October / 2016, 15:05:20 »
Can you list some camera models that are affected?
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK custom palette for analog video output
« Reply #2 on: 02 / October / 2016, 15:22:52 »
The request was specifically for the S100. But the SX220 and SX240 show the same symptoms. My SX220 still shows the best results.

Here is a screenshot from the S100: http://forum.chdk-treff.de/viewtopic.php?f=7&t=3326&p=31252#p31234

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14126
Re: CHDK custom palette for analog video output
« Reply #3 on: 02 / October / 2016, 16:23:25 »
The request was specifically for the S100. But the SX220 and SX240 show the same symptoms. My SX220 still shows the best results.

Here is a screenshot from the S100: http://forum.chdk-treff.de/viewtopic.php?f=7&t=3326&p=31252#p31234
Thanks. All these cameras use custom palette.

It seems like a simple workaround is just to set custom OSD colors in the CHDK menu (OSD background and menu background) As long as you do this with video out enabled, what you see should be what you get. The colors might be bad when you aren't using video out of course. You should be able to use a set_config_value script to switch if it's a problem.

It would be interesting to see screenshots of the CHDK palette display with and without video out.

For a more complete solution...
It sounds like the actual location of the palette used by the camera changes, without affecting active_palette_buffer.

It should be possible to detect the video out present, e.g. in variables used by functions like GetVideoOutType or in physw_status. You might be able to find the location of the actual palette by searching memory for canon color values. If you can do this, you can put as special case in load_chdk_palette / vid_get_bitmap_active_palette

I guess another possibility might be that the interpretation of the palette changes. (e.g. 0x0090000 is no longer interpreted as transparent dark grey) but this seems less likely. You should be able to test this by changing the values used in load_chdk_palette.
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK custom palette for analog video output
« Reply #4 on: 02 / October / 2016, 17:10:39 »
The manually setting of the colors is also my solution. Using a script with set_config_value is a nice hint.

Attached are screenshots from the playback mode. It seems to be the same palette without the custom colors in the video output mode.

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14126
Re: CHDK custom palette for analog video output
« Reply #5 on: 02 / October / 2016, 17:52:15 »
Attached are screenshots from the playback mode. It seems to be the same palette without the custom colors in the video output mode.
Yeah, that certainly looks like the palette used by the camera is at a different location in video out.

I would guess it shouldn't be too hard to find, I'd probably start looking near the existing palette_buffer addresses and the canon code that refers to them.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal