Blender V4.3
iris.cc File Reference
#include <cstring>
#include "BLI_fileops.h"
#include "BLI_utildefines.h"
#include "MEM_guardedalloc.h"
#include "IMB_colormanagement.hh"
#include "IMB_filetype.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"

Go to the source code of this file.

Classes

struct  IMAGE
 
struct  MFileOffset
 

Macros

#define IMAGIC   0732
 
#define HEADER_SIZE   512
 
#define RINTLUM   (79)
 
#define GINTLUM   (156)
 
#define BINTLUM   (21)
 
#define ILUM(r, g, b)   (int(RINTLUM * (r) + GINTLUM * (g) + BINTLUM * (b)) >> 8)
 
#define OFFSET_R   0 /* this is byte order dependent */
 
#define OFFSET_G   1
 
#define OFFSET_B   2
 
#define CHANOFFSET(z)   (3 - (z)) /* this is byte order dependent */
 
#define BPPMASK   0x00ff
 
#define ITYPE_RLE   0x0100
 
#define ISRLE(type)   (((type) & 0xff00) == ITYPE_RLE)
 
#define BPP(type)   ((type) & BPPMASK)
 
#define RLE(bpp)   (ITYPE_RLE | (bpp))
 
#define MFILE_DATA(inf)   ((void)0, ((inf)->_file_data + (inf)->_file_offset))
 
#define MFILE_STEP(inf, step)
 
#define MFILE_SEEK(inf, pos)
 
#define DIRTY_FLAG_EOF   (1 << 0)
 
#define DIRTY_FLAG_ENCODING   (1 << 1)
 
#define GS(x)   (((uchar *)(x))[0] << 8 | ((uchar *)(x))[1])
 
#define GSS(x)   (((uchar *)(x))[1] << 8 | ((uchar *)(x))[0])
 
#define MFILE_CAPACITY_AT_PTR_OK_OR_FAIL(p)
 
#define MFILE_CAPACITY_AT_PTR_OK_OR_FAIL(p)
 
#define EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL(iptr_next)
 
#define EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL(optr_next)
 
#define EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL(iptr_next)
 
#define EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL(optr_next)
 

Functions

 BLI_STATIC_ASSERT (sizeof(IMAGE)==HEADER_SIZE, "Invalid header size")
 
static void readheader (MFileOffset *inf, IMAGE *image)
 
static int writeheader (FILE *outf, const IMAGE *image)
 
static ushort getshort (MFileOffset *inf)
 
static uint getlong (MFileOffset *mofs)
 
static void putshort (FILE *outf, ushort val)
 
static int putlong (FILE *outf, uint val)
 
static int writetab (FILE *outf, const uint *tab, int len)
 
static void readtab (MFileOffset *inf, uint *tab, int len)
 
static int expandrow (uchar *optr, const uchar *optr_end, const uchar *iptr, const uchar *iptr_end, int z)
 
static int expandrow2 (float *optr, const float *optr_end, const uchar *iptr, const uchar *iptr_end, int z)
 
static void interleaverow (uchar *lptr, const uchar *cptr, int z, int n)
 
static void interleaverow2 (float *lptr, const uchar *cptr, int z, int n)
 
static int compressrow (const uchar *lbuf, uchar *rlebuf, int z, int row_len)
 
static void lumrow (const uchar *rgbptr, uchar *lumptr, int n)
 
bool imb_is_a_iris (const uchar *mem, size_t size)
 
ImBufimb_loadiris (const uchar *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE])
 
static bool output_iris (const char *filepath, const uint *lptr, const int *zptr, const int xsize, const int ysize, const int zsize)
 
bool imb_saveiris (ImBuf *ibuf, const char *filepath, int)
 

Macro Definition Documentation

◆ BINTLUM

#define BINTLUM   (21)

Definition at line 44 of file iris.cc.

◆ BPP

#define BPP ( type)    ((type) & BPPMASK)

Definition at line 61 of file iris.cc.

Referenced by imb_loadiris().

◆ BPPMASK

#define BPPMASK   0x00ff

Definition at line 56 of file iris.cc.

◆ CHANOFFSET

