Movie mode support for DIGIC 6 ports. Previous patches and notes were posted
here and in the preceding posts.
I would like to commit this in, say, 1-2 weeks. In case anyone has reservations, objections or suggestions, do not hesitate to post (here or in the D6 thread linked above).
A partial explanation about changes contained in the patch is below. Platform code related (porting) notes are missing at the moment.
Global changes:
- [camera.h] a define (CAM_MOVIEREC_NEWSTYLE) was added to separate D6 related movie support code
- [camera.h] video quality defaults (defines) moved from include/conf.h to include/camera.h due to their dependency on the newly introduced CAM_MOVIEREC_NEWSTYLE define
- [conf.c] video mode/bitrate/quality conf entries are now reset when a different camera's configuration is loaded. This was done mainly because the CAM_MOVIEREC_NEWSTYLE interpretation of those entries was made different. Worth to note that quality settings have not been uniform among existing ports anyway.
- conf.video_quality is no longer used directly in CAM_MOVIEREC_NEWSTYLE platform code. New functions are introduced, similar to the existing shooting_video_bitrate_change() + change_video_tables().
- CAM_MOVIEREC_NEWSTYLE: "Video mode" (conf.video_mode) is interpreted differently. When not "Default", it can be: "CBR", "VBR HI", "VBR MID", "VBR LOW". The VBR variants differ in their middle bitrate. When recording a scene that is lacking details and movement, the middle bitrate does have some influence over the resulting bitrate. The encoder's quality factor can't be influenced currently (so the decision over raising the bitrate is in the encoder's hands).
- CAM_MOVIEREC_NEWSTYLE: The bitrate selector menu entry is always effective when "video mode" is not set to "default". In VBR modes, the bitrate selected here will be the maximum bitrate.
- CAM_MOVIEREC_NEWSTYLE: A new (localized) menu entry was added to let the user specify relative minimum bitrate (10% ... 100%, in 10% increments).
- CAM_MOVIEREC_NEWSTYLE: Bitrate adjustment during recording ("video quality control" in menu) is not possible, the UI was therefore removed.
- CAM_MOVIEREC_NEWSTYLE: Recording bitrate information comes directly from a platform callback. Reason for doing this is that D6 cameras do not update filesystem statistics during recording. The callback provides both recorded size and momentary bitrate. Unfortunately, the current firmware hook only provides fresh information once a chunk of movie data is passed to the card writer routines (that's 3 MB granularity on the sx280, painful on lower bitrates).
edit:
patch updated to v5, changes:
- Momentary bitrate calculation removed due to irregularly arriving movie chunks. Bitrate calculation will now match the pre-D6 code.
- Example (untested) sx60 changes removed.
- Ant's M3 patches integrated.
edit2:
Patch
committed with some minor changes.