1.5 development planning thread

Not sure where to post this (the bitmap overlay thread would have been the other choice).

Attached patch adds additional compression to the built-in font. It saves ~850 bytes when using the current font. The patch is not "production ready" yet, because it adds dead code (and an unnecessary runtime decision) to draw_char() in core/gui_draw.c .Benchmark results are inconclusive, but it appears that the patched build on my a3200 actually draws text slightly faster than a vanilla build.

Background: while working on font related stuff, I've noticed that the built-in font uses less than half of the possible bit combinations in its font data.I have added a lookup-table that contains the bytes that are actually used by the font bitmaps, made font_data[] use 7 bit lookup table indexes and used the remaining 1 bit as a "repetition flag". That allows sparing some bytes when encoding glyphs that have repeating rows.

I also have a use for those spared bytes: we could perhaps add the missing Greek letters...

Not sure where to post this (the bitmap overlay thread would have been the other choice).

Attached patch adds additional compression to the built-in font. It saves ~850 bytes when using the current font. The patch is not "production ready" yet, because it adds dead code (and an unnecessary runtime decision) to draw_char() in core/gui_draw.c .Benchmark results are inconclusive, but it appears that the patched build on my a3200 actually draws text slightly faster than a vanilla build.

Background: while working on font related stuff, I've noticed that the built-in font uses less than half of the possible bit combinations in its font data.I have added a lookup-table that contains the bytes that are actually used by the font bitmaps, made font_data[] use 7 bit lookup table indexes and used the remaining 1 bit as a "repetition flag". That allows sparing some bytes when encoding glyphs that have repeating rows.

I also have a use for those spared bytes: we could perhaps add the missing Greek letters...

Thoughts, improvements are welcome.

My only reservation is that it puts a hard limit of 128 possible values that can exist for the font bitmaps - if extra font characters are needed that would exceed this limit, then it might be an issue. Probably very low risk though.

My only reservation is that it puts a hard limit of 128 possible values that can exist for the font bitmaps - if extra font characters are needed that would exceed this limit, then it might be an issue. Probably very low risk though.

I thought about that and provided a fallback in code.For statistics: made three different 8x16 fonts so far, the worst case was a little over 110 distinct values in font data. The current font (as is) has 95.Working on a more proper patch, forgot to modify draw_char_scaled().

font_8x16_pack now emits a #define when it managed to apply the rle compression.core/gui_draw.c includes lib/font/font_8x16_uni_packed.h (but only to get the #define).draw_char() and draw_char_scaled() have #ifdef'd parts, depending on the #define.Since core/gui_draw.c now depends on lib/font/font_8x16_uni_packed.h, I made a change in platform/makefile_sub.inc accordingly.

I realize this isn't likely to get discussed in detail (we're only a handful of people, no time, no-one here actually uses codepages other than cp1252), but here's the next update.

The core code part has not changed. I have added the missing Greek characters and while doing so, also updated the font to the current version (4.40).I have added code to tools/font_8x16_pack that excludes repeated glyphs.With this, the compressed font says// font_data length: 3472 bytes// lookup table length: 97 bytes

I realize this isn't likely to get discussed in detail (we're only a handful of people, no time, no-one here actually uses codepages other than cp1252), but here's the next update.

The core code part has not changed. I have added the missing Greek characters and while doing so, also updated the font to the current version (4.40).I have added code to tools/font_8x16_pack that excludes repeated glyphs.With this, the compressed font says// font_data length: 3472 bytes// lookup table length: 97 bytes

Looks good to me. Fitting in the extra characters while reducing the overall size is cool

Looks good to me. Fitting in the extra characters while reducing the overall size is cool

Thanks.Attached the 'final' version, the only change is that I brought back the old dot (the dot we're using in checkboxes) because it has become smaller in version 4.40.Also attached is an animation showing the old and new font. The new version can be easily recognized because the 1253 codepage screen is more complete. Order of codepages is:1250 - 1251 - 12521253 - 1254 - 1257

Attached is a patch that allows pausing/resuming continuous auto focus during video recording. This feature is for cameras that continuously adjust focus and don't have a native method for locking it.I have re-used parts of the CAM_AF_SCAN_DURING_VIDEO_RECORD code, including the menu entry.Two methods are implemented, one is based on the DoAFLock/UnlockAF firmware functions, the other uses the MovieAF.Suspend and MovieAF.Resume event procedures (only when these are available). The difference between the two methods is that DoAFLock always does an AF scan prior to locking the focus, MovieAF.Suspend just locks focus without an AF scan. If both methods are available, a menu entry lets the user choose one.

To avoid inadvertently leaving the focus locked, I placed a check in kbd_process() (core/kbd_process.c). I'm not sure if it's at the best location.

Cameras included in the patch are: ixus150, sx280, sx520/530. The MovieAF event procedures can be found in the funcs_by_name.csv files.