#define CHANOFFSET ( z)    (3 - (z)) /* this is byte order dependent */

Definition at line 53 of file iris.cc.

Referenced by lumrow(), and output_iris().

◆ DIRTY_FLAG_ENCODING

#define DIRTY_FLAG_ENCODING   (1 << 1)

Definition at line 87 of file iris.cc.

Referenced by expandrow(), and expandrow2().

◆ DIRTY_FLAG_EOF

#define DIRTY_FLAG_EOF   (1 << 0)

Definition at line 86 of file iris.cc.

◆ EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL [1/2]

#define EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL ( iptr_next)
Value:
if (UNLIKELY(iptr_next > iptr_end)) { \
goto fail; \
} \
((void)0)
#define UNLIKELY(x)

Referenced by expandrow(), and expandrow2().

◆ EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL [2/2]

#define EXPAND_CAPACITY_AT_INPUT_OK_OR_FAIL ( iptr_next)
Value:
if (UNLIKELY(iptr_next > iptr_end)) { \
goto fail; \
} \
((void)0)

◆ EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL [1/2]

#define EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL ( optr_next)
Value:
if (UNLIKELY(optr_next > optr_end)) { \
goto fail; \
} \
((void)0)

Referenced by expandrow(), and expandrow2().

◆ EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL [2/2]

#define EXPAND_CAPACITY_AT_OUTPUT_OK_OR_FAIL ( optr_next)
Value:
if (UNLIKELY(optr_next > optr_end)) { \
goto fail; \
} \
((void)0)

◆ GINTLUM

#define GINTLUM   (156)

Definition at line 43 of file iris.cc.

◆ GS

#define GS ( x)    (((uchar *)(x))[0] << 8 | ((uchar *)(x))[1])

Definition at line 202 of file iris.cc.

