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:
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/IMB_allocimbuf.h8
-rw-r--r--source/blender/imbuf/intern/IMB_colormanagement_intern.h8
-rw-r--r--source/blender/imbuf/intern/cineon/cineonlib.h4
-rw-r--r--source/blender/imbuf/intern/cineon/dpxlib.h4
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp6
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.h4
-rw-r--r--source/blender/imbuf/intern/imageprocess.c16
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.cpp2
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.h4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp10
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.h4
11 files changed, 37 insertions, 33 deletions
diff --git a/source/blender/imbuf/intern/IMB_allocimbuf.h b/source/blender/imbuf/intern/IMB_allocimbuf.h
index c252a9a63f8..9f89969cf1c 100644
--- a/source/blender/imbuf/intern/IMB_allocimbuf.h
+++ b/source/blender/imbuf/intern/IMB_allocimbuf.h
@@ -24,6 +24,10 @@
#ifndef __IMB_ALLOCIMBUF_H__
#define __IMB_ALLOCIMBUF_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct ImBuf;
void imb_refcounter_lock_init(void);
@@ -44,4 +48,8 @@ void imb_mmap_unlock(void);
bool imb_addencodedbufferImBuf(struct ImBuf *ibuf);
bool imb_enlargeencodedbufferImBuf(struct ImBuf *ibuf);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/imbuf/intern/IMB_colormanagement_intern.h b/source/blender/imbuf/intern/IMB_colormanagement_intern.h
index f0e599c1375..79abe8472b9 100644
--- a/source/blender/imbuf/intern/IMB_colormanagement_intern.h
+++ b/source/blender/imbuf/intern/IMB_colormanagement_intern.h
@@ -27,6 +27,10 @@
#include "BLI_sys_types.h"
#include "DNA_listBase.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct ImBuf;
struct OCIO_ConstProcessorRcPtr;
@@ -123,4 +127,8 @@ void colorspace_set_default_role(char *colorspace, int size, int role);
void colormanage_imbuf_set_default_spaces(struct ImBuf *ibuf);
void colormanage_imbuf_make_linear(struct ImBuf *ibuf, const char *from_colorspace);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __IMB_COLORMANAGEMENT_INTERN_H__ */
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.h b/source/blender/imbuf/intern/cineon/cineonlib.h
index 461407fcf25..040435e44ee 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.h
+++ b/source/blender/imbuf/intern/cineon/cineonlib.h
@@ -26,12 +26,12 @@
#ifndef __CINEONLIB_H__
#define __CINEONLIB_H__
+#include "logImageCore.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "logImageCore.h"
-
#define CINEON_FILE_MAGIC 0x802A5FD7
#define CINEON_UNDEFINED_U8 0xFF
#define CINEON_UNDEFINED_U16 0xFFFF
diff --git a/source/blender/imbuf/intern/cineon/dpxlib.h b/source/blender/imbuf/intern/cineon/dpxlib.h
index bf07b8e329d..3a7ebe9dddf 100644
--- a/source/blender/imbuf/intern/cineon/dpxlib.h
+++ b/source/blender/imbuf/intern/cineon/dpxlib.h
@@ -25,12 +25,12 @@
#ifndef __DPXLIB_H__
#define __DPXLIB_H__
+#include "logImageCore.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "logImageCore.h"
-
#define DPX_FILE_MAGIC 0x53445058
#define DPX_UNDEFINED_U8 0xFF
#define DPX_UNDEFINED_U16 0xFFFF
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index 832b380bbc2..83d304203a0 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -18,9 +18,7 @@
* \ingroup imbdds
*/
-extern "C" {
#include "BLI_utildefines.h"
-}
#include <DirectDrawSurface.h>
#include <FlipDXT.h>
@@ -34,8 +32,6 @@ extern "C" {
# include "utfconv.h"
#endif
-extern "C" {
-
#include "IMB_allocimbuf.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
@@ -44,6 +40,8 @@ extern "C" {
#include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h"
+extern "C" {
+
int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/)
{
return (0); /* todo: finish this function */
diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h
index 12db8aa6416..e6782e217fc 100644
--- a/source/blender/imbuf/intern/dds/dds_api.h
+++ b/source/blender/imbuf/intern/dds/dds_api.h
@@ -21,12 +21,12 @@
#ifndef __DDS_API_H__
#define __DDS_API_H__
+#include "../../IMB_imbuf.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "../../IMB_imbuf.h"
-
int imb_is_a_dds(const unsigned char *mem); /* use only first 32 bytes of mem */
int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags);
struct ImBuf *imb_load_dds(const unsigned char *mem,
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index aa82487d69f..7ebbd1a7409 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -338,9 +338,9 @@ void nearest_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, in
/*********************** Threaded image processing *************************/
-static void processor_apply_func(TaskPool *__restrict pool, void *taskdata, int UNUSED(threadid))
+static void processor_apply_func(TaskPool *__restrict pool, void *taskdata)
{
- void (*do_thread)(void *) = (void (*)(void *))BLI_task_pool_userdata(pool);
+ void (*do_thread)(void *) = (void (*)(void *))BLI_task_pool_user_data(pool);
do_thread(taskdata);
}
@@ -353,14 +353,13 @@ void IMB_processor_apply_threaded(
{
const int lines_per_task = 64;
- TaskScheduler *task_scheduler = BLI_task_scheduler_get();
TaskPool *task_pool;
void *handles;
int total_tasks = (buffer_lines + lines_per_task - 1) / lines_per_task;
int i, start_line;
- task_pool = BLI_task_pool_create(task_scheduler, do_thread, TASK_PRIORITY_LOW);
+ task_pool = BLI_task_pool_create(do_thread, TASK_PRIORITY_LOW);
handles = MEM_callocN(handle_size * total_tasks, "processor apply threaded handles");
@@ -399,11 +398,9 @@ typedef struct ScanlineGlobalData {
int total_scanlines;
} ScanlineGlobalData;
-static void processor_apply_scanline_func(TaskPool *__restrict pool,
- void *taskdata,
- int UNUSED(threadid))
+static void processor_apply_scanline_func(TaskPool *__restrict pool, void *taskdata)
{
- ScanlineGlobalData *data = BLI_task_pool_userdata(pool);
+ ScanlineGlobalData *data = BLI_task_pool_user_data(pool);
int start_scanline = POINTER_AS_INT(taskdata);
int num_scanlines = min_ii(data->scanlines_per_task, data->total_scanlines - start_scanline);
data->do_thread(data->custom_data, start_scanline, num_scanlines);
@@ -420,8 +417,7 @@ void IMB_processor_apply_threaded_scanlines(int total_scanlines,
data.scanlines_per_task = scanlines_per_task;
data.total_scanlines = total_scanlines;
const int total_tasks = (total_scanlines + scanlines_per_task - 1) / scanlines_per_task;
- TaskScheduler *task_scheduler = BLI_task_scheduler_get();
- TaskPool *task_pool = BLI_task_pool_create(task_scheduler, &data, TASK_PRIORITY_LOW);
+ TaskPool *task_pool = BLI_task_pool_create(&data, TASK_PRIORITY_LOW);
for (int i = 0, start_line = 0; i < total_tasks; i++) {
BLI_task_pool_push(
task_pool, processor_apply_scanline_func, POINTER_FROM_INT(start_line), false, NULL);
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
index 6d3234771e7..df51aada5f0 100644
--- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
@@ -35,7 +35,6 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_blenlib.h"
#include "IMB_allocimbuf.h"
@@ -43,7 +42,6 @@ extern "C" {
#include "IMB_colormanagement_intern.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-}
OIIO_NAMESPACE_USING
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.h b/source/blender/imbuf/intern/oiio/openimageio_api.h
index 520ad0c5da5..3dd089d65cb 100644
--- a/source/blender/imbuf/intern/oiio/openimageio_api.h
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.h
@@ -24,12 +24,12 @@
#ifndef __OPENIMAGEIO_API_H__
#define __OPENIMAGEIO_API_H__
+#include <stdio.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdio.h>
-
struct ImBuf;
int imb_is_a_photoshop(const char *name);
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index a1719895853..62cc2e605e5 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -75,7 +75,7 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
{
}
#endif
-
+}
#include "BLI_blenlib.h"
#include "BLI_math_color.h"
#include "BLI_threads.h"
@@ -84,17 +84,13 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
#include "BKE_image.h"
#include "IMB_allocimbuf.h"
+#include "IMB_colormanagement.h"
+#include "IMB_colormanagement_intern.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_metadata.h"
#include "openexr_multi.h"
-}
-
-extern "C" {
-#include "IMB_colormanagement.h"
-#include "IMB_colormanagement_intern.h"
-}
using namespace Imf;
using namespace Imath;
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h
index df03d0d205f..b0835e5082e 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.h
+++ b/source/blender/imbuf/intern/openexr/openexr_api.h
@@ -24,12 +24,12 @@
#ifndef __OPENEXR_API_H__
#define __OPENEXR_API_H__
+#include <stdio.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <stdio.h>
-
void imb_initopenexr(void);
void imb_exitopenexr(void);