I get on IX1000 Zebra mode working(in 16:9 shooting mode) when i add the define in camera.h for this Cam
#define CAM_ZEBRA_ASPECT_ADJUST
I see this from IX300 Port.
I do build a strip down port(without textreader, games)and when i use zebra, there are only 1520 bytes free and sometimes the camera power off, for example when press menu key and zebra is in play mode active(i do for more easy testing enable zebra always in code).I think it happen because low on memory.
So i change the code to be able to work without extra buffer.it can work too and i do notice only few diffrence.maybe on slower CAM/CPU flicker is visible.I do some test and it work stable.
Only bad there need changes in a core file for this.So i test the define CAM_ZEBRA_NOBUF, here zebra work too, but then the zebra output is in x size wrong(too small).i use 16:9 shootung mode, on 4:3 modes always postion is wrong
Maybe somebody have a better solution what to do, or maybe can add in the chdk main core a define CAM_ZEBRA_ASPECT_ADJUST_USE_NO_BUFFER, that can set and then no buffer is used for the zebra mode.
here is the code i use for testing
in file core/GUI_OSD.c
static void gui_osd_zebra_free() {
#if !defined (CAM_ZEBRA_NOBUF)
- free(buf);
+ //free(buf);
#endif
buf=NULL;
#if ZEBRA_CANONOSD_BORDER_RESTORE
free(cur_buf_top);
........
static int gui_osd_zebra_init(int show) {
unsigned i;
if(show)
{
if (!buf)
{
timer = 0;
#if defined (CAM_ZEBRA_NOBUF)
buffer_size=screen_buffer_size-ZEBRA_HMARGIN0*screen_buffer_width;
buf=vid_get_bitmap_fb();
#elif defined (CAM_ZEBRA_ASPECT_ADJUST)
buffer_size=screen_buffer_size-ZEBRA_HMARGIN0*screen_buffer_width;
- buf = malloc(buffer_size);
+ //buf = malloc(buffer_size);
//~ if (!buf) draw_txt_string(0, 14, "Warn: No space to allocate zebra buffer: restart camera", MAKE_COLOR(COLOR_ALT_BG, COLOR_FG));
if (!buf)
buf=vid_get_bitmap_fb(); //without new buffer: directly into screen buffer: we got some flickering in OSD and histogram but it's usable