Referenced by acf_fcurve_name(), acf_generic_group_offset(), achannel_is_part_of_disconnected_slot(), blender::bke::action_asset_metadata_ensure(), action_create_new(), action_idcode_patch_check(), action_slot_to_keylist(), blender::ed::viewer_path::activate_geometry_node(), blender::bke::id::IDRemapper::add(), blender::deg::DepsgraphRelationBuilder::add_depends_on_transform_relation(), add_driver_with_target(), blender::ed::outliner::AbstractTreeDisplay::add_element(), blender::deg::Depsgraph::add_id_node(), blender::deg::DepsgraphNodeBuilder::add_id_node(), blender::bke::id::IDRemapper::add_overwrite(), after_liblink_id_embedded_id_process(), after_liblink_id_process(), ANIM_channel_action_get(), ANIM_copy_as_driver(), animchan_sync_fcurve(), animchan_sync_fcurve_scene(), animchan_sync_group(), animchannels_delete_exec(), animdata_filter_dopesheet(), animdata_filter_ds_textures(), animfilter_modifier_idpoin_cb(), blender::ed::object::apply_objects_internal(), are_ids_from_different_mains_matching(), blender::bke::asset_edit_id_save_as(), blender::bke::asset_edit_weak_reference_from_id(), blender::bke::asset_reload(), blender::bke::bake::BakeDataBlockID::BakeDataBlockID(), BKE_animdata_action_ensure_idroot(), BKE_animdata_copy_id(), BKE_blendfile_append(), BKE_blendfile_library_relocate(), BKE_blendfile_read_make_empty(), BKE_id_attributes_active_color_clear(), BKE_id_attributes_active_color_name(), BKE_id_attributes_active_color_set(), BKE_id_attributes_default_color_name(), BKE_id_attributes_default_color_set(), BKE_id_blend_write(), BKE_id_can_be_asset(), BKE_id_copy_in_lib(), BKE_id_copy_is_allowed(), BKE_id_defgroup_list_get(), BKE_id_eval_properties_copy(), BKE_id_free_ex(), BKE_id_free_us(), BKE_id_is_in_main(), BKE_id_material_array_p(), BKE_id_material_len_p(), BKE_id_move_to_same_lib(), BKE_id_new_name_validate(), BKE_id_newptr_and_tag_clear(), BKE_id_rename(), BKE_id_supports_vertex_groups(), BKE_idtype_get_info_from_id(), BKE_idtype_id_foreach_cache(), BKE_key_add(), BKE_key_evaluate_object_ex(), BKE_key_from_id_p(), BKE_keyingset_add_path(), BKE_lattice_active_point_get(), BKE_lib_id_clear_library_data(), BKE_lib_id_make_local_generic(), BKE_lib_override_library_create_from_tag(), BKE_lib_override_library_id_is_user_deletable(), BKE_lib_override_library_main_operations_create(), BKE_lib_override_library_make_local(), BKE_lib_override_library_status_check_local(), BKE_lib_override_library_status_check_reference(), BKE_lib_override_library_update(), BKE_libblock_copy_in_lib(), BKE_libblock_management_main_add(), BKE_libblock_management_main_remove(), BKE_libblock_relink_ex(), BKE_libblock_relink_multiple(), BKE_libblock_rename(), BKE_library_id_can_use_filter_id(), BKE_library_ID_test_usages(), BKE_library_make_local(), BKE_light_linking_add_receiver_to_collection(), BKE_light_linking_add_receiver_to_collection_after(), BKE_light_linking_add_receiver_to_collection_before(), BKE_light_linking_unlink_id_from_collection(), BKE_main_id_refcount_recompute(), BKE_main_idmap_insert_id(), BKE_main_idmap_lookup_id(), BKE_main_idmap_remove_id(), BKE_main_library_weak_reference_add_item(), BKE_main_library_weak_reference_create(), BKE_main_library_weak_reference_remove_item(), BKE_main_library_weak_reference_update_item(), BKE_main_merge(), BKE_main_namemap_get_name(), BKE_mask_clipboard_paste_to_layer(), BKE_object_data_editmode_flush_ptr_get(), BKE_object_data_is_in_editmode(), BKE_object_data_select_update(), BKE_object_defgroup_array_get(), BKE_object_defgroup_data_create(), BKE_object_eval_assign_data(), BKE_object_free_derived_caches(), BKE_object_get_evaluated_lattice(), BKE_object_get_evaluated_mesh_no_subsurf_unchecked(), BKE_object_get_evaluated_mesh_unchecked(), BKE_object_get_lattice(), BKE_object_material_slot_used(), BKE_object_obdata_texspace_get(), BKE_object_obdata_to_type(), BKE_packedfile_id_check(), BKE_packedfile_id_unpack(), BKE_pose_ensure(), BKE_previewimg_id_get_p(), BKE_previewimg_id_supports_jobs(), BKE_ptcache_bake(), BKE_screen_path_from_screen_to_space(), blendfile_append_define_actions(), blendfile_library_relocate_remap(), blo_do_versions_300(), BLO_main_validate_embedded_flag(), BLO_main_validate_embedded_liboverrides(), BLO_main_validate_libraries(), BLO_main_validate_shapekeys(), blo_split_main(), blo_write_id_struct(), brush_asset_metadata_ensure(), blender::ed::sculpt_paint::brush_asset_revert_exec(), blender::deg::DepsgraphNodeBuilder::build_animation_images(), blender::deg::DepsgraphRelationBuilder::build_animation_images(), blender::deg::DepsgraphRelationBuilder::build_animdata_force(), blender::deg::DepsgraphRelationBuilder::build_copy_on_write_relations(), blender::deg::DepsgraphRelationBuilder::build_driver_data(), blender::deg::DepsgraphRelationBuilder::build_driver_rna_path_variable(), blender::deg::DepsgraphRelationBuilder::build_driver_variables(), blender::deg::DepsgraphNodeBuilder::build_id(), blender::deg::DepsgraphRelationBuilder::build_id(), blender::deg::DepsgraphNodeBuilder::build_nodetree(), blender::deg::DepsgraphRelationBuilder::build_nodetree(), blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock(), blender::deg::DepsgraphRelationBuilder::build_object_data_geometry_datablock(), blender::deg::DepsgraphNodeBuilder::build_parameters(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), blender::ed::outliner::TreeDisplayLibraries::build_tree(), buttons_context_path_texture(), buttons_texture_context_compute(), buttons_texture_users_from_context(), change_link_placeholder_to_real_ID_pointer_fd(), blender::deg::clear_id_nodes_conditional(), click_select_channel_action_slot(), click_select_channel_group(), blender::ed::outliner::collection_drop_init(), blender::ed::outliner::collection_drop_invoke(), blender::ed::outliner::collection_drop_tooltip(), blender::ed::outliner::collection_duplicate_exec(), collection_owner_pointer_get(), blender::ed::outliner::collection_parent_from_ID(), blender::deg::DepsgraphNodeBuilder::constraint_walk(), blender::deg::RNANodeQuery::construct_node_identifier(), copy_animedit_keys(), copy_mtex_copybuf(), blender::ed::object::copy_object_set_idnew(), blender::ed::outliner::TreeElementID::create_from_id(), createTransTexspace(), cryptomatte_init_from_node_image(), cryptomatte_init_from_node_render(), curve_to_mesh_eval_ensure(), blender::ed::object::data_xform_by_mat4(), blender::ed::object::data_xform_create_ex(), blender::ed::object::data_xform_destroy(), blender::ed::object::data_xform_restore(), blender::ed::object::data_xform_tag_update(), datadropper_id_sample_pt(), blender::deg::deg_eval_copy_is_needed(), blender::deg::deg_evaluate_object_modifiers_mode_node_visibility(), blender::deg::deg_evaluate_object_node_visibility(), blender::deg::deg_free_eval_copy_datablock(), blender::deg::deg_update_eval_copy_datablock(), delete_key_button_exec(), blender::animrig::delete_keyframe(), direct_link_id(), direct_link_id_embedded_id(), direct_link_id_restore_recalc_exceptions(), do_versions_after_linking_250(), driver_check_valid_targets(), drivers_path_rename_fix(), drw_call_calc_orco(), DRW_drawdata_ensure(), drw_drawdata_unlink_dupli(), duplicate_ids(), dvar_eval_locDiff(), dvar_eval_rotDiff(), dvar_eval_transChan(), ED_mesh_context(), ED_mesh_pick_face(), ED_mesh_pick_face_vert(), ED_mesh_pick_vert(), ED_node_set_active(), ED_node_shader_default(), ED_node_tag_update_id(), ED_preview_id_is_supported(), ED_preview_shader_job(), ED_render_id_flush_update(), ED_undo_is_legacy_compatible_for_property(), blender::deg::RNANodeQueryIDData::ensure_constraint_to_pchan_map(), blender::bke::NodeTreeRelations::ensure_group_node_users(), blender::ed::outliner::TreeElementIDArmature::expand(), expand_doit_library(), eyedropper_cryptomatte_sample_image_fl(), eyedropper_cryptomatte_sample_render_fl(), blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize(), filelist_readjob_main_assets_add_items(), find_area_properties(), find_bhead_from_idname(), blender::ed::object::find_first_by_data_id(), blender::ed::viewer_path::find_geometry_nodes_viewer(), find_object_with_preview_geometry(), blender::io::obj::find_or_create_collection(), blender::animrig::find_related_ids(), blender::deg::foreach_id_cow_detect_need_for_update_callback(), foreach_libblock_append_add_dependencies_callback(), foreach_libblock_link_append_common_processing(), foreach_libblock_link_finalize_cb(), foreach_libblock_remap_callback(), foreach_libblock_remap_callback_apply(), blender::ed::outliner::foreach_natural_hierarchy_child(), AttributeOwner::from_id(), blender::bke::AttributeAccessor::from_id(), gather_frames_to_render_for_id(), blender::ed::geometry::geometry_attribute_convert_poll(), blender::ed::geometry::geometry_color_attribute_convert_poll(), blender::deg::geometry_tag_to_component(), blender::nodes::get_default_id_getter(), get_drag_path(), blender::ed::outliner::get_element_operation_type(), blender::asset_system::AssetRepresentation::get_id_type(), blender::nodes::get_init_socket_fn(), blender::ed::space_node::get_modifier_for_node_editor(), blender::ed::space_node::get_nested_previews(), getname_anim_fcurve(), give_active_mtex(), graph_draw_driven_property_panel(), blender::deg::graph_id_tag_update(), graph_panel_driverVar__locDiff(), graph_panel_driverVar__rotDiff(), graph_panel_driverVar__transChan(), graph_panel_properties(), blender::deg::graph_tag_ids_for_visible_update(), icon_id_ensure_create_icon(), icon_preview_endjob(), icon_preview_startjob(), icon_preview_startjob_all_sizes(), icu_to_fcurves(), blender::animrig::id_action_ensure(), id_can_have_animdata(), id_can_have_drawdata(), id_check_type(), id_delete(), id_frame_has_keyframe(), id_free(), id_lib_extern(), id_lib_indirect_weak_link(), id_order_get(), blender::ed::outliner::id_override_library_clear_single_process(), blender::ed::outliner::id_override_library_create_hierarchy(), blender::ed::outliner::id_override_library_create_hierarchy_pre_process(), blender::ed::outliner::id_remap_fn(), id_search_cb_objects_from_scene(), id_single_user(), id_swap(), blender::ed::asset::id_type_is_non_experimental(), id_us_min(), idp_repr_fn_recursive(), idprop_ui_data_to_dict_id(), image_open_invoke(), image_walk_id_all_users(), imb_is_a_iris(), blender::ed::asset::AssetTemporaryIDConsumer::import_id(), blender::deg::IDNode::init(), blender::deg::IDNode::init_copy_on_write(), blender::deg::RuntimeBackup::init_from_id(), blender::ed::asset::index::init_indexer_entry_from_value(), blender::nodes::init_socket_cpp_value_from_property(), insert_fcurve_key(), insert_key_to_keying_set_path(), blender::ed::outliner::is_object_data_in_editmode(), blender::deg::DepsgraphRelationBuilder::is_same_nodetree_node_dependency(), blender::animrig::Slot::is_suitable_for(), jump_to_target_ptr(), key_block_get_data(), key_pointer_size(), blender::bke::greasepencil::convert::legacy_gpencil_object(), lib_id_expand_local_cb(), lib_id_fake_user_toggle_exec(), lib_override_hierarchy_dependencies_skip_check(), lib_override_id_swap(), lib_override_library_create_from(), lib_override_library_create_post_process(), lib_override_library_operations_create(), lib_override_library_resync(), lib_override_object_posemode_transfer(), lib_override_prefill_newid_from_existing_overrides(), lib_query_unused_ids_tag_id(), lib_query_unused_ids_tag_recurse(), libblock_relink_foreach_idpair(), libblock_remap_data_postprocess_obdata_relink(), libblock_remap_data_preprocess(), libblock_remap_foreach_idpair(), library_ID_is_used(), library_id_is_yet_read(), library_make_local_copying_check(), loose_data_instantiate_collection_process(), loose_data_instantiate_obdata_preprocess(), loose_data_instantiate_obdata_process(), loose_data_instantiate_object_process(), loose_data_instantiate_object_rigidbody_postprocess(), main_namemap_populate(), main_namemap_validate_and_fix(), make_dupli(), make_new_animlistelem(), blender::ed::object::make_override_library_exec(), material_data_index_clear_id(), material_data_index_remove_id(), memfile_undosys_step_decode(), memfile_undosys_step_id_reused_cb(), mesh_new_from_curve_type_object(), mesh_new_from_mesh_object(), blender::deg::DepsgraphNodeBuilder::modifier_walk(), mouse_action_keys(), blender::ed::outliner::namebutton_fn(), namemap_add_name(), namemap_remove_name(), nearest_world_object_fn(), nlaedit_add_actionclip_exec(), nlaedit_add_sound_exec(), blender::ed::space_node::node_context(), blender::ed::space_node::node_id_remap(), node_tree_from_ID(), blender::bke::node_tree_ptr_from_id(), ntree_version_245(), object_asset_metadata_ensure(), object_defgroup_lattice_get(), object_for_curve_to_mesh_free(), blender::ed::object::object_unlink_data_exec(), blender::ed::object::objects_in_mode_or_selected(), order_collection_receiver_after(), order_collection_receiver_before(), order_object_receiver_after(), order_object_receiver_before(), other_id_types_preview_render(), blender::ed::outliner::outliner_buttons(), blender::ed::outliner::outliner_collect_objects_to_delete(), blender::ed::outliner::outliner_collect_selected_collections(), blender::ed::outliner::outliner_collect_selected_objects(), blender::ed::outliner::outliner_collection_delete(), blender::ed::outliner::outliner_draw_userbuts(), blender::ed::outliner::outliner_id_remap_exec(), blender::ed::outliner::outliner_id_remap_find_tree_element(), blender::ed::outliner::outliner_item_drag_drop_invoke(), blender::ed::outliner::outliner_mode_toggle_fn(), OVERLAY_texture_space(), override_idtemplate_clear_exec(), blender::ed::outliner::parent_clear_invoke(), blender::ed::outliner::parent_clear_poll(), blender::ed::outliner::parent_drop_set_parents(), blender::ed::viewer_path::parse_geometry_nodes_viewer(), blender::ed::viewer_path::parse_object_only(), paste_material_nodetree_ids_relink_or_clear(), paste_mtex_copybuf(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), previews_clear_exec(), previews_id_ensure(), previews_id_ensure_callback(), ptcache_baker_create(), ptcache_cloth_error(), ptcache_filepath_ext_append(), pydriver_error(), pyrna_prop_repr_ex(), pyrna_struct_keyframe_delete(), pyrna_struct_repr(), raycast_obj_fn(), read_libblock(), read_libblock_undo_restore_at_old_address(), read_libblock_undo_restore_identical(), read_libblock_undo_restore_linked(), read_library_linked_id(), read_undo_move_libmain_data(), blender::animrig::internal::rebuild_slot_user_cache(), blender::deg::RuntimeBackup::restore_to_id(), blender::deg::ObjectRuntimeBackup::restore_to_object(), reuse_bmain_move_id(), reuse_editable_asset_bmain_data_dependencies_process_cb(), RNA_find_real_ID_and_path(), rna_id_itemf(), rna_id_write_error(), RNA_path_full_ID_py(), rna_property_override_property_real_id_owner(), rna_property_update(), RNA_struct_override_matches(), blender::ui::sample_data_from_outliner(), blender::ed::object::select_linked_by_id(), select_pchan_for_action_group(), blender::ed::space_node::send_notifiers_after_tree_change(), sequencer_drop_copy(), sequencer_write_copy_paste_file(), set_active_mtex(), set_trans_object_base_deps_flag_cb(), setup_app_data(), blender::ed::object::shade_auto_smooth_exec(), blender::ed::object::shade_smooth_exec(), shader_preview_render(), skip_fcurve_selected_data(), blender::animrig::Action::slot_add_for_id(), blender::animrig::Action::slot_setup_for_id(), snap_edge_points(), snap_obj_fn(), snap_polygon(), solve_camera_freejob(), blender::bke::greasepencil::convert::AnimDataConvertor::source_has_animation_to_convert(), split_libdata(), blender::ed::spreadsheet::spreadsheet_get_object_eval(), template_add_button_search_menu(), template_ID(), template_id_cb(), template_id_liboverride_hierarchy_collections_tag_recursive(), blender::animrig::tests::TEST_F(), blender::ed::outliner::tree_element_get_icon_from_id(), blender::ed::outliner::TreeElementID::TreeElementID(), blender::ed::outliner::TreeElementLinkedNodeTree::TreeElementLinkedNodeTree(), blender::ed::outliner::TreeElementLinkedObject::TreeElementLinkedObject(), ui_but_anim_expression_create(), ui_but_event_property_operator_string(), UI_context_copy_to_selected_list(), ui_icon_ensure_deferred(), UI_icon_from_id(), UI_icon_render_id(), ui_id_icon_get(), ui_template_id_liboverride_hierarchy_make(), ui_tooltip_data_from_search_item_tooltip_data(), uiTemplateBoneCollectionTree(), uiTemplateConstraintHeader(), uiTemplateImageSettings(), uiTemplatePreview(), undosys_id_ref_resolve(), blender::ed::outliner::unlink_collection_fn(), blender::ed::outliner::unlink_material_fn(), blender::ed::outliner::unlink_object_fn(), blender::ed::outliner::unlink_texture_fn(), unpack_generate_paths(), blender::update_depsgraph(), version_bonegroup_migrate_color(), blender::ed::object::vgroup_parray_alloc(), view3d_drop_id_in_main_region_poll_get_id_type(), view3d_id_drop_copy_with_type(), blender::ed::viewer_path::viewer_path_for_geometry_node(), wm_context_member_from_ptr(), WM_drag_add_local_ID(), WM_drag_get_item_name(), WM_drag_get_local_ID(), workspace_context_get(), write_file_handle(), write_id_direct_linked_data_process_cb(), blender::io::usd::USDAbstractWriter::write_id_properties(), and write_libraries().

