Patch here. Needs some cleanup, since 50D does not support display filters.
diff -r 33e2dcdef271 modules/raw_rec/Makefile
--- a/modules/raw_rec/Makefile Fri May 17 19:17:25 2013 +0300
+++ b/modules/raw_rec/Makefile Sat May 18 07:53:44 2013 +0100
@@ -6,6 +6,7 @@
MODULE_NAME=raw_rec
MODULE_OBJS=raw_rec.o
+
# include make environment
include $(TOP_DIR)/Makefile.top
include $(TOP_DIR)/Makefile.inc
diff -r 33e2dcdef271 platform/50D.109/Makefile
--- a/platform/50D.109/Makefile Fri May 17 19:17:25 2013 +0300
+++ b/platform/50D.109/Makefile Sat May 18 07:53:44 2013 +0100
@@ -63,6 +63,9 @@
beep.o \
vsync-lite.o \
afma.o \
+ raw.o \
+ chdk-dng.o \
+
#include generic rules and definitions
#TOP_DIR defined in upper Makefile
diff -r 33e2dcdef271 platform/50D.109/features.h
--- a/platform/50D.109/features.h Fri May 17 19:17:25 2013 +0300
+++ b/platform/50D.109/features.h Sat May 18 07:53:44 2013 +0100
@@ -3,6 +3,12 @@
// 50D movie hacks
#define FEATURE_MOVIE_RECORDING_50D
#define FEATURE_MOVIE_RECORDING_50D_SHUTTER_HACK
+#define FEATURE_RAW_ZEBRAS
+#define FEATURE_RAW_HISTOGRAM
+#define FEATURE_RAW_SPOTMETER
+// silent pic
+#define FEATURE_SILENT_PIC_RAW_BURST
+//#define FEATURE_SILENT_PIC_RAW ---> Set Burst or single not both!
//~ #define FEATURE_LVAE_EXPO_LOCK // unreliable, and we have full manual controls now
// no audio at all
diff -r 33e2dcdef271 platform/50D.109/internals.h
--- a/platform/50D.109/internals.h Fri May 17 19:17:25 2013 +0300
+++ b/platform/50D.109/internals.h Sat May 18 07:53:44 2013 +0100
@@ -113,3 +113,6 @@
/** We can record movies in regular photo modes - M, P, Tv, Av... */
#define CONFIG_NO_DEDICATED_MOVIE_MODE
+
+
+/** Here comes the sun! ... raw video .. not yet*/
diff -r 33e2dcdef271 src/raw.c
--- a/src/raw.c Fri May 17 19:17:25 2013 +0300
+++ b/src/raw.c Sat May 18 07:53:44 2013 +0100
@@ -24,7 +24,7 @@
* To find it, call("lv_save_raw") and look for an EDMAC channel that becomes active (Debug menu)
**/
-#if defined(CONFIG_5D2) || defined(CONFIG_600D)
+#if defined(CONFIG_5D2) || defined(CONFIG_600D) || defined(CONFIG_50D)
#define RAW_LV_EDMAC 0xC0F04508
#endif
@@ -33,6 +33,8 @@
#define RAW_LV_EDMAC 0xC0F26208
#endif
+
+
/**
* Photo-mode raw buffer address
* On old cameras, it can be intercepted from SDSf3 state object, right after sdsMem1toRAWcompress.
@@ -50,6 +52,10 @@
#define RAW_PHOTO_EDMAC 0xc0f04808
#endif
+#if defined(CONFIG_50D)
+#define RAW_PHOTO_EDMAC 0xc0f04A08 // definetly false, has to be found :)
+#endif
+
static uint32_t raw_buffer_photo = 0;
/* called from state-object.c, SDSf3 or SSS state */
@@ -133,6 +139,15 @@
-975, 10000, 2039, 10000, 6148, 10000
#endif
+#ifdef CONFIG_50D // not found yet
+ //~{ "Canon EOS 50D", 0, 0x3d93,
+ //~{ 4920,616,-593,-6493,13964,2784,-1774,3178,7005 } },
+ #define CAM_COLORMATRIX1 \
+ 4920, 10000, 616, 10000, -593, 10000, \
+ -6493, 10000, 12964, 10000, 2784, 10000, \
+ -1774, 10000, 3178, 10000, 7005, 10000
+#endif
+
struct raw_info raw_info = {
.api_version = 1,
.bits_per_pixel = 14,
@@ -230,6 +245,13 @@
skip_right = 0;
skip_bottom = 1;
#endif
+
+ #ifdef CONFIG_50D
+ skip_top = 22;
+ skip_left = 72;
+ skip_right = 0;
+ skip_bottom = 0;
+ #endif
dbg_printf("LV raw buffer: %x (%dx%d)\n", raw_info.buffer, width, height);
dbg_printf("Skip left:%d right:%d top:%d bottom:%d\n", skip_left, skip_right, skip_top, skip_bottom);
@@ -338,6 +360,10 @@
#ifdef CONFIG_6D
int dynamic_ranges[] = {1143, 1139, 1122, 1087, 1044, 976, 894, 797, 683, 624, 505};
#endif
+
+ #ifdef CONFIG_50D
+ int dynamic_ranges[] = {1140, 1106, 1051, 965, 872, 772, 679};
+ #endif
#ifdef CONFIG_600D
int dynamic_ranges[] = {1146, 1139, 1116, 1061, 980, 898, 806, 728};
@@ -350,6 +376,8 @@
#ifdef CONFIG_EOSM
int dynamic_ranges[] = {1121, 1124, 1098, 1043, 962, 892, 779, 683, 597};
#endif
+
+
/*********************** Portable code ****************************************/
diff -r 33e2dcdef271 src/shoot.c
--- a/src/shoot.c Fri May 17 19:17:25 2013 +0300
+++ b/src/shoot.c Sat May 18 07:53:44 2013 +0100
@@ -1876,14 +1876,15 @@
display_filter_get_buffers(&src_buf, &dst_buf);
memset(dst_buf, 0, vram_lv.height * vram_lv.pitch);
memset(sp_frames[0], 0, raw_info.frame_size);
- silent_pic_display_buf = CACHEABLE(dst_buf);
- }
-}
+ //silent_pic_display_buf = CACHEABLE(dst_buf); // deactivated for 50D testing
+ }
+}
+/* // deactivated for 50D testing
static void silent_pic_raw_update_preview()
{
if (!silent_pic_display_buf) return;
- /* try to preview the last completed frame; if there isn't any, use the first frame */
+ // try to preview the last completed frame; if there isn't any, use the first frame
void* raw_buf = sp_frames[MAX(0,sp_num_frames-2) % sp_buffer_count];
static int first_line = 0;
int last_line;
@@ -1892,13 +1893,13 @@
{
last_line = RAW2LV_Y(sp_slitscan_line);
if (first_line > last_line) first_line = BM2LV_Y(os.y0);
- ultra_fast = 0; /* since we only refresh a few lines at a time, we can use better quality */
+ ultra_fast = 0; // since we only refresh a few lines at a time, we can use better quality
}
else
{
first_line = BM2LV_Y(os.y0);
last_line = BM2LV_Y(os.y_max);
- ultra_fast = 1; /* we have to refresh complete frames, so we'll sacrifice quality to gain some speed */
+ ultra_fast = 1; // we have to refresh complete frames, so we'll sacrifice quality to gain some speed
}
if (silent_pic_mode == SILENT_PIC_MODE_BEST_SHOTS)
@@ -1910,7 +1911,7 @@
raw_preview_fast_ex(raw_buf, silent_pic_display_buf, first_line, last_line, ultra_fast);
}
-
+*/
static int silent_pic_raw_prepare_buffers(struct memSuite * hSuite)
{
/* we'll look for contiguous blocks equal to raw_info.frame_size */
@@ -8261,5 +8262,4 @@
}
}
#endif
-}
-
+}