Author Topic: Full-resolution silent pictures (silent.mo)  (Read 526283 times)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
  • 5D Mark Free
Re: Full-resolution silent pictures (silent.mo)
« Reply #1025 on: May 26, 2018, 07:30:47 PM »
In this case, it's probably not the file name, but the image catalog. When taking a picture, Canon code not only saves the image to card, but also adds it to this catalog (some sort of index stored in the RAM). How exactly this catalog works, in particular how to add files to it, is not yet understood.

If you restart the camera, do the files appear on the remote computer?

The renaming trick is known to work on Eye-Fi cards, btw. Some cards other than Eye-Fi may be able to transfer arbitrary files out of the box.

mash.m

  • New to the forum
  • *
  • Posts: 9
Re: Full-resolution silent pictures (silent.mo)
« Reply #1026 on: May 26, 2018, 10:09:01 PM »
Hi,

an hour ago i had the same idea About the WiFi Card (before i read your post). in Germany we say "zwei dumme, ein gedanke" - "two stupid, one thought"

i will try a toshiba WiFi sd Card. hope this will work.

the silent files do not appear after restart the camera.

thx again!

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
  • 5D Mark Free
Re: Full-resolution silent pictures (silent.mo)
« Reply #1027 on: May 26, 2018, 10:40:24 PM »
That will work. Make sure you get the W-04 version; reviews say it's much faster than W-03.

OlRivrRat

  • Senior
  • ****
  • Posts: 410
Re: Full-resolution silent pictures (silent.mo)
« Reply #1028 on: May 29, 2018, 02:37:54 AM »
      @ All Who Refer to Stills Mode as Photo Mode

"Photo mode refers to "normal" stills camera operation" > But Probably Really Shouldn't !

   No idea Whom, When, Why "Photos Mode" started being used to refer to "Stills Mode".

Since Everything our cameras do Visually is Photo Capturing, Our Cam's are in "Photos Mode"

whenever they are "On". Since those Photos can be Captured as Still Photos or Moving Photos,

the 2 Main Photo Capture Modes should be referred to as Stills & Movies.

   Which is actually the way Canon does it in their Manuals .

                     ORR ~ DeanB

Sorry Walter > Not trying to pick on You here, You just happened to be the 1 who

Poked My Button on this when I had time to do a Post I've been wanting to do for

quite some time ~
ORR~DeanB  ~~  80D-ML  &  SL1+ML  &  5D2+ML  &  5DC+ML  &  70D+ML.111B(DEAD)

togg

  • Senior
  • ****
  • Posts: 335
Re: Full-resolution silent pictures (silent.mo)
« Reply #1029 on: May 30, 2018, 01:00:48 AM »
Small question, I've tried silent pictures after a long time, just to be sure I've got it right. Full res is still limited to 1/10 right? I tested it and it looks like it.

Dmytro_ua

  • New to the forum
  • *
  • Posts: 43
Re: Full-resolution silent pictures (silent.mo)
« Reply #1030 on: June 05, 2018, 07:24:15 PM »
Hi,
Is FRSP should give the same color and exposure results as in a regular Photo mode with cr2?
I tried the same setting and opened pics in ACR (sorry for poor quality).

With 0,3", f16, iso 320 - FRSP captures picture twice longer (about 600 ms) = 0,6".

My camera is 5d3 with expo override enabled. Should I change some settings to match closer?





Thanks

ghostmanno

  • New to the forum
  • *
  • Posts: 6
Re: Full-resolution silent pictures (silent.mo)
« Reply #1031 on: July 03, 2018, 09:16:31 AM »
Hi,

an hour ago i had the same idea About the WiFi Card (before i read your post). in Germany we say "zwei dumme, ein gedanke" - "two stupid, one thought"

i will try a toshiba WiFi sd Card. hope this will work.

the silent files do not appear after restart the camera.

thx again!

Hi mash.m