◆ GSS

#define GSS ( x)    (((uchar *)(x))[1] << 8 | ((uchar *)(x))[0])

Definition at line 205 of file iris.cc.

Referenced by imb_is_a_iris().

◆ HEADER_SIZE

#define HEADER_SIZE   512

Definition at line 38 of file iris.cc.

Referenced by imb_loadiris(), and output_iris().

◆ ILUM

#define ILUM ( r,
g,
b )   (int(RINTLUM * (r) + GINTLUM * (g) + BINTLUM * (b)) >> 8)

Definition at line 46 of file iris.cc.

Referenced by lumrow().

◆ IMAGIC

#define IMAGIC   0732

Definition at line 21 of file iris.cc.

Referenced by imb_is_a_iris(), imb_loadiris(), and output_iris().

◆ ISRLE

#define ISRLE ( type)    (((type) & 0xff00) == ITYPE_RLE)

Definition at line 59 of file iris.cc.

Referenced by imb_loadiris().

◆ ITYPE_RLE

#define ITYPE_RLE   0x0100

Definition at line 58 of file iris.cc.

◆ MFILE_CAPACITY_AT_PTR_OK_OR_FAIL [1/2]

#define MFILE_CAPACITY_AT_PTR_OK_OR_FAIL ( p)
Value:
if (UNLIKELY((p) > mem_end)) { \
dirty_flag |= DIRTY_FLAG_EOF; \
goto fail_rle; \
} \
((void)0)
#define DIRTY_FLAG_EOF
Definition iris.cc:86

