<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="functions.xsl" ?>

<root>
<file name="paint_funcs_row_bfp.h"/>

<file name="paint_funcs_row_bfp.c">
  <function name="x_add_row_bfp">
    <description>adding pixel itensities, clamping at max</description>
  </function>
  <function name="x_sub_row_bfp">
    <description>subtracting intensities, clamping at 0</description>
  </function>
  <function name="x_min_row_bfp">
    <description>taking the minimum of the two intensities</description>
  </function>
  <function name="invert_row_bfp">
    <description>inverts the pixel value</description>
    <note>doesn't seem to be used. there is an invert.c that has the same function and is the one that is called e.g. by image/invert menu</note>
  </function>
  <function name="absdiff_row_bfp">
    <description>takes a source, a destination and a color. Where the diff between the color and a source pixel is greater than a threshold, the destination is set to white, where it is smaller, it is set to black. Also allows to use antialiasing, but I don't understand the calculations</description>
    <called-by>by_color_select.c: by_color_select_color, fuzzy_select.c: seed_fill</called-by>
  </function>
  <function name="extract_channel_row_bfp">
    <description>extract the data of one channel that is given as parameter and copies it to the destination row</description>
  </function>
  <function name="color_row_bfp">
    <description>colours a row in a given colour: sets all pixels in the row to the intensities of that colour</description>
  </function>
  <function name="blend_row_bfp">
    <description>blends two rows with a blending factor &gt;0.0 and &lt;1.0: row1*blend + row2*(1-blend)</description>
  </function>
  <function name="shade_row_bfp">
    <description>basically same as blend = blend one row with a colour instead of blending two rows</description>
    <note>could get rid of this one, since same as blend, pixel_row or colour as second operand is the same</note>
  </function>
  <function name="extract_alpha_row_bfp">
    <description>extracts the alpha data, mixing it with mask data if there is, otherwise assuming opaque mask</description>
  </function>
  <function name="darken_row_bfp">
    <description>mix two rows by always taking the darker pixel of the two (same for alpha)</description>
  </function>
  <function name="lighten_row_bfp">
    <description>inverse of darken_row</description>
  </function>
  <function name="hsv_only_row_bfp">
    <description>takes two rows, converts to HSV and forms destination row by taking either H,S or V (depending on a mode parameter) from second row and rest from first row. Then converts back</description>
  </function>
  <function name="color_only_row_bfp">
    <description>converts two rows to HLS, takes L from first row and HS from second to form result row, has a mode parameter that is ignored. Converts result back to RGB</description>
    <note>mode parameter is ignored</note>
  </function>
  <function name="multiply_row_bfp">
    <description>mults two rows, and divides by max to clamp. takes minimum of the two alpha</description>
  </function>
  <function name="screen_row_bfp">
    <description>'screens' two rows (as in the layer mode 'screen'): inverts both, multiplies and inverts the results</description>
  </function>
  <function name="overlay_row_bfp"> 
    <description>as in the layer mode</description>
    <note>not entirely sure this is correctly implemented. was a bit uncertain about where to clamp</note>
  </function>
  <function name="add_row_bfp">
    <description>adds values, clamping at max</description>
    <note>does exactly the same as x_add_row</note>
  </function>
  <function name="substract_row_bfp">
    <description>subtracting values, clamping at 0</description>
    <note>does exactly the same as x_sub_row</note>
  </function>
  <function name="difference_row_bfp">
    <description>calculates the absolute difference, takes the minimum of the two alpha</description>
  </function>
  <function name="dissolve_row_bfp">
    <description>as in the layer mode. sets alpha to transparent (0) if it is greater than some random value, otherwise maintains it</description>
  </function>
  <function name="replace_row_bfp">
    <description>don't understand the calculations. seems to blend the two rows in a way?</description>
    <note>!!POSSIBLY WRONG!! didn't understand it, left it for bfp as for u16</note>
  </function>
  <function name="swap_row_bfp">
    <description>as the name says</description>
  </function>
  <function name="scale_row_bfp">
    <description>multiplies intensities by scale factor</description>
    <note>doesn't seem to be used by anyone (probably replaced by scale_row_* funcs in paint_funcs_area. Also, I think, it has a bug for u8 and u16 (uses INT_MULT straight with float values, without pre-multiply)</note>
  </function>
  <function name="add_alpha_row_bfp">
    <description>adds alpha channel to an image and makes it opaque</description>
  </function>
  <function name="flatten_row_bfp">
    <description>flattens a row, i.e. blends/combines two rows using their alpha information</description>
  </function>
  <function name="multiply_alpha_row_bfp">
    <description>multiplies the alpha channel onto RGB (pre-multiplies)</description>
    <note>doesn't seem to be used by anyone</note>
  </function>
  <function name="separate_alpha_row_bfp">
    <description>the inverse of multiply_alpha_row_bfp (divides alpha out of pre-multiplied values)</description>
    <note>doesn't seem to be used by anyone</note>
  </function>
  <function name="gray_to_rgb_row_bfp">
    <description>as name says</description>