Where you able to transfer file from your camera to the PC using FRSP? I stumbled upon the same scenario, trying to use a EOS 50D to digitize Super 8 and a 400 Ft reel is about 28800 images so using the shutter will kill the camera.
I hex edited the silent.mo and changed dng to CR2 extention and all files are saved as CR2 file but nothing shows up. In ML they are visible but not in EOS menu/software on the camera so same thing happens in gphoto2 so this is as a1lex say most probably the image catalog on the memory that is not updated.

If anyone got the WFT-E3A, I am wondering if the WFT-E3A would work with FRSP, dose the EOS write directly to a usb attached disk or does it write to the memory card first and then copy to the external media. with 28800 images on 400Ft reel a CF card or SD card would be to small we are talking 100's of GB before post processing :-)

regards,
GM   

domasa

  • Freshman
  • **
  • Posts: 78
Re: Full-resolution silent pictures (silent.mo)
« Reply #1032 on: July 13, 2018, 10:47:00 PM »
It will be possible allow take photo during recording MLV-lite without affect to recording output?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11718
  • 5D Mark Free
Re: Full-resolution silent pictures (silent.mo)
« Reply #1033 on: July 14, 2018, 11:28:39 PM »
Yes, as long as photo resolution is not (much) higher than video resolution.

Changing LiveView resolution on the fly might be possible; I had some half-successful attempts at that; however, capturing a full-res image takes time, so the video stream would be interrupted (you will lose a few frames, depending on how fast the resolution can be switched; rolling shutter time for a full-res image is about 130ms on 5D3).

One way to approximate full-res capture without interrupting the video stream would be to shift the "phase" in the 3x3 pixel binning (the initial row and column of each 3x3 pixel group). That might be doable from ADTG and/or CMOS registers. If you have the patience to adjust these in adtg_gui and notice sub-pixel image movements, or maybe write a script to automate that process, you may find that register (assuming it exists). If you can also find a way disable the column binning, i.e. read out one single pixel out of 3 horizontal ones, on cameras other than 5D3 you would need 9 video frames to "assemble" one full-res image. Of course, that would only work for static scenes.

Without a way to disable the line/column binning, even if you can shift the initial line/column, recovering a full-res image is going to be difficult. Some deconvolution or super-resolution techniques might help, in particular if the scene is not exactly static when you take the picture.

Difficulty: give me 5 years and a team of researchers ;)

aprofiti

  • Freshman
  • **
  • Posts: 96
Re: Full-resolution silent pictures (silent.mo)
« Reply #1034 on: August 25, 2018, 01:19:49 PM »
I was interested in long exposure fix some time ago, but wasn't able to understand how to work on this module and dig manually into commit's history to make Greg code works on update codebase.

So I remembered about this and managed to update FRSP Bulb code with latest changes in ML repository.

Here is the diff for unified branch (test also in lua-fix, not tested on top of crop_rec_4k)
Code: [Select]
# HG changeset patch
# User Alessandro Profiti <[email protected]>
# Date 1535128403 -7200
#      Fri Aug 24 18:33:23 2018 +0200
# Branch frsp_bulb
# Node ID 77ea846906c328eaf10c71a0050f8cf6ea2b7780
# Parent  7a3b5fa3f4c6f085e5bb9d58ab4da0002c01e4a3
silent.c: Add FRSP support to longer exposure up to 15 minutes. Credits to Greg for original code and dmilligan for gist: https://gist.github.com/davidmilligan/6b8f78383a1e11cbecc620874e129cbb

diff --git a/modules/silent/silent.c b/modules/silent/silent.c
--- a/modules/silent/silent.c
+++ b/modules/silent/silent.c
@@ -17,6 +17,7 @@
 #include <powersave.h>
 #include "../lv_rec/lv_rec.h"
 #include "../mlv_rec/mlv.h"
+#include <cache_hacks.h>
 
 static uint64_t ret_0_long() { return 0; }
 
@@ -69,6 +70,8 @@
 static int mlv_file_frame_number = 0;
 
 static int long_exposure_fix_enabled = 0;