Referenced by imb_loadiris().

◆ MFILE_CAPACITY_AT_PTR_OK_OR_FAIL [2/2]

#define MFILE_CAPACITY_AT_PTR_OK_OR_FAIL ( p)
Value:
if (UNLIKELY((p) > mem_end)) { \
dirty_flag |= DIRTY_FLAG_EOF; \
goto fail_uncompressed; \
} \
((void)0)

◆ MFILE_DATA

#define MFILE_DATA ( inf)    ((void)0, ((inf)->_file_data + (inf)->_file_offset))

Definition at line 73 of file iris.cc.

Referenced by getlong(), getshort(), and imb_loadiris().

◆ MFILE_SEEK

#define MFILE_SEEK ( inf,
pos )
Value:
{ \
(inf)->_file_offset = pos; \
} \
((void)0)

Definition at line 79 of file iris.cc.

Referenced by imb_loadiris().

◆ MFILE_STEP

#define MFILE_STEP ( inf,
step )
Value:
{ \
(inf)->_file_offset += step; \
} \
((void)0)

Definition at line 74 of file iris.cc.

Referenced by getlong(), getshort(), and imb_loadiris().

◆ OFFSET_B

#define OFFSET_B   2

Definition at line 50 of file iris.cc.

Referenced by lumrow().

