Advertisement
a1ex

docs embedded in source code

Nov 10th, 2012
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 20.28 KB
  1. struct menu_entry zebra_menus[] = {
  2.     {
  3.         .name = "Global Draw",
  4.         .priv       = &global_draw,
  5.         .max = 3,
  6.         .select_Q   = toggle_disp_mode_menu,
  7.         .display    = global_draw_display,
  8.         .icon_type = IT_BOOL,
  9.         .help = "Enable/disable ML overlay graphics (zebra, cropmarks...)",
  10.         /**
  11.             Choose when to enable Magic Lantern overlay graphics: (zebra, cropmarks, histograms, audio meters, ML shooting info...):
  12.  
  13.             * in **LiveView** only;
  14.             * in **QuickReview** (photo mode outside LiveView) only;
  15.             * **Both modes** (default);
  16.             * **Disabled**.
  17.  
  18.             If you use `display presets`_, press Q on this item to switch the presets while you are in ML menu.
  19.         **/
  20.     },
  21.     {
  22.         .name = "Zebras",
  23.         .priv       = &zebra_draw,
  24.         .select     = menu_binary_toggle,
  25.         .display    = zebra_draw_display,
  26.         .help = "Zebra stripes: show overexposed or underexposed areas.",
  27.        
  28.         /**
  29.             .. figure:: Zebras.jpg
  30.                 :align: center
  31.                 :height: 5cm
  32.  
  33.             Enable/disable zebra stripes, which indicate overexposed or underexposed areas.
  34.              
  35.             Color spaces:
  36.                
  37.             * **Luma**: zebras are computed from Y channel only.
  38.             * **RGB**: check overexposure for each RGB channel. Clipped channels are displayed in the opposite color (i.e. clipped red shown as cyan, underexposed as white and so on).
  39.              
  40.             You may adjust thresholds for underexposure and overexposure, or you can disable zebras while recording.
  41.              
  42.             Notes:
  43.  
  44.             * using zebras in image review mode will disable Canon highlight warning temporarily. To re-enable it, press PLAY twice.
  45.             * when using the Technicolor CineStyle picture style, luma will have values between 16 and 255; therefore, you will have to set the underexposure threshold to 16 or greater.
  46.         **/
  47.  
  48.         .children =  (struct menu_entry[]) {
  49.             {
  50.                 .name = "Color space",
  51.                 .priv = &zebra_colorspace,
  52.                 .max = 2,
  53.                 .choices = (const char *[]) {"Luma", "RGB", "Luma Fast"},
  54.                 .icon_type = IT_NAMED_COLOR,
  55.                 .help = "Luma: red/blue. RGB: color is reverse of clipped channel.",
  56.             },
  57.             {
  58.                 .name = "Underexposure",
  59.                 .priv = &zebra_level_lo,
  60.                 .min = 0,
  61.                 .max = 20,
  62.                 .display = zebra_level_display,
  63.                 .help = "Underexposure threshold.",
  64.             },
  65.             {
  66.                 .name = "Overexposure",
  67.                 .priv = &zebra_level_hi,
  68.                 .min = 70,
  69.                 .max = 101,
  70.                 .display = zebra_level_display,
  71.                 .help = "Overexposure threshold.",
  72.             },
  73.             {
  74.                 .name = "When recording",
  75.                 .priv = &zebra_rec,
  76.                 .max = 1,
  77.                 .choices = (const char *[]) {"Hide", "Show"},
  78.                 .help = "You can hide zebras when recording.",
  79.                 .icon_type = IT_DISABLE_SOME_FEATURE_NEG,
  80.             },
  81.             MENU_EOL
  82.         },
  83.     },
  84.     {
  85.         /** focus peaking **/
  86.         .name = "Focus Peak",
  87.         .priv           = &focus_peaking,
  88.         .display        = focus_peaking_display,
  89.         .select         = menu_binary_toggle,
  90.         .help = "Show which parts of the image are in focus.",
  91.  
  92.         /**
  93.             {{ vimeo>18782586?250x140|Focus Peaking demo}}
  94.  
  95.             Focus assist function. High-contrast lines will be marked by blinking dots showing which part of the image is in focus.
  96.  
  97.             Parameters:
  98.              
  99.             * **Filter bias**: adjust the balance between high-contrast edges or fine texture details.
  100.             * **Display type**: choose the method for displaying focus markers. Blinking dots are the fastest, alpha blending looks best but it's a bit slow. This setting is only used in LiveView.
  101.             * **Threshold**: how many pixels are considered in focus (percentage).
  102.             * **Color**: either fixed color, or a color coding according to focus intensity (warmer colors = better focus).
  103.             * **Grayscale img**: if enabled, LiveView image will displayed as grayscale (but still recorded as color).
  104.              
  105.             #To see how it works, `check this article from Luminous Landscape <http://www.luminous-landscape.com/forum/index.php?topic=56246.0>`_.
  106.          **/
  107.  
  108.         .submenu_width = 650,
  109.         .children =  (struct menu_entry[]) {
  110.             {
  111.                 .name = "Filter bias",
  112.                 .priv = &focus_peaking_filter_edges,
  113.                 .max = 2,
  114.                 .choices = (const char *[]) {"Strong edges", "Balanced", "Fine details"},
  115.                 .help = "Balance fine texture details vs strong high-contrast edges.",
  116.                 .icon_type = IT_DICE
  117.             },
  118.             #ifdef CONFIG_DISPLAY_FILTERS
  119.             {
  120.                 .name = "Display type",
  121.                 .priv = &focus_peaking_disp,
  122.                 .max = 4,
  123.                 .choices = (const char *[]) {"Blinking dots", "Fine dots", "Alpha blend", "Sharpness", "Raw"},
  124.                 .help = "How to display peaking. Alpha looks nicer, but image lags.",
  125.             },
  126.             #endif
  127.             {
  128.                 .name = "Threshold",
  129.                 .priv = &focus_peaking_pthr,
  130.                 .select = focus_peaking_adjust_thr,
  131.                 .help = "How many pixels are considered in focus (percentage).",
  132.                 .unit = UNIT_PERCENT_x10
  133.             },
  134.             {
  135.                 .name = "Color",
  136.                 .priv = &focus_peaking_color,
  137.                 .max = 7,
  138.                 .choices = (const char *[]) {"Red", "Green", "Blue", "Cyan", "Magenta", "Yellow", "Global Focus", "Local Focus"},
  139.                 .help = "Focus peaking color (fixed or color coding).",
  140.                 .icon_type = IT_NAMED_COLOR,
  141.             },
  142.             {
  143.                 .name = "Grayscale img.",
  144.                 .priv = &focus_peaking_grayscale,
  145.                 .max = 1,
  146.                 .help = "Display LiveView image in grayscale.",
  147.             },
  148.             MENU_EOL
  149.         },
  150.     },
  151.     {
  152.         /** zoom while recording **/
  153.         .name = "Magic Zoom",
  154.         .priv = &zoom_overlay_enabled,
  155.         .display = zoom_overlay_display,
  156.         .min = 0,
  157.         .max = 1,
  158.         .help = "Zoom box for checking focus. Can be used while recording.",
  159.  
  160.         /**
  161.             {{ vimeo>29053985?250x140|Magic Zoom demo}}
  162.  
  163.             Displays a zoom box for focus assist. Can be used while recording.
  164.              
  165.             Trigger modes (not all modes are available on all cameras):
  166.              
  167.             * **HalfShutter**: triggered when you press the shutter button halfway.
  168.             * **Focus Ring**: triggered by turning the focus ring.
  169.             * **Zoom.REC**: triggered by pressing ``Zoom In`` button while recording. If your camera has a LCD sensor, you may also cover it and press ``Zoom In``.
  170.             * **FocusR+HalfS**: triggered by turning the focus ring, or by pressing shutter halfway.
  171.             * **Focus+ZREC**: triggered by turning the focus ring, or by pressing ``Zoom In`` while recording.
  172.             * **Zoom In (+)**: triggered by ``Zoom In`` button (overrides Canon's default zoom modes). To bypass magic zoom, press both zoom buttons at the same time or cover the LCD sensor.
  173.             * **Always On**: no trigger key needed. You can use both Canon's 5x/10x zoom and Magic Zoom.
  174.  
  175.             When ML believes you have achieved perfect focus, Magic Zoom will display a focus confirmation (customizable):
  176.  
  177.             * **Green Bars**
  178.             * **Split Screen**: when the image is out of focus, the zoom box looks like a split focusing screen from old film cameras.
  179.             * **Split Screen with ZeroCross**: will reverse the split direction whenever you achieve perfect focus.
  180.  
  181.             Other parameters: size, position, magnification.
  182.              
  183.             Notes:
  184.              
  185.             * `Zebras`_, `focus peaking`_ and `false color`_ are disabled automatically when the zoom overlay is active.
  186.             * Focus triggering **only** works with lenses that report [[Focus distance]], or when you use `follow focus`_ / `rack focus`_.
  187.             * In some modes, half-pressing the shutter may temporarily hide the zoom overlay.
  188.              
  189.             Original implementation:  `Magic Circles by AJ <http://www.youtube.com/watch?v=-nW25AtYjAk>`_.
  190.          **/
  191.  
  192.         .submenu_width = 650,
  193.         .children =  (struct menu_entry[]) {
  194.             {
  195.                 .name = "Trigger mode",
  196.                 .priv = &zoom_overlay_trigger_mode,
  197.                 .min = 1,
  198.                 .max = 4,
  199.                 #ifdef CONFIG_ZOOM_BTN_NOT_WORKING_WHILE_RECORDING
  200.                 .choices = (const char *[]) {"OFF", "HalfShutter", "Focus Ring", "FocusR+HalfS", "Always On"},
  201.                 .help = "Trigger Magic Zoom by focus ring or half-shutter.",
  202.                 #else
  203.                 .choices = (const char *[]) {"OFF", "Zoom.REC", "Focus+ZREC", "ZoomIn (+)", "Always On"},
  204.                 .help = "Zoom when recording / trigger from focus ring / Zoom button",
  205.                 #endif
  206.             },
  207.             {
  208.                 .name = "Size",
  209.                 .priv = &zoom_overlay_size,
  210.                 #ifndef CONFIG_CAN_REDIRECT_DISPLAY_BUFFER_EASILY // old cameras - simple zoom box
  211.                 .max = 2,
  212.                 .help = "Size of zoom box (small / medium / large).",
  213.                 #else // new cameras can do fullscreen too :)
  214.                 .max = 3,
  215.                 .help = "Size of zoom box (small / medium / large / full screen).",
  216.                 #endif
  217.                 .choices = (const char *[]) {"Small", "Medium", "Large", "FullScreen"},
  218.                 .icon_type = IT_SIZE,
  219.             },
  220.             {
  221.                 .name = "Position",
  222.                 .priv = &zoom_overlay_pos,
  223.                 .max = 4,
  224.                 .choices = (const char *[]) {"Focus box", "Top-Left", "Top-Right", "Bottom-Right", "Bottom-Left"},
  225.                 .icon_type = IT_DICE,
  226.                 .help = "Position of zoom box (fixed or linked to focus box).",
  227.             },
  228.             {
  229.                 .name = "Magnification",
  230.                 .priv = &zoom_overlay_x,
  231.                 .max = 2,
  232.                 .choices = (const char *[]) {"1:1", "2:1", "3:1", "4:1"},
  233.                 .icon_type = IT_SIZE,
  234.                 .help = "1:1 displays recorded pixels, 2:1 displays them doubled.",
  235.             },
  236.             #if !defined(CONFIG_50D) && !defined(CONFIG_500D)
  237.             {
  238.                 .name = "Focus confirm",
  239.                 .priv = &zoom_overlay_split,
  240.                 .max = 2,
  241.                 .choices = (const char *[]) {"Green Bars", "SplitScreen", "SS ZeroCross"},
  242.                 .icon_type = IT_DICE,
  243.                 .help = "How to show focus confirmation (green bars / split screen).",
  244.             },
  245.             #endif
  246.             MENU_EOL
  247.         },
  248.     },
  249.     {
  250.         .name = "Cropmarks",
  251.         .priv = &crop_enabled,
  252.         .display    = crop_display,
  253.         .select     = menu_binary_toggle,
  254.         .help = "Cropmarks or custom grids for framing.",
  255.  
  256.         /**
  257.             Cropmarks or custom grids for framing and composition.
  258.  
  259.             .. figure:: Cropmarks550D.png
  260.                 :align: center
  261.                 :width: 12cm
  262.              
  263.             Notes:
  264.                
  265.             * If you use custom cropmarks, place them in ``ML/CROPMKS`` folder on your SD card and give them short 8.3 names. You can place at most 9 cropmarks on the card.
  266.             * Get more cropmarks `from the ML cropmark repository <http://www.sawomedia.de/magiclantern/cropmarks/>`_ or draw your own (see [[Cropmarks]]).
  267.  
  268.             {{ vimeo>25182804?250x140|Cropmarks Tutorial}}
  269.         **/
  270.  
  271.         .submenu_width = 650,
  272.         .submenu_height = 270,
  273.         .children =  (struct menu_entry[]) {
  274.             {
  275.                 .name = "Bitmap",
  276.                 .priv = &crop_index,
  277.                 .select = crop_toggle,
  278.                 .display    = crop_display_submenu,
  279.                 .icon_type = IT_ALWAYS_ON,
  280.                 .help = "You can draw your own cropmarks in Paint.",
  281.             },
  282.             {
  283.                 .name = "Show in photo mode",
  284.                 .priv = &cropmark_movieonly,
  285.                 .max = 1,
  286.                 .choices = (const char *[]) {"ON", "OFF"},
  287.                 .help = "Cropmarks are mostly used in movie mode.",
  288.             },
  289.             {
  290.                 .name = "Show in PLAY mode ",
  291.                 .priv = &cropmarks_play,
  292.                 .max = 1,
  293.                 .help = "You may also have cropmarks in Playback mode.",
  294.             },
  295.             MENU_EOL
  296.         },
  297.     },
  298.     {
  299.         .name = "Ghost image",
  300.         .priv = &transparent_overlay,
  301.         .display = transparent_overlay_display,
  302.         .select = menu_binary_toggle,
  303. #if defined(CONFIG_7D)        
  304.         .help = "Overlay image in LV. In PLAY mode, press RAW/JPEG btn.",
  305. #else
  306.         .help = "Overlay any image in LiveView. In PLAY mode, press LV btn.",
  307. #endif
  308.        
  309.         /**
  310.             Shows a transparent overlay which can be created from any image in Play mode.
  311.              
  312.             Usage:
  313.              
  314.             * To select the image, go to Play mode and press the ``LiveView`` button.
  315.             * Move the ghost image in LiveView with arrow keys; center or hide it with ``SET`` or joystick press.
  316.         **/
  317.  
  318.     },
  319.     {
  320.         .name = "Spotmeter",
  321.         .priv           = &spotmeter_draw,
  322.         .select         = menu_binary_toggle,
  323.         .display        = spotmeter_menu_display,
  324.         .help = "Exposure aid: display brightness from a small spot.",
  325.  
  326.         /**
  327.             Measure brightness from a small spot in the frame.
  328.              
  329.             Possible measurement units:
  330.              
  331.             * **Percent** (0..100%)
  332.             * Raw 8-bit levels (**0..255**)
  333.             * **IRE -1..101** (formula used by AJ, which maps 0-255 luma levels to approx. -1..101 IRE)
  334.             * **IRE 0..108** (formula proposed by Piers, which maps 16-235 luma levels to 7.5-100 IRE)
  335.             * **RGB** (displays `HTML-like color codes <http://www.w3schools.com/html/html_colors.asp>`_)
  336.          **/
  337.  
  338.         .children =  (struct menu_entry[]) {
  339.             {
  340.                 .name = "Unit",
  341.                 .priv = &spotmeter_formula,
  342.                 .max = 4,
  343.                 .choices = (const char *[]) {"Percent", "0..255", "IRE -1..101", "IRE 0..108", "RGB (HTML)"},
  344.                 .icon_type = IT_DICE,
  345.                 .help = "Measurement unit for brightness level(s).",
  346.             },
  347.             {
  348.                 .name = "Position",
  349.                 .priv = &spotmeter_position,
  350.                 .max = 1,
  351.                 .choices = (const char *[]) {"Center", "Focus box"},
  352.                 .icon_type = IT_DICE,
  353.                 .help = "Spotmeter position: center or linked to focus box.",
  354.             },
  355.             MENU_EOL
  356.         }
  357.     },
  358.     #ifndef CONFIG_5D3_MINIMAL
  359.     {
  360.         .name = "False color",
  361.         .priv       = &falsecolor_draw,
  362.         .display    = falsecolor_display,
  363.         .select     = menu_binary_toggle,
  364.         .submenu_height = 160,
  365.         .help = "Exposure aid: each brightness level is color-coded.",
  366.  
  367.         /**
  368.             This is a tool for evaluating the exposure. It shows different luma (Y) levels using a color map.
  369.             You may select one of the following color maps:
  370.  
  371.             .. figure:: falsecolor.png
  372.                 :align: center
  373.                 :width: 13cm
  374.  
  375.             Tips:
  376.              
  377.             * you may configure a `display preset`_ with False Color and toggle it with a single button press.
  378.             * you may also use false colors to highlight 50% and 70% brightness levels, or to reveal color banding, or to check for uniform green screen lighting.
  379.          **/
  380.  
  381.         .children =  (struct menu_entry[]) {
  382.             {
  383.                 .name = "Palette",
  384.                 .priv = &falsecolor_palette,
  385.                 .max = COUNT(false_colour)-1,
  386.                 .icon_type = IT_DICE,
  387.                 .display = falsecolor_display_palette,
  388.                 .help = "False color palettes for exposure, banding, green screen...",
  389.             },
  390.             MENU_EOL
  391.         }
  392.     },
  393.     #endif
  394.     {
  395.         .name = "Histogram",
  396.         .priv       = &hist_draw,
  397.         .max = 1,
  398.         .display = hist_print,
  399.         .help = "Exposure aid: shows the distribution of brightness levels.",
  400.  
  401.             /**
  402.                 {{ vimeo>33179488?250x140|Using The Video Histogram To Keep Detail in the Highlights}}
  403.  
  404.                 These exposure tools will show the distribution of image brightness levels.
  405.                  
  406.                 .. figure:: Histogram-and-waveform.png
  407.                     :align: center
  408.                     :height: 2cm
  409.  
  410.                 To learn how to read these graphs, see `Understanding Histograms <http://www.luminous-landscape.com/tutorials/understanding-series/understanding-histograms.shtml>`_ and `Final Cut Waveform Monitor <http://www.youtube.com/watch?v=JXMvFk146R0>`_.
  411.              **/
  412.  
  413.         .children =  (struct menu_entry[]) {
  414.             {
  415.                 .name = "Color space",
  416.                 .priv = &hist_colorspace,
  417.                 .max = 1,
  418.                 .choices = (const char *[]) {"Luma", "RGB"},
  419.                 .icon_type = IT_NAMED_COLOR,
  420.                 .help = "Color space for histogram: Luma channel (YUV) / RGB.",
  421.             },
  422.             {
  423.                 .name = "Scaling",
  424.                 .priv = &hist_log,
  425.                 .max = 1,
  426.                 .choices = (const char *[]) {"Linear", "Logarithmic"},
  427.                 .help = "Linear or logarithmic histogram.",
  428.                 .icon_type = IT_DICE,
  429.             },
  430.             {
  431.                 .name = "Clip warning",
  432.                 .priv = &hist_warn,
  433.                 .max = 5,
  434.                 .display = hist_warn_display,
  435.                 .help = "Display warning dots when one color channel is clipped.",
  436.             },
  437.             MENU_EOL
  438.         },
  439.     },
  440.     {
  441.         .name = "Waveform",
  442.         .priv       = &waveform_draw,
  443.         .display = waveform_print,
  444.         .max = 1,
  445.         .help = "Exposure aid: useful for checking overall brightness.",
  446.  
  447.             /**
  448.                 {{ vimeo>33179488?250x140|Using The Video Histogram To Keep Detail in the Highlights}}
  449.  
  450.                 These exposure tools will show the distribution of image brightness levels.
  451.                  
  452.                 .. figure:: Histogram-and-waveform.png
  453.                     :align: center
  454.                     :height: 2cm
  455.  
  456.                 To learn how to read these graphs, see `Understanding Histograms <http://www.luminous-landscape.com/tutorials/understanding-series/understanding-histograms.shtml>`_ and `Final Cut Waveform Monitor <http://www.youtube.com/watch?v=JXMvFk146R0>`_.
  457.              **/
  458.  
  459.         .children =  (struct menu_entry[]) {
  460.             {
  461.                 .name = "Size",
  462.                 .priv = &waveform_size,
  463.                 .max = 2,
  464.                 .choices = (const char *[]) {"Small", "Large", "FullScreen"},
  465.                 .icon_type = IT_SIZE,
  466.                 .help = "Waveform size: Small / Large / FullScreen.",
  467.             },
  468.             MENU_EOL
  469.         },
  470.     },
  471.     {
  472.         .name = "Vectorscope",
  473.         .display = vectorscope_display,
  474.         .priv       = &vectorscope_draw,
  475.         .max = 1,
  476.         .help = "Shows color distribution as U-V plot. For grading & WB.",
  477.  
  478.         /**
  479.             This tool shows the color distribution with an U-V plot. Useful for color grading.
  480.  
  481.             To learn how to read it, see `Introducing Color Scopes: The Vectorscope <http://www.kdenlive.org/users/granjow/introducing-color-scopes-vectorscope>`_.
  482.  
  483.             .. figure:: vectorscope.png
  484.                 :align: center
  485.                 :height: 3cm
  486.          **/
  487.     },
  488. };
Advertisement
RAW Paste Data Copied
Advertisement