+static uint32_t bulb_end_addr = 0;
+static uint32_t capture_err_time_addr = 0;
 
 /* forward reference */
 static struct menu_entry silent_menu[];
@@ -1153,6 +1156,11 @@
     }
 }
 
+static void bulb_stop()
+{
+    MEM(bulb_end_addr) = 1;
+}
+
 static int
 silent_pic_take_fullres(int interactive)
 {
@@ -1224,6 +1232,19 @@
      * and creates a "job" object (CreateSkeltonJob)
      */
     struct JobClass * job = (void*) call("FA_CreateTestImage");
+
+    unsigned shutter_old = lens_info.raw_shutter;
+    if (shutter_old == SHUTTER_BULB)
+    {
+        int bulb_time = menu_get_value_from_script("Bulb Timer", "Exposure duration");
+   
+        if(bulb_time > 900) //15 minutes limit
+        {
+            bulb_time = 0;
+        }
+       
+        delayed_call(bulb_time * 1000, bulb_stop, 0);
+    }
     
     lens_info.job_state = 1;
     info_led_on();
@@ -1520,6 +1541,23 @@
         silent_pic_take(1);
     }
     
+    /* some cameras (5D2) reset the cache fake after FRSP, we need it again */
+    if (bulb_end_addr && capture_err_time_addr)
+    {
+        if ((*(uint32_t*)capture_err_time_addr) != 960000)
+        {
+            cache_fake(capture_err_time_addr, 960000, TYPE_DCACHE);
+        }
+    }
+   
+    if (!bulb_end_addr && capture_err_time_addr)
+    {
+        if ((*(uint32_t*)capture_err_time_addr) != 35000)
+        {
+            cache_fake(capture_err_time_addr, 35000, TYPE_DCACHE);
+        }
+    }
+   
     return 0;
 }
 
@@ -1608,6 +1646,36 @@
         long_exposure_fix_enabled = 1;
     }
 
+    if (is_camera("500D", "1.1.1"))
+    {
+        bulb_end_addr = 0x3324;
+        capture_err_time_addr = 0xff08afb8;
+    }
+    /*if (is_camera("550D", "1.0.9"))
+    {
+        bulb_end_addr = 0x31D8; // not tested please confirm
+        capture_err_time_addr = 0xFF090174; // not tested please confirm
+    }*/
+    if (is_camera("5D2",  "2.1.2"))
+    {
+        //bulb_end_addr = 0x3174; // cameras with SHOOTMODE_BULB not support FRSP bulb
+        capture_err_time_addr = 0xFF88DB68;
+    }
+   
+    if (!bulb_end_addr && capture_err_time_addr)
+    {
+        SLOWEST_SHUTTER = SHUTTER_30s;
+        cache_lock();
+        cache_fake(capture_err_time_addr, 35000, TYPE_DCACHE); // 30 + 5 seconds
+    }
+   
+    if (bulb_end_addr && capture_err_time_addr)
+    {
+        SLOWEST_SHUTTER = SHUTTER_BULB;
+        cache_lock();
+        cache_fake(capture_err_time_addr, 960000, TYPE_DCACHE); // 15 + 1 minutes
+    }
+
     menu_add("Shoot", silent_menu, COUNT(silent_menu));
     return 0;
 }
# HG changeset patch
# User Alessandro Profiti <[email protected]>
# Date 1535191697 -7200
#      Sat Aug 25 12:08:17 2018 +0200
# Branch frsp_bulb
# Node ID bb91393123dd016c4497a12379b7041d4b4b5a73
# Parent  77ea846906c328eaf10c71a0050f8cf6ea2b7780
silen.c: Add FRSP support for dedicated BULB mode (SHOOTMODE_BULB). Credit milank https://bitbucket.org/milank/ml-frsp-long-expo/branch/BULB%20dial%20test#diff

diff --git a/modules/silent/silent.c b/modules/silent/silent.c
--- a/modules/silent/silent.c
+++ b/modules/silent/silent.c
@@ -72,6 +72,7 @@
 static int long_exposure_fix_enabled = 0;
 static uint32_t bulb_end_addr = 0;
 static uint32_t capture_err_time_addr = 0;
+static uint16_t frsp_tv_addr = 0;
 
 /* forward reference */
 static struct menu_entry silent_menu[];
@@ -147,9 +148,9 @@
         MENU_APPEND_VALUE(", DNG");
     }
     
-    if (silent_pic_mode == SILENT_PIC_MODE_FULLRES && (shooting_mode != SHOOTMODE_M || is_movie_mode()))
+    if (silent_pic_mode == SILENT_PIC_MODE_FULLRES && ((shooting_mode != SHOOTMODE_M && shooting_mode != SHOOTMODE_BULB) || is_movie_mode()))
     {
-        MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "Full-res pictures only work in Manual (M) photo mode.");
+        MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "Full-res pictures only work in Manual (M) or Bulb (B) photo mode.");
     }
     
     silent_pic_check_mlv(entry, info);
@@ -1156,6 +1157,7 @@
     }
 }
 
+/* scsBulbEnd - it will stop Bulb exposure */
 static void bulb_stop()
 {
     MEM(bulb_end_addr) = 1;
@@ -1177,10 +1179,10 @@
     
     char* error_msg = 0;
 
-    if (shooting_mode != SHOOTMODE_M)
+    if (shooting_mode != SHOOTMODE_M && shooting_mode != SHOOTMODE_BULB)
     {
-        error_msg = "Manual (M) mode is required.";
-        goto err;
+       error_msg = "Manual (M) or Bulb (B) mode is required.";
+       goto err;
     }
 
     if (prop_iso == 0 || prop_shutter == 0)
@@ -1218,6 +1220,18 @@
         goto err;
     }
     
+    int bulb_time = menu_get_value_from_script("Bulb Timer", "Exposure duration");
+   
+    /* Maximum Bulb time with FRSP (I think we don't need more than 15 minutes) */
+    if (prop_shutter == SHUTTER_BULB || (shooting_mode == SHOOTMODE_BULB && frsp_tv_addr))
+    {
+        if(bulb_time > 900) //15 minutes limit
+        {
+            error_msg = "FRSP Bulb - 15 minutes limit.";
+            goto err;
+        }
+    }
+   
     display_off();
 
     /* we'll need these later */
@@ -1231,16 +1245,36 @@
      * reads PROP_ISO, PROP_SHUTTER and PROP_APERTURE,
      * and creates a "job" object (CreateSkeltonJob)
      */
-    struct JobClass * job = (void*) call("FA_CreateTestImage");
+    void* job = (void*) call("FA_CreateTestImage");
 
-    unsigned shutter_old = lens_info.raw_shutter;
-    if (shutter_old == SHUTTER_BULB)
+    if (prop_shutter == SHUTTER_BULB || (shooting_mode == SHOOTMODE_BULB && frsp_tv_addr))
     {
-        int bulb_time = menu_get_value_from_script("Bulb Timer", "Exposure duration");
-   
-        if(bulb_time > 900) //15 minutes limit
+        /* some cameras reset the cache fake after FRSP, we need it again */
+        if (bulb_end_addr && capture_err_time_addr)
         {
-            bulb_time = 0;
+            if ((*(uint32_t*)capture_err_time_addr) != 960000)
+            {
+                cache_fake(capture_err_time_addr, 960000, TYPE_DCACHE);
+            }
+        }
+       
+        /* cameras with SHOOTMODE_BULB need fake SHUTTER_BULB */
+        if (shooting_mode == SHOOTMODE_BULB && frsp_tv_addr)
+        {
+          printf("job: %x\n", job);
+          printf("prop_shutter: 0x%x\n", prop_shutter);
+
+          for (int i = 0; i < 1000; i++)
+          {
+               if(prop_shutter == *(uint8_t*)(job + i))
+               {
+                    printf("FA_CreateTestImage Tv Addr : 0x%x\n", i);
+               }
+          }
+
+          ASSERT(*(uint8_t*)(job + frsp_tv_addr) == prop_shutter);
+          *(uint8_t*)(job + frsp_tv_addr) = SHUTTER_BULB;
+          //*(uint8_t*)(job + frsp_tv_addr + 2) = SHUTTER_BULB;
         }
         
         delayed_call(bulb_time * 1000, bulb_stop, 0);
@@ -1464,9 +1498,9 @@
     if (!silent_pic_enabled)
         return 0;
 
-    /* fullres silent pics only work in M mode,
+    /* fullres silent pics only work in M or B mode,
      * and they may screw up things if triggered while recording. */
-    if (silent_pic_mode == SILENT_PIC_MODE_FULLRES && (shooting_mode != SHOOTMODE_M || is_movie_mode()))
+    if (silent_pic_mode == SILENT_PIC_MODE_FULLRES && ((shooting_mode != SHOOTMODE_M && shooting_mode != SHOOTMODE_BULB) || is_movie_mode()))
         return 0;
 
     static int silent_pic_countdown;
@@ -1541,23 +1575,6 @@
         silent_pic_take(1);
     }
     