◆ OFFSET_G

#define OFFSET_G   1

Definition at line 49 of file iris.cc.

Referenced by lumrow().

◆ OFFSET_R

#define OFFSET_R   0 /* this is byte order dependent */

Definition at line 48 of file iris.cc.

Referenced by lumrow().

◆ RINTLUM

#define RINTLUM   (79)

Definition at line 42 of file iris.cc.

◆ RLE

#define RLE ( bpp)    (ITYPE_RLE | (bpp))

Definition at line 62 of file iris.cc.

Referenced by output_iris().

Function Documentation

◆ BLI_STATIC_ASSERT()

BLI_STATIC_ASSERT ( sizeof(IMAGE) = =HEADER_SIZE,
"Invalid header size"  )

◆ compressrow()

static int compressrow ( const uchar * lbuf,
uchar * rlebuf,
int z,
int row_len )
static

Definition at line 870 of file iris.cc.

References count, and z().

Referenced by output_iris().

◆ expandrow()

static int expandrow ( uchar * optr,
const uchar * optr_end,
const uchar * iptr,
const uchar * iptr_end,
int z )
static

◆ expandrow2()

static int expandrow2 ( float * optr,
const float * optr_end,
const uchar * iptr,
const uchar * iptr_end,
int z )
static

◆ getlong()

