New CHDK features - page 4 - CHDK Releases - CHDK Forum

New CHDK features

  • 38 Replies
  • 7720 Views
*

Offline reyalp

  • ******
  • 14082
Re: New CHDK features
« Reply #30 on: 21 / December / 2021, 13:35:31 »
Advertisements
So far I have used camera_screen.width for the waveform memory allocation instead of 360/3. Using vid_get_viewport_width_proper and vid_get_viewport_height_proper caused the system to crash in waveform_process and I don't know why.
camera_screen* refer to the UI bitmap display. The viewport_* stuff is the live view. So if you're analyzing a scene and drawing something like zebra, you should read the scene in viewport coordinates and write in bitmap coordinates. They often have a simple relationship in the most common case, but it's not fixed, even on a given camera. It can vary depending on shooting mode, digital zoom, video recording, video out and so on. The CHDK code does not necessarily account for all these variations in all cases, but at a minimum, efforts should be made not to write outside the buffers ;)

For the viewport, *_proper refer to the actual sizes (with width counted by Y values), while the non _proper are scaled (usually by 1/2) in some dimensions for some cameras.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: New CHDK features
« Reply #31 on: 24 / December / 2021, 10:28:43 »
 :xmas  :D

Now the waves are finally fine with aspect ratios 4:3 & 16:9 on 16:9 & 4:3 displays...
(Exceptions: propset3 & Digic>=6)
And *vid_get_viewport_yscale() is included to calcultation, otherwise only the upper/2 would be recognized in related circumstances...  ::)
...
Code: [Select]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:45:39: warning: 'panic' defined but not used [-Wunused-function]
   45 | static void __attribute__((noreturn)) panic(int cnt)
      |                                       ^~~~~
Edit :o Saved Wrong Editor Window ERROR, new histo*.c appended...  :)
Edit2: I´m still thinking about 16:9 & 3:2 on 16:9 display...
« Last Edit: 26 / December / 2021, 12:32:20 by Caefix »
All lifetime is a loan from eternity.

Re: New CHDK features
« Reply #32 on: 03 / January / 2022, 02:02:12 »
It seems to me that on my SX10IS waveform and vectorscope this code version is not working properly. I think I will have to analyze the dumps from the viewport active buffer and analyze it all in more detail. Generally, what the waveform and vectorscope shows should reflect the scene being photographed. For example, I tested on a color checker or specific R G B colors, including gradients.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: New CHDK features
« Reply #33 on: 03 / January / 2022, 09:44:45 »
In Playmode it depends on menusettings "Transition" {"Scroll","Slide","Off"},
"Scroll Display" on,off && often entering image from left or right, using buttons or wheel.
Is viewport really Euclidic geometry??  :-X

Good on 4:3 display, not 16:9 (Sx230) :( , different abacus?

Edit:  :-[ A little helper to compare two versions:
Code: [Select]
--[[--
@title HISTOswap
@subtitle :o..,....1....,....2....,....3....,....4..
--]]--

ori="histo.flt"

dir="A/CHDK/MODULES/"
tmp=dir.."#swap.tmp"
sav=dir.."!"..ori
ori=dir..ori

if (os.rename(sav,tmp)) then
print(os.rename(ori,sav))
print(os.rename(tmp,ori))
end
stat=os.stat(ori)
print(ori)
print('+'..stat.mtime)
stat=os.stat(sav)
print('-'..stat.mtime)
sleep(2000)
Adit: Improved research version for Sx230...  ;)
« Last Edit: 11 / January / 2022, 16:53:40 by Caefix »
All lifetime is a loan from eternity.


*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: New CHDK features
« Reply #34 on: 13 / January / 2022, 15:58:43 »
Finally happened again a version, fine on Sx220_100a, 230_101b & Ixus 870, 275, 300.  :xmas
Maybe dreaming #ifdef THUMB_FW lines tonight...   :haha

Edit: There´s still a (easy) todo between, the structure of /../include folder changed since 1.4:
 https://chdk.setepontos.com/index.php?topic=14469.msg147494#msg147494
« Last Edit: 13 / January / 2022, 16:36:56 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: New CHDK features
« Reply #35 on: 20 / January / 2022, 16:50:59 »
It seems fine upto Digic5 now,  :xmas

The Thumb Thing is strange, often working, switching between waves & histo mostly crashing, even in gui-menu crashing  >:( in Rec or shoot only... && ... :o
Never ending ghostings,  :-X Maybe the module is loaded too early?  :(

Edit: The crashes in gui-menu are gone with 2*//, commenting out waveform_free(); && histo_free(); ...  :blink:

Edit2: Improved (?):haha code, still some crashes, but some progress, too...
(Todos:) Aligning helper lines, over&underexposure, finetuning...
« Last Edit: 22 / January / 2022, 17:06:22 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: New CHDK features
« Reply #36 on: 24 / January / 2022, 16:35:47 »
Really happened after booting...  :o  :-X
All lifetime is a loan from eternity.

Re: New CHDK features
« Reply #37 on: 25 / January / 2022, 04:11:26 »
I have noticed that in the SX20IS not everything works as in the SX10IS. There are other CHDK colors. I had to define false colors on other values. In Av mode, false colors and possibly the zebra do not work the same and the exposure compensation is not taken into account. However, it is different in M mode. Perhaps the viewport active buffer is not the same as in the SX10IS or it is due to a different behavior of the camera. After pressing the exposure compensation button, it can be seen in the preview, e.g. -1 or -2EV and the preview is darker, while after pressing the Shoot button halfway, it returns as if there was no exposure compendation, but it is already taken into account in the photos.


*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: New CHDK features
« Reply #38 on: 25 / January / 2022, 16:46:57 »
Found memory again, back in race ...  ::)

There are other CHDK colors.
Difficult topic...  :-*

https://chdk.setepontos.com/index.php?topic=8314.msg87902#msg87902
« Last Edit: 29 / January / 2022, 16:14:39 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics