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

New CHDK features

  • 34 Replies
  • 1360 Views
*

Offline reyalp

  • ******
  • 13500
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

  • *****
  • 687
  • 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

  • *****
  • 687
  • 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

  • *****
  • 687
  • 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.

 

Related Topics