static uint getlong ( MFileOffset * mofs)
static

Definition at line 123 of file iris.cc.

References MFILE_DATA, and MFILE_STEP.

Referenced by readtab().

◆ getshort()

static ushort getshort ( MFileOffset * inf)
static

Definition at line 113 of file iris.cc.

References MFILE_DATA, and MFILE_STEP.

Referenced by readheader().

◆ imb_is_a_iris()

bool imb_is_a_iris ( const uchar * mem,
size_t size )

Definition at line 207 of file iris.cc.

References GS, GSS, and IMAGIC.

Referenced by imb_loadiris().

◆ imb_loadiris()

◆ imb_saveiris()

bool imb_saveiris ( ImBuf * ibuf,
const char * filepath,
int flags )

◆ interleaverow()

static void interleaverow ( uchar * lptr,
const uchar * cptr,
int z,
int n )
static

Definition at line 559 of file iris.cc.

References z().

Referenced by imb_loadiris().

◆ interleaverow2()

static void interleaverow2 ( float * lptr,
const uchar * cptr,
int z,
int n )
static

Definition at line 568 of file iris.cc.

References z().

Referenced by imb_loadiris().

◆ lumrow()

static void lumrow ( const uchar * rgbptr,
uchar * lumptr,
int n )
static

Definition at line 860 of file iris.cc.