is this ever ??use?? (also copy_gray_to_inten_a)
  </function>
  <function name="apply_mask_to_alpha_channel_row_bfp">
    <description>combines mask and alpha channel storing result in the latter (mask * alpha)</description>
  </function>
  <function name="combine_mask_and_alpha_channel_row_bfp">
    <description>alpha + (1 - alpha) * mask</description>
  </function>
  <function name="copy_gray_to_inten_a_row_bfp">
    <description>takes gray image and copies to new (possibly expanding RGB) + adding alpha opaque</description>
  </function>

  <note>the initial functions calculated the display intensities for first layer when composing an image</note>
  
  <function name="initial_channel_row_bfp">
    <description>used to display as grayscale when only one channel + no layers visible</description>
    <note>100% same code as copy_gray_to_inten_a_row_bfp</note>
  </function>
  <function name="initial_indexed_row_bfp">
    <note>use indexed in bfp?</note>
  </function>
  <function name="initial_indexed_a_row_bfp">
    <note>use indexed in bfp?</note>
  </function>
  <function name="initial_inten_row_bfp"/>
  <function name="initial_inten_a_row_bfp"/>

  <note>the combine functions are used to gradually combine the layers in the rendering process. There is a function for every possible combination of alpha channel/no alpha channel. the second source row is the one that is composed on top of the first</note>

  <function name="combine_indexed_and_indexed_row_bfp">
    <note>use indexed in bfp?</note>
  </function>
  <function name="combine_indexed_and_indexed_a_row_bfp">
    <note>use indexed in bfp?</note>
  </function>
  <function name="combine_indexed_a_and_indexed_row_bfp">
    <note>use indexed in bfp?</note>
  </function>
  <function name="combine_indexed_a_and_indexed_a_row_bfp">
    <note>use indexed in bfp?</note>
  </function>
  <function name="combine_inten_and_inten_row_bfp">
    <description>combines RGB+RGB or gray+gray</description>
  </function>
  <function name="combine_inten_and_inten_a_row_bfp" />
  <function name="combine_inten_and_inten_a_row_bfp" />
  <function name="combine_inten_a_and_inten_row_bfp" />
  <function name="combine_inten_a_and_inten_a_row_bfp" />
  <function name="combine_inten_a_and_channel_mask_row_bfp" /> 
  <function name="combine_inten_a_and_channel_selection_row_bfp" /> 
  
  <function name="behind_inten_row_bfp">
    <description>not sure what this does</description>
  </function>
  <function name="behind_indexed_row_bfp">
    <note>indexed used for bfp?</note>
  </function>
  <function name="replace_inten_row_bfp">
    <description>not sure what this does</description>
  </function>
  <function name="replace_indexed_row_bfp">
    <note>indexed used for bfp?</note>
  </function>
  <function name="erase_inten_row_bfp">
    <description>not sure what this does</description>
  </function>
  <function name="erase_indexed_row_bfp">
    <note>indexed used for bfp?</note>
  </function>

  <function name="extract_from_inten">
    <description>extracts pixels from a row, pixels to extract are given by a mask. parameter cut is boolean (TRUE: cut out pixels from source, FALSE, just copy). If we cut and the source has alpha, it becomes transparent where not masked or stays the same where masked.if no alpha exists, the cut is realised by displaying the background colours where masked</description>
    <called-by>gimage_mask.c:gimage_mask_extract, global_edit.c:edit_copy + edit_cut</called-by>
  </function>     
  <function name="extract_from_indexed">
    <note>indexed used for bfp?</note>
  </function>
  
  <function name="copy_row_*">
    <description>a group of copy functions from rgb/gray/indexed bfp to every other format</description>
  </function>
