Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-12-09 12:01:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-09 12:01:45 +0300
commit9f546d690899e05b25a6ef764cc8cf2f5db918b0 (patch)
tree77aa93445966f396a737e630e9a52b84a3b3d7e3 /source/blender/imbuf/intern/openexr
parent9e365069afe156f33fadfad9705e1325f894cd54 (diff)
Cleanup: move public doc-strings into headers for 'imbuf'
Ref T92709
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp15
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.h4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_multi.h27
3 files changed, 30 insertions, 16 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index adf09f8dda8..568bd48d863 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -327,10 +327,6 @@ static half float_to_half_safe(const float value)
extern "C" {
-/**
- * Test presence of OpenEXR file.
- * \param mem: pointer to loaded OpenEXR bitstream
- */
bool imb_is_a_openexr(const unsigned char *mem, const size_t size)
{
/* No define is exposed for this size. */
@@ -781,9 +777,6 @@ static void imb_exr_insert_view_name(char *name_full, const char *passname, cons
}
}
-/* adds flattened ExrChannels */
-/* xstride, ystride and rect can be done in set_channel too, for tile writing */
-/* passname does not include view */
void IMB_exr_add_channel(void *handle,
const char *layname,
const char *passname,
@@ -840,7 +833,6 @@ void IMB_exr_add_channel(void *handle,
BLI_addtail(&data->channels, echan);
}
-/* used for output files (from RenderResult) (single and multilayer, single and multiview) */
bool IMB_exr_begin_write(void *handle,
const char *filename,
int width,
@@ -896,8 +888,6 @@ bool IMB_exr_begin_write(void *handle,
return (data->ofile != nullptr);
}
-/* only used for writing temp. render results (not image files)
- * (FSA and Save Buffers) */
void IMB_exrtile_begin_write(
void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley)
{
@@ -963,7 +953,6 @@ void IMB_exrtile_begin_write(
}
}
-/* read from file */
bool IMB_exr_begin_read(
void *handle, const char *filename, int *width, int *height, const bool parse_channels)
{
@@ -1024,8 +1013,6 @@ bool IMB_exr_begin_read(
return true;
}
-/* still clumsy name handling, layers/channels can be ordered as list in list later */
-/* passname here is the raw channel name without the layer */
void IMB_exr_set_channel(
void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect)
{
@@ -1167,8 +1154,6 @@ void IMB_exr_write_channels(void *handle)
}
}
-/* temporary function, used for FSA and Save Buffers */
-/* called once per tile * view */
void IMB_exrtile_write_channels(
void *handle, int partx, int party, int level, const char *viewname, bool empty)
{
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h
index 940715690a7..2636bb0d820 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.h
+++ b/source/blender/imbuf/intern/openexr/openexr_api.h
@@ -32,6 +32,10 @@ extern "C" {
void imb_initopenexr(void);
void imb_exitopenexr(void);
+/**
+ * Test presence of OpenEXR file.
+ * \param mem: pointer to loaded OpenEXR bitstream
+ */
bool imb_is_a_openexr(const unsigned char *mem, const size_t size);
bool imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags);
diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h
index 82a5d161ded..7fb48a92bfd 100644
--- a/source/blender/imbuf/intern/openexr/openexr_multi.h
+++ b/source/blender/imbuf/intern/openexr/openexr_multi.h
@@ -23,7 +23,7 @@
#pragma once
-/* experiment with more advanced exr api */
+/* Experiment with more advanced EXR API. */
/* XXX layer+pass name max 64? */
/* This api also supports max 8 channels per pass now. easy to fix! */
@@ -41,6 +41,12 @@ struct StampData;
void *IMB_exr_get_handle(void);
void *IMB_exr_get_handle_name(const char *name);
+
+/**
+ * Adds flattened #ExrChannel's
+ * `xstride`, `ystride` and `rect` can be done in set_channel too, for tile writing.
+ * \param passname does not include view.
+ */
void IMB_exr_add_channel(void *handle,
const char *layname,
const char *passname,
@@ -50,17 +56,32 @@ void IMB_exr_add_channel(void *handle,
float *rect,
bool use_half_float);
+/**
+ * Read from file.
+ */
bool IMB_exr_begin_read(
void *handle, const char *filename, int *width, int *height, const bool parse_channels);
+/**
+ * Used for output files (from #RenderResult) (single and multi-layer, single and multi-view).
+ */
bool IMB_exr_begin_write(void *handle,
const char *filename,
int width,
int height,
int compress,
const struct StampData *stamp);
+/**
+ * Only used for writing temp. render results (not image files)
+ * (FSA and Save Buffers).
+ */
void IMB_exrtile_begin_write(
void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley);
+/**
+ * Still clumsy name handling, layers/channels can be ordered as list in list later.
+ *
+ * \param passname here is the raw channel name without the layer.
+ */
void IMB_exr_set_channel(void *handle,
const char *layname,
const char *passname,
@@ -74,6 +95,10 @@ float *IMB_exr_channel_rect(void *handle,
void IMB_exr_read_channels(void *handle);
void IMB_exr_write_channels(void *handle);
+/**
+ * Temporary function, used for FSA and Save Buffers.
+ * called once per `tile * view`.
+ */
void IMB_exrtile_write_channels(
void *handle, int partx, int party, int level, const char *viewname, bool empty);
void IMB_exr_clear_channels(void *handle);