References CHANOFFSET, ILUM, OFFSET_B, OFFSET_G, and OFFSET_R.

Referenced by output_iris().

◆ output_iris()

static bool output_iris ( const char * filepath,
const uint * lptr,
const int * zptr,
const int xsize,
const int ysize,
const int zsize )
static
Parameters
filepathThe file path to write to.
lptran array of integers to an iris image file (each int represents one pixel).
zptrdepth-buffer (optional, may be nullptr).
xsizewith width of the pixel-array.
ysizeheight of the pixel-array.
zsizespecifies what kind of image file to write out.
  • 1: the luminance of the pixels are calculated, and a single channel black and white image is saved.
  • 3: an RGB image file is saved.
  • 4: an RGBA image file is saved.
  • 8: an RGBA image and a Z-buffer (non-null zptr).

Definition at line 764 of file iris.cc.

References BLI_assert_msg, BLI_fopen(), CHANOFFSET, compressrow(), HEADER_SIZE, image(), IMAGIC, int, len, lumrow(), MEM_freeN(), MEM_mallocN, pos, RLE, writeheader(), writetab(), y, and z().

Referenced by imb_saveiris().

◆ putlong()

static int putlong ( FILE * outf,
uint val )
static

Definition at line 142 of file iris.cc.

Referenced by writeheader(), and writetab().

◆ putshort()

static void putshort ( FILE * outf,
ushort val )
static

Definition at line 133 of file iris.cc.

Referenced by writeheader().

◆ readheader()

static void readheader ( MFileOffset * inf,
IMAGE * image )
static

Definition at line 153 of file iris.cc.

References getshort().

Referenced by imb_loadiris().

◆ readtab()

static void readtab ( MFileOffset * inf,
uint * tab,
int len )
static

Definition at line 193 of file iris.cc.

References getlong(), and len.

Referenced by imb_loadiris().

◆ writeheader()

static int writeheader ( FILE * outf,
const IMAGE * image )
static

Definition at line 164 of file iris.cc.

References putlong(), and putshort().

Referenced by output_iris().

◆ writetab()

static int writetab ( FILE * outf,
const uint * tab,
int len )
static

Definition at line 182 of file iris.cc.

References len, and putlong().

Referenced by output_iris().