</file>
  
<file name="paint_funcs_area.c">
  <note>all the functions below just wrap up the type-dependent row_functions in paint_funcs_row_*.c. They select the appropriate function based on the pixelarea's tag returning a pointer to that function. They always take into consideration the precision, sometimes also format and has_alpha. It's easy to see which row functions they refer to</note>

  <function name="x_add_area_funcs" />
  <function name="x_sub_area_funcs" />
  <function name="invert_area_funcs" />
  <function name="absdiff_area_funcs" />
  <function name="extract_channel_area_funcs"/>
  <function name="color_area_funcs"/>
  <function name="blend_area_funcs" />
  <function name="shade_area_funcs" />
  <function name="copy_area_funcs" />
  <function name="add_alpha_area_funcs" />
  <function name="flatten_area_funcs" />
  <function name="extract_alpha_area_funcs" />
  <function name="extract_from_area_funcs" />
  <function name="multiply_alpha_area_funcs" />
  <function name="separate_alpha_area_funcs" />
  <function name="apply_mask_to_area_funcs">
    <description>pointing to apply_mask_to_alpha_channel_row_bfp</description>
  </function>
  <function name="copy_gray_to_area_funcs" /> 
  <function name="intial_area_funcs"/>
  <function name="combine_area_funcs" />
  <function name="apply_layer_mode_replace_funcs">
    <description>pointing to replace_row_bfp</description>
  </function>
  <function name="swap_area_funcs" />
  <function name="apply_layer_mode_funcs">
    <description>sets a whole bunch of row functions that corresponds to the layer modes, such as screen, difference...</description>
  </function>

  <note>the following type-dependent functions are implemented directly in paint_funcs_area.c instead of paint_funcs_row_* (Why??)</note>
  <function name="convolve_area_bfp"/>
  <function name="convolve_area_funcs" />
  <function name="gaussian_curve_bfp" />  
  <function name="rle_row_bfp" />
  <function name="gaussian_blur_row_bfp" />
  <function name="gaussian_blur_area_funcs">
    <description>wraps up all of rle_row_bfp,gaussian_blur_row_bfp and gaussian_curve_bfp</description>
  </function>
  <function name="scale_row_no_resample_bfp" />
  <function name="scale_area_no_resample_funcs" />
  <function name="scale_row_resample_bfp" />
  <function name="scale_area_resample_funcs" />
  <function name="scale_set_dest_row_bfp" />
  <function name="scale_set_dest_funcs" />
  <function name="thin_row_bfp" />
  <function name="thin_area_funcs" />

  <function name="combine_mask_and_area_funcs" />
  <function name="combine_mask_and_area_row_bfp" />
</file>

<file name="tag.h">
  <note>just added the new bfp image types</note>
</file>

<file name="tag.c">
  <function name="tag_set_precision" />
  <function name="tag_bytes" /> 
  <function name="tag_string_precision" />
  <function name="tag_valid" />
  <function name="tag_to_drawable_type" />
  <function name="tag_to_image_type" />
  <function name="tag_from_drawable_type" />
  <function name="tag_from_image_type" />
</file>

<file name="image_render.c">
  <note>apart from the functions, added a new array render_funcs_bfp</note>
  <function name="render_image_rgb_bfp" />
  <function name="render_image_rgb_a_bfp" />
  <function name="render_image_gray_bfp" />
  <function name="render_image_gray_a_bfp" />
  <function name="set_visible_channels_row_bfp" />
  <function name="set_visible_channels_func: new select" />    
  <funtion name="render_image"/>
</file>

<file name="color_picker.c">
  <function name="color_picker_info_update" />
  <function name="color_picker_info_update_bfp" />
