500d development - page 115 - DSLR Hack development - CHDK Forum  

500d development

  • 2487 Replies
  • 812797 Views
*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #1140 on: 18 / May / 2011, 19:46:42 »
Advertisements
You are welcome to submit a patch. You only need to find a few extra MB of memory (see reyalp's ExMem routines), or rewrite FIO_WriteFile to make it a few times faster, or pause the digic while saving a picture.

Re: 500d development
« Reply #1141 on: 18 / May / 2011, 20:18:52 »
Before we implement my idea, we need a stable HD version for SP.  The LV buffer is not so bad as it stands.  I propose we look for data to change at the end of the buffer.  Then read it.  It's a hack but it'll work.  Only a few lines of code.  Alternatively, and more simply, can you see when the buffer pointers change?  Maybe if you wait until the time is right?

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: 500d development
« Reply #1142 on: 18 / May / 2011, 20:57:52 »
well i found the buffer for 5x/10x zoom in LV and been testing it with 5x5 silent pics, I get a 4680x3120 pixel picture, that's ~14.6mp :) pretty good

i don't know if it's the 422-jpg.py script or something else but the pieces don't line up perfectly, i'll ask alex tomorrow but might be getting closer now! :)

buffer information from zebra.c inside get_yuv422_hd_vram() (in lv, haven't tried video yet):
Code: [Select]
_vram_info.vram = 0x46000080;
_vram_info.width = 944;
_vram_info.pitch = 1888;
_vram_info.height = 632;
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

Re: 500d development
« Reply #1143 on: 18 / May / 2011, 21:58:29 »
Let me know when you've fixed the HD SP.  I don't mean to rush you at all.  I know your time is limited.  But keep in mind that it's not even close as tested.  I'm happy with Lores for now!


*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: 500d development
« Reply #1144 on: 18 / May / 2011, 22:12:40 »
here's my silent pic i was talking about above:

http://farm4.static.flickr.com/3431/5735547840_3de3972aa8_o.jpg
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

Re: 500d development
« Reply #1145 on: 19 / May / 2011, 00:01:08 »
well i found the buffer for 5x/10x zoom in LV and been testing it with 5x5 silent pics, I get a 4680x3120 pixel picture, that's ~14.6mp :) pretty good

i don't know if it's the 422-jpg.py script or something else but the pieces don't line up perfectly, i'll ask alex tomorrow but might be getting closer now! :)

buffer information from zebra.c inside get_yuv422_hd_vram() (in lv, haven't tried video yet):
Code: [Select]
_vram_info.vram = 0x46000080;
_vram_info.width = 944;
_vram_info.pitch = 1888;
_vram_info.height = 632;
Hmm, I put those values in the Zebra.c, and I am guess I was suppose to bypass the other values temporarily, so I did that, and now MZ is garbled all the silent pictures are garbeled as well like how MZ gets, but at least theres something there, last time I tried the 5x5 and others, it came out white.
I went back and re-added the old values with these values just to see if it did anything, and MZ works now but 5x5 and all others are still garbeled.
« Last Edit: 19 / May / 2011, 00:17:55 by mk11174 »

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #1146 on: 19 / May / 2011, 02:36:16 »
I propose we look for data to change at the end of the buffer.  Then read it.  It's a hack but it'll work.

It will not work, you can't save the image fast enough on the card (and you will catch the next DMA cycle).

Re: 500d development
« Reply #1147 on: 19 / May / 2011, 04:22:33 »
Why don't make 24 silents pics for second? jajaja


*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: 500d development
« Reply #1148 on: 19 / May / 2011, 07:49:51 »
Sbright: you need to modify silent_pic_take_sweep() in shoot.c. im hoping this weekend ill have the time to sit down and figure out all of the buffers (now that memspy can see buffer dma pointers :) thnx alex). Just need some free time..
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

Re: 500d development
« Reply #1149 on: 19 / May / 2011, 10:11:14 »
Alex let's talk about this.  Good point above!  Some HD pics are without a line even with constant panning movement and a vertical bar as a subject.  Sometimes it's near the top or bottom.  The key is that there is only 0-1 line max.  So it is possible to save it fast enough.  It's just a matter of timing.  Some experimentation is needed.  Instead of varying the timing delay, we can vary which part of the image buffer to detect change in.  For example, if you look at the last line as a trigger, the camera DMA may catch up to the saving process.  Assuming it's faster.  So we might try using the first line as the trigger.  If the saving/reading process is slower it wont catch the DMA cycle while it's writing.  It'll stay behind it.  Understand?  Good theory?

Even if this works for HD, or any specific buffer size and rate, a different strategy may be needed for the LV buffer.  There may be a delay between scans or a different frame rate.  Certainly there is less memory to fill or save.  Maybe the opposite process is faster in this case.  Maybe the writing is faster but there's a pause between frames.  Maybe you are correct, if the attempted buffer size is too big there will be 2 or more lines.  Then we cannot save fast enough to stay in sync.  Only in this case would it be impossible.  5x5 for example.

I volunteer to do a simple experiment when it's time.  This has to be done for each mode and memory buffer.  They might not share the same result.  Pan to the left and see which half is shifted left, the top or the bottom.  This will prove which of the 2 processes, reading or writing, is faster.  One of you has probably already done this experiment?  I can't remember which way I was panning for a particular picture.

It would be much simpler if you could just look at the pointers to get the timing of the buffers.  Unfortunately this only tells you when each buffer is ready, not when it's started.  Or maybe it tells you when it's started.  Maybe we'll get lucky.  But it cannot do both, and no way will it tell us when it's 1/2 written.  Which may be needed.  I'll explain those details later.

Some of these ideas may help Hires 5x5 stay in sync across buffers?  Baby steps.

 

Related Topics