-    /* some cameras (5D2) reset the cache fake after FRSP, we need it again */
-    if (bulb_end_addr && capture_err_time_addr)
-    {
-        if ((*(uint32_t*)capture_err_time_addr) != 960000)
-        {
-            cache_fake(capture_err_time_addr, 960000, TYPE_DCACHE);
-        }
-    }
-   
-    if (!bulb_end_addr && capture_err_time_addr)
-    {
-        if ((*(uint32_t*)capture_err_time_addr) != 35000)
-        {
-            cache_fake(capture_err_time_addr, 35000, TYPE_DCACHE);
-        }
-    }
-   
     return 0;
 }
 
@@ -1649,26 +1666,35 @@
     if (is_camera("500D", "1.1.1"))
     {
         bulb_end_addr = 0x3324;
-        capture_err_time_addr = 0xff08afb8;
+        capture_err_time_addr = 0xFF08AFB8;
     }
     /*if (is_camera("550D", "1.0.9"))
     {
         bulb_end_addr = 0x31D8; // not tested please confirm
         capture_err_time_addr = 0xFF090174; // not tested please confirm
     }*/
+    if (is_camera("50D",  "1.0.9"))
+    {
+        bulb_end_addr = 0x3218;
+        capture_err_time_addr = 0xFF885B14;
+    }
     if (is_camera("5D2",  "2.1.2"))
     {
-        //bulb_end_addr = 0x3174; // cameras with SHOOTMODE_BULB not support FRSP bulb
+        bulb_end_addr = 0x3174;
         capture_err_time_addr = 0xFF88DB68;
+        frsp_tv_addr = 0x64; // cameras with SHOOTMODE_BULB need fake SHUTTER_BULB
     }
     
-    if (!bulb_end_addr && capture_err_time_addr)
+    if (is_camera("5D3",  "1.1.3"))
     {
-        SLOWEST_SHUTTER = SHUTTER_30s;
-        cache_lock();
-        cache_fake(capture_err_time_addr, 35000, TYPE_DCACHE); // 30 + 5 seconds
-    }
-   
+        bulb_end_addr = 0x25294;
+        capture_err_time_addr = 0xFF1BF358;
+        frsp_tv_addr = 0x280; // cameras with SHOOTMODE_BULB need fake SHUTTER_BULB
+     }
+
+
+    /* cache fake "ERROR Take Semaphore" time in "FA_CaptureTestImage" */
+    /* 20 seconds to (15 + 1) minutes */
     if (bulb_end_addr && capture_err_time_addr)
     {
         SLOWEST_SHUTTER = SHUTTER_BULB;
# HG changeset patch
# User Alessandro Profiti <[email protected]>
# Date 1535191978 -7200
#      Sat Aug 25 12:12:58 2018 +0200
# Branch frsp_bulb
# Node ID 50d24ac04eea9e6bda683c249791bf6c87fa9f65
# Parent  bb91393123dd016c4497a12379b7041d4b4b5a73
silent.c: Add FRSP Bulb support to 700D, 550D and EOS M

diff --git a/modules/silent/silent.c b/modules/silent/silent.c
--- a/modules/silent/silent.c
+++ b/modules/silent/silent.c
@@ -1668,11 +1668,11 @@
         bulb_end_addr = 0x3324;
         capture_err_time_addr = 0xFF08AFB8;
     }