</file>

<file name="menu.c">
  <note>just added new menu option for "image/bfp" to image_entries array</note>
</file>

<file name="fuzzy_select.c">
  <function name="find_contiguous_region">
    <note>new select case to set point to seed_fill_bfp</note>
  </function>
  <function name="seed_fill_bfp"/>
</file>

<file name="gdisplay.c">
  <function name="gdisplay_set_menu_sensitivity">
    <note>add sensitivity setting for BFP conversion entry in image/bfp</note>
  </function>
</file>

<file name="channel.c">
  <function name="channel_add_segment">
    <description>adds a given value to all pixels in a row of width w and starting at x,y</description>
  </function>
  <function name="channel_sub_segment" />
  <function name="channel_value" />
  <function name="channel_bounds" />
  <function name="channel_empty" />    
  <function name="channel_sharpen" />
</file>

<file name="bezier_select.c">
  <function name="bezier_convert_helper"/>
  <function name="bezier_convert_helper_bfp" />
</file>

<file name="boundary.c">
  <function name="find_empty_segs_line_func" />
  <function name="find_empty_segs_line_bfp" />
</file>

<file name="brightness_contrast.c">
  <function name="brightness_contrast_funcs" />
  <function name="brightness_contrast_bfp">
    <note>I am not entirely certain this is implemented correctly, since I didn't study the brightness funcs in detail. It seems to have the right effect, thought</note>
  </function>
  <function name="brightness_contrast_init_transfers_bfp"> 
    <description>pre-calculates function vales into a LUT</description>
  </function>
</file>

<file name="brushgenerated.c">
  <function name="gimp_brush_generated_compute_funcs" />
  <function name="gimp_brush_generated_compute_bfp" />
</file>

<file name="brush_select.c">
  <function name="display_brush_get_row_funcs" />
  <function name="display_brush_get_row_bfp" />
</file>

<file name="color_balance.c">
  <function name="color_balance_funcs" />
  <function name="color_balance_row_bfp" />
  <function name="color_balance_init_transfers_bfp" />
</file>

<file name="color_select.c">
  <function name="color_select_format_entry" />
  <function name="color_select_entry_update" />
</file>

<file name="commands.c">
  <function name="file_new_ok_callback">
    <note>added select case. the select seems to be unnecessary, though: select(precision) {case PRECISION_BFP: precision=5}, but PRECISION_BFP=5, anyway, so we could just assign</note>
  </function>
  <function name="file_new_cmd_callback">
    <note>add radio button to the interface</note>
  </function>
</file>

<file name="curves.c">
  <function name="curves_funcs">
    <note>!!MISSING!! only exist for u8 and u16, didn't know whether to implement for bfp</note>
  </function>
</file>

<file name="desaturate.c">
  <function name="desaturate_row_func" />
  <function name="desaturate_row_bfp" />
</file>

<file name="displaylut.c">
  <function name="display_u8_init" />
  <function name="display_u8_alpha_from_float">
    <note>the code is exactly the same for all types!?</note>
  </function>
  <function name="display_u8_from_float"/>
</file>

<file name="dodgeburn.c">
  <function name="dodgeburn_row_func"/>
  <function name="dodge_highlights_row_bfp" />
  <function name="dodge_midtones_row_bfp" />
  <function name="dodge_shadows_row_bfp" />
</file>

<file name="equalize.c">
  <function name="equalize" />
</file>

<file name="free_select.c">
  <function name="scan_convert_helper" />
  <function name="scan_convert_helper_bfp" />
</file>

<file name="gamma_expose.c">
  <function name="gamma_expose_funcs" />
  <function name="gamma_expose_init_transfers_bfp">
     <description>pre-calculates function vales into a LUT</description>
  </function>
  <function name="gamma_expose_bfp">
    <note>why do all types apart from float use 2*gamma and 2*expose in gamma/exposure funcs, but float doesn't?</note>
  </function>
</file>

<file name="hue_saturation.c">
  <function name="hue_saturation_funcs" />
  <function name="hue_saturation_bfp" />
  <function name="hue_saturation_calculate_transfers_bfp">
     <description>pre-calculates function vales into a LUT</description>
  </function>
  <function name="hue_saturation_alloc_transfers_bfp"/>
