[Bf-blender-cvs] [c207f7c22e1] master: Cleanup: use doxy sections for imbuf
Campbell Barton
noreply at git.blender.org
Mon Sep 14 10:00:26 CEST 2020
Commit: c207f7c22e1439e0b285fba5d2c072bdae23f981
Author: Campbell Barton
Date: Mon Sep 14 16:11:13 2020 +1000
Branches: master
https://developer.blender.org/rBc207f7c22e1439e0b285fba5d2c072bdae23f981
Cleanup: use doxy sections for imbuf
===================================================================
M source/blender/imbuf/intern/cache.c
M source/blender/imbuf/intern/colormanagement.c
M source/blender/imbuf/intern/divers.c
M source/blender/imbuf/intern/imageprocess.c
M source/blender/imbuf/intern/stereoimbuf.c
M source/blender/imbuf/intern/tiff.c
===================================================================
diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c
index 23ce9bd7818..02d1fe3710a 100644
--- a/source/blender/imbuf/intern/cache.c
+++ b/source/blender/imbuf/intern/cache.c
@@ -32,6 +32,10 @@
#include "imbuf.h"
+/* -------------------------------------------------------------------- */
+/** \name Local Structs
+ * \{ */
+
/* We use a two level cache here. A per-thread cache with limited number of
* tiles. This can be accessed without locking and so is hoped to lead to most
* tile access being lock-free. The global cache is shared between all threads
@@ -85,7 +89,11 @@ typedef struct ImGlobalTileCache {
static ImGlobalTileCache GLOBAL_CACHE;
-/***************************** Hash Functions ********************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Hash Functions
+ * \{ */
static unsigned int imb_global_tile_hash(const void *gtile_p)
{
@@ -117,7 +125,11 @@ static bool imb_thread_tile_cmp(const void *a_p, const void *b_p)
return ((a->ibuf != b->ibuf) || (a->tx != b->tx) || (a->ty != b->ty));
}
-/******************************** Load/Unload ********************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Load/Unload
+ * \{ */
static void imb_global_cache_tile_load(ImGlobalTile *gtile)
{
@@ -167,7 +179,11 @@ void imb_tile_cache_tile_free(ImBuf *ibuf, int tx, int ty)
BLI_mutex_unlock(&GLOBAL_CACHE.mutex);
}
-/******************************* Init/Exit ***********************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Init/Exit
+ * \{ */
static void imb_thread_cache_init(ImThreadTileCache *cache)
{
@@ -265,7 +281,11 @@ void IMB_tile_cache_params(int totthread, int maxmem)
BLI_mutex_init(&GLOBAL_CACHE.mutex);
}
-/***************************** Global Cache **********************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Global Cache
+ * \{ */
static ImGlobalTile *imb_global_cache_get_tile(ImBuf *ibuf,
int tx,
@@ -353,7 +373,11 @@ static ImGlobalTile *imb_global_cache_get_tile(ImBuf *ibuf,
return gtile;
}
-/***************************** Per-Thread Cache ******************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Per-Thread Cache
+ * \{ */
static unsigned int *imb_thread_cache_get_tile(ImThreadTileCache *cache,
ImBuf *ibuf,
@@ -465,3 +489,5 @@ void IMB_tiles_to_rect(ImBuf *ibuf)
}
}
}
+
+/** \} */
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 6dd4d14cbc7..00dbd539410 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -60,7 +60,9 @@
#include <ocio_capi.h>
-/*********************** Global declarations *************************/
+/* -------------------------------------------------------------------- */
+/** \name Global declarations
+ * \{ */
#define DISPLAY_BUFFER_CHANNELS 4
@@ -135,9 +137,14 @@ static struct global_color_picking_state {
bool failed;
} global_color_picking_state = {NULL};
-/*********************** Color managed cache *************************/
+/** \} */
-/* Cache Implementation Notes
+/* -------------------------------------------------------------------- */
+/** \name Color Managed Cache
+ * \{ */
+
+/**
+ * Cache Implementation Notes
* ==========================
*
* All color management cache stuff is stored in two properties of
@@ -459,7 +466,11 @@ static void colormanage_cache_handle_release(void *cache_handle)
IMB_freeImBuf(cache_ibuf);
}
-/*********************** Initialization / De-initialization *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Initialization / De-initialization
+ * \{ */
static void colormanage_role_color_space_name_get(OCIO_ConstConfigRcPtr *config,
char *colorspace_name,
@@ -749,7 +760,11 @@ void colormanagement_exit(void)
colormanage_free_config();
}
-/*********************** Internal functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Internal functions
+ * \{ */
static bool colormanage_compatible_look(ColorManagedLook *look, const char *view_name)
{
@@ -1119,7 +1134,11 @@ void colormanage_imbuf_make_linear(ImBuf *ibuf, const char *from_colorspace)
}
}
-/*********************** Generic functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Generic Functions
+ * \{ */
static void colormanage_check_display_settings(ColorManagedDisplaySettings *display_settings,
const char *what,
@@ -1459,7 +1478,11 @@ const float *IMB_colormangement_get_xyz_to_rgb()
return &imbuf_xyz_to_rgb[0][0];
}
-/*********************** Threaded display buffer transform routines *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Threaded Display Buffer Transform Routines
+ * \{ */
typedef struct DisplayBufferThread {
ColormanageProcessor *cm_processor;
@@ -1827,7 +1850,11 @@ static void colormanage_display_buffer_process(ImBuf *ibuf,
ibuf, NULL, display_buffer, view_settings, display_settings);
}
-/*********************** Threaded processor transform routines *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Threaded Processor Transform Routines
+ * \{ */
typedef struct ProcessorTransformThread {
ColormanageProcessor *cm_processor;
@@ -1955,7 +1982,11 @@ static void processor_transform_apply_threaded(unsigned char *byte_buffer,
do_processor_transform_thread);
}
-/*********************** Color space transformation functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Color Space Transformation Functions
+ * \{ */
/* Convert the whole buffer from specified by name color space to another -
* internal implementation. */
@@ -2667,7 +2698,11 @@ void IMB_colormanagement_buffer_make_display_space(
IMB_colormanagement_processor_free(cm_processor);
}
-/*********************** Public display buffers interfaces *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Public Display Buffers Interfaces
+ * \{ */
/* acquire display buffer for given image buffer using specified view and display settings */
unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf,
@@ -2825,7 +2860,11 @@ void IMB_display_buffer_release(void *cache_handle)
}
}
-/*********************** Display functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Display Functions
+ * \{ */
const char *colormanage_display_get_default_name(void)
{
@@ -2945,7 +2984,11 @@ const char *IMB_colormanagement_display_get_default_view_transform_name(
return colormanage_view_get_default_name(display);
}
-/*********************** View functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View Functions
+ * \{ */
const char *colormanage_view_get_default_name(const ColorManagedDisplay *display)
{
@@ -3059,7 +3102,11 @@ const char *IMB_colormanagement_view_get_default_name(const char *display_name)
return NULL;
}
-/*********************** Color space functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Color Space Functions
+ * \{ */
static void colormanage_description_strip(char *description)
{
@@ -3203,7 +3250,11 @@ void IMB_colormanagement_colorspace_from_ibuf_ftype(
}
}
-/*********************** Looks functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Looks Functions
+ * \{ */
ColorManagedLook *colormanage_look_add(const char *name, const char *process_space, bool is_noop)
{
@@ -3276,7 +3327,11 @@ const char *IMB_colormanagement_look_get_indexed_name(int index)
return NULL;
}
-/*********************** RNA helper functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name RNA Helper Functions
+ * \{ */
void IMB_colormanagement_display_items_add(EnumPropertyItem **items, int *totitem)
{
@@ -3372,7 +3427,11 @@ void IMB_colormanagement_colorspace_items_add(EnumPropertyItem **items, int *tot
}
}
-/*********************** Partial display buffer update *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Partial Display Buffer Update
+ * \{ */
/*
* Partial display update is supposed to be used by such areas as
@@ -3750,7 +3809,11 @@ void IMB_partial_display_buffer_update_delayed(ImBuf *ibuf, int xmin, int ymin,
}
}
-/*********************** Pixel processor functions *************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Pixel Processor Functions
+ * \{ */
ColormanageProcessor *IMB_colormanagement_display_processor_new(
const ColorManagedViewSettings *view_settings,
@@ -4172,3 +4235,5 @@ void IMB_colormanagement_finish_glsl_draw(void)
OCIO_finishGLSLDraw(global_glsl_state.ocio_glsl_state);
}
}
+
+/** \} */
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 798849f2dd4..5f580449e12 100644
--- a/source/blend
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list