-    /*if (is_camera("550D", "1.0.9"))
+    if (is_camera("550D", "1.0.9"))
     {
         bulb_end_addr = 0x31D8; // not tested please confirm
         capture_err_time_addr = 0xFF090174; // not tested please confirm
-    }*/
+    }
     if (is_camera("50D",  "1.0.9"))
     {
         bulb_end_addr = 0x3218;
@@ -1684,7 +1684,16 @@
         capture_err_time_addr = 0xFF88DB68;
         frsp_tv_addr = 0x64; // cameras with SHOOTMODE_BULB need fake SHUTTER_BULB
     }
-   
+    if (is_camera("700D", "1.1.4"))
+    {
+        bulb_end_addr = 0x24960;
+        capture_err_time_addr = 0xff1e1dd8;
+    }
+    if (is_camera("EOSM", "2.0.2"))
+    {
+        bulb_end_addr = 0x3F300;
+        capture_err_time_addr = 0xff1df1fc;
+    }
     if (is_camera("5D3",  "1.1.3"))
     {
         bulb_end_addr = 0x25294;
# HG changeset patch
# User Alessandro Profiti <[email protected]>
# Date 1535194347 -7200
#      Sat Aug 25 12:52:27 2018 +0200
# Branch frsp_bulb
# Node ID 8ee5b34a8aa81b5a4196a90ca22d17f3f90336db
# Parent  50d24ac04eea9e6bda683c249791bf6c87fa9f65
silent.c: FRSP moved cache_fake hack to original position. Fix exposure time bug in 20-32s range introduced from milank code

diff --git a/modules/silent/silent.c b/modules/silent/silent.c
--- a/modules/silent/silent.c
+++ b/modules/silent/silent.c
@@ -1249,15 +1249,6 @@
 
     if (prop_shutter == SHUTTER_BULB || (shooting_mode == SHOOTMODE_BULB && frsp_tv_addr))
     {
-        /* some cameras reset the cache fake after FRSP, we need it again */
-        if (bulb_end_addr && capture_err_time_addr)
-        {
-            if ((*(uint32_t*)capture_err_time_addr) != 960000)
-            {
-                cache_fake(capture_err_time_addr, 960000, TYPE_DCACHE);
-            }
-        }
-       
         /* cameras with SHOOTMODE_BULB need fake SHUTTER_BULB */
         if (shooting_mode == SHOOTMODE_BULB && frsp_tv_addr)
         {
@@ -1574,7 +1565,16 @@
         
         silent_pic_take(1);
     }
-   
+
+    /* some cameras reset the cache fake after FRSP, we need it again */
+    if (bulb_end_addr && capture_err_time_addr)
+    {
+        if ((*(uint32_t*)capture_err_time_addr) != 960000)
+        {
+            cache_fake(capture_err_time_addr, 960000, TYPE_DCACHE);
+        }
+    }
+
     return 0;
 }

The approach was, indeed, a bit of a maintenance burden, as different camera models use different offsets (so it's easy to make mistakes). However, it is something that can be validated in recent QEMU (which, back then, wasn't advanced enough).

I'd also prefer to have it on top of the patch manager backend - which works pretty well, with one exception: when I take it outside, it gives ERR70. When I get back inside to track the error, it works fine.

For the above reasons, I did not decline the PR, but preferred to wait. Unfortunately, the PR was declined by the author.
Apart from patching bulb address, how to patch cache? Do refactoring this to use patch manager would require much time?
Maybe I can looks how to use it in the free time.

Submitted PR #941 to main repo to have it as reference (Greg PR was discontinued and code can only be found digging deep into this thread).
I hope that is still interesting to someone :)