</file>

<file name="info_window.c">
  <function name="info_window_update_xy">
    <note>new select case to set the string formatting of BFP value</note>
  </function>
</file>

<file name="invert.c">
  <function name="invert_row_func" />
  <function name="invert_row_bfp" />
</file>

<file name="layer.c">
  <function name="layer_pick_correlate" />
</file>

<file name="posterize.c">
  <function name="posterize_func" />
  <function name="posterize_bfp" />
</file>

<file name="text_tool.c">
  <function name="text_render" />
  <function name="text_gdk_image_to_region_bfp" />
</file>

<file name="trace.c">
  <function name="pixelrow_print" />
  <function name="print_area" />
</file>

<file name="transform_core.c">
  <function name="tm_interpolate_bfp" />
  <function name="tm_interpolate_funcs" />
</file>

<file name="xcf.c">
  <function name="xcf_save_row" />
  <function name="xcf_load_row" />
</file>

<file name="levels.c">
  <note>apart from functions add new array ui_strings_bfp[4][8] which contains strings for min and max values</note>
  <function name="levels_funcs" />

  <function name="levels_bfp"/>
  <function name="levels_calculate_transfers_bfp">
    <description>pre-calculates function vales into a LUT</description>
  </function>
  <function name="levels_input_da_setui_values_bfp"/>
  <function name="levels_output_da_setui_values_bfp" />
  <function name="levels_high_output_text_check_bfp" />
  <function name="levels_low_output_text_check_bfp" />
  <function name="levels_high_input_text_check_bfp" />
  <function name="levels_low_input_text_check_bfp" />
  <function name="levels_alloc_transfers_bfp" />
  <function name="levels_build_input_da_transfer_bfp" />
  <function name="levels_update_low_input_set_text_bfp" />
  <function name="levels_update_high_input_set_text_bfp" />
  <function name="levels_update_low_output_set_text_bfp" />
  <function name="levels_update_high_output_set_text_bfp" />
  <function name="levels_get_low_input_bfp" />
  <function name="levels_get_high_input_bfp" />
  <function name="levels_get_low_output_bfp" />
  <function name="levels_get_high_output_bfp" />
  <function name="levels_init_high_low_input_output_bfp" />
  <function name="levels_initialize: add select case to set bins=256 (same for all)" />
  <function name="levels_autolevels_callback: add select case" />
  <function name="levels_adjust_channel_bfp" />
</file>

<file name="paint_core_16.c">
  <function name="canvas_16_to_bfp" />
  <function name="paint_core_16_area_paste" />
  <function name="paint_core_16_area_replace "/>
  <function name="brush_solidify_mask_bfp" />
</file>

<file name="plug_in.h">
  <note>added new plug-in image types for bfp</note>
</file>

<file name="plug_in.c">
  <function name="tag_to_plugin_image_type" />
</file>

<file name="threshold.c">
  <function name="threshold_funcs" />
  <function name="threshold_bfp" />
  <function name="threshold_histogram_info_bfp" />
  <function name="threshold_histogram_range_bfp" />
  <function name="threshold_initialize" />
  <function name="threshold_new_dialog" />
  <function name="threshold_invoker" />
  <function name="threshold_low_threshold_text_update" />
  <function name="threshold_high_threshold_text_update" />
</file>

<file name="histogram.c">
  <function name="histogram_histogram_funcs" />
  <function name="histogram_histogram_info_bfp" />
  <function name="histogram_dialog_update_bfp" />
  <function name="histogram_histogram_range_bfp" />
</file>   

<file name="/wire/lib/precision.h">
  <note>introducing PRECISION_BFP tag-value</note>
</file>

<file name="/lib/wire/enum/enums.h">
  <note>new image types</note>
</file>
  
<file name="histogram_tool.c">
  <function name="histogram_invoker">
    <note>new select case for number of bins</note>
  </function>
  <function name="histogram_tool_initialize">
    <note>new select case to set number of bins</note>
  </function>
</file>

</root>


