diff options
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_colormanagement.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 8 | ||||
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/stereoimbuf.c | 42 |
4 files changed, 28 insertions, 26 deletions
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h index 785fa2b198a..7434db732fd 100644 --- a/source/blender/imbuf/IMB_colormanagement.h +++ b/source/blender/imbuf/IMB_colormanagement.h @@ -244,7 +244,7 @@ struct ImBuf *IMB_colormanagement_imbuf_for_write( bool allocate_result, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings, - struct ImageFormatData *image_format_data); + const struct ImageFormatData *image_format_data); void IMB_colormanagement_buffer_make_display_space( float *buffer, diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 8929a467670..0390df06052 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -965,13 +965,13 @@ void IMB_stereo3d_write_dimensions( char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height); void IMB_stereo3d_read_dimensions( char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height); -int *IMB_stereo3d_from_rect(struct ImageFormatData *im_format, +int *IMB_stereo3d_from_rect(const struct ImageFormatData *im_format, size_t x, size_t y, size_t channels, int *rect_left, int *rect_right); -float *IMB_stereo3d_from_rectf(struct ImageFormatData *im_format, +float *IMB_stereo3d_from_rectf(const struct ImageFormatData *im_format, size_t x, size_t y, size_t channels, @@ -980,13 +980,13 @@ float *IMB_stereo3d_from_rectf(struct ImageFormatData *im_format, /** * Left/right are always float. */ -struct ImBuf *IMB_stereo3d_ImBuf(struct ImageFormatData *im_format, +struct ImBuf *IMB_stereo3d_ImBuf(const struct ImageFormatData *im_format, struct ImBuf *ibuf_left, struct ImBuf *ibuf_right); /** * Reading a stereo encoded ibuf (*left) and generating two ibufs from it (*left and *right). */ -void IMB_ImBufFromStereo3d(struct Stereo3dFormat *s3d, +void IMB_ImBufFromStereo3d(const struct Stereo3dFormat *s3d, struct ImBuf *ibuf_stereo, struct ImBuf **r_ibuf_left, struct ImBuf **r_ibuf_right); diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index bf3e50b8870..e60df0ca1c9 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -2433,7 +2433,7 @@ ImBuf *IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, bool allocate_result, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, - ImageFormatData *image_format_data) + const ImageFormatData *image_format_data) { ImBuf *colormanaged_ibuf = ibuf; bool do_colormanagement; diff --git a/source/blender/imbuf/intern/stereoimbuf.c b/source/blender/imbuf/intern/stereoimbuf.c index c081ffb981a..52756891f21 100644 --- a/source/blender/imbuf/intern/stereoimbuf.c +++ b/source/blender/imbuf/intern/stereoimbuf.c @@ -28,8 +28,10 @@ /* prototypes */ struct Stereo3DData; -static void imb_stereo3d_write_doit(struct Stereo3DData *s3d_data, struct Stereo3dFormat *s3d); -static void imb_stereo3d_read_doit(struct Stereo3DData *s3d_data, struct Stereo3dFormat *s3d); +static void imb_stereo3d_write_doit(struct Stereo3DData *s3d_data, + const struct Stereo3dFormat *s3d); +static void imb_stereo3d_read_doit(struct Stereo3DData *s3d_data, + const struct Stereo3dFormat *s3d); typedef struct Stereo3DData { struct { @@ -46,7 +48,7 @@ typedef struct Stereo3DData { /** \name Local Functions * \{ */ -static void imb_stereo3d_write_anaglyph(Stereo3DData *s3d, enum eStereo3dAnaglyphType mode) +static void imb_stereo3d_write_anaglyph(const Stereo3DData *s3d, enum eStereo3dAnaglyphType mode) { int x, y; size_t width = s3d->x; @@ -144,7 +146,7 @@ static void imb_stereo3d_write_anaglyph(Stereo3DData *s3d, enum eStereo3dAnaglyp } } -static void imb_stereo3d_write_interlace(Stereo3DData *s3d, +static void imb_stereo3d_write_interlace(const Stereo3DData *s3d, enum eStereo3dInterlaceType mode, const bool swap) { @@ -402,7 +404,7 @@ static void imb_stereo3d_write_interlace(Stereo3DData *s3d, } /* stereo3d output (s3d->rectf.stereo) is always unsqueezed */ -static void imb_stereo3d_write_sidebyside(Stereo3DData *s3d, const bool crosseyed) +static void imb_stereo3d_write_sidebyside(const Stereo3DData *s3d, const bool crosseyed) { int y; size_t width = s3d->x; @@ -450,7 +452,7 @@ static void imb_stereo3d_write_sidebyside(Stereo3DData *s3d, const bool crosseye } /* stereo3d output (s3d->rectf.stereo) is always unsqueezed */ -static void imb_stereo3d_write_topbottom(Stereo3DData *s3d) +static void imb_stereo3d_write_topbottom(const Stereo3DData *s3d) { int y; size_t width = s3d->x; @@ -565,7 +567,7 @@ void IMB_stereo3d_read_dimensions(const char mode, * \{ */ static void imb_stereo3d_squeeze_ImBuf(ImBuf *ibuf, - Stereo3dFormat *s3d, + const Stereo3dFormat *s3d, const size_t x, const size_t y) { @@ -581,7 +583,7 @@ static void imb_stereo3d_squeeze_ImBuf(ImBuf *ibuf, } static void imb_stereo3d_unsqueeze_ImBuf(ImBuf *ibuf, - Stereo3dFormat *s3d, + const Stereo3dFormat *s3d, const size_t x, const size_t y) { @@ -597,7 +599,7 @@ static void imb_stereo3d_unsqueeze_ImBuf(ImBuf *ibuf, } static void imb_stereo3d_squeeze_rectf( - float *rectf, Stereo3dFormat *s3d, const size_t x, const size_t y, const size_t channels) + float *rectf, const Stereo3dFormat *s3d, const size_t x, const size_t y, const size_t channels) { ImBuf *ibuf; size_t width, height; @@ -631,7 +633,7 @@ static void imb_stereo3d_squeeze_rectf( } static void imb_stereo3d_squeeze_rect( - int *rect, Stereo3dFormat *s3d, const size_t x, const size_t y, const size_t channels) + int *rect, const Stereo3dFormat *s3d, const size_t x, const size_t y, const size_t channels) { ImBuf *ibuf; size_t width, height; @@ -693,7 +695,7 @@ static void imb_stereo3d_data_init(Stereo3DData *s3d_data, s3d_data->rectf.stereo = rectf_stereo; } -int *IMB_stereo3d_from_rect(ImageFormatData *im_format, +int *IMB_stereo3d_from_rect(const ImageFormatData *im_format, const size_t x, const size_t y, const size_t channels, @@ -717,7 +719,7 @@ int *IMB_stereo3d_from_rect(ImageFormatData *im_format, return r_rect; } -float *IMB_stereo3d_from_rectf(ImageFormatData *im_format, +float *IMB_stereo3d_from_rectf(const ImageFormatData *im_format, const size_t x, const size_t y, const size_t channels, @@ -741,7 +743,7 @@ float *IMB_stereo3d_from_rectf(ImageFormatData *im_format, return r_rectf; } -ImBuf *IMB_stereo3d_ImBuf(ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right) +ImBuf *IMB_stereo3d_ImBuf(const ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *ibuf_right) { ImBuf *ibuf_stereo = NULL; Stereo3DData s3d_data = {{NULL}}; @@ -776,7 +778,7 @@ ImBuf *IMB_stereo3d_ImBuf(ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *i return ibuf_stereo; } -static void imb_stereo3d_write_doit(Stereo3DData *s3d_data, Stereo3dFormat *s3d) +static void imb_stereo3d_write_doit(Stereo3DData *s3d_data, const Stereo3dFormat *s3d) { switch (s3d->display_mode) { case S3D_DISPLAY_ANAGLYPH: @@ -803,7 +805,7 @@ static void imb_stereo3d_write_doit(Stereo3DData *s3d_data, Stereo3dFormat *s3d) /** \name Reading Stereo ImBuf's * \{ */ -static void imb_stereo3d_read_anaglyph(Stereo3DData *s3d, enum eStereo3dAnaglyphType mode) +static void imb_stereo3d_read_anaglyph(const Stereo3DData *s3d, enum eStereo3dAnaglyphType mode) { int x, y; size_t width = s3d->x; @@ -901,7 +903,7 @@ static void imb_stereo3d_read_anaglyph(Stereo3DData *s3d, enum eStereo3dAnaglyph } } -static void imb_stereo3d_read_interlace(Stereo3DData *s3d, +static void imb_stereo3d_read_interlace(const Stereo3DData *s3d, enum eStereo3dInterlaceType mode, const bool swap) { @@ -1159,7 +1161,7 @@ static void imb_stereo3d_read_interlace(Stereo3DData *s3d, } /* stereo input (s3d->rectf.stereo) is always unsqueezed */ -static void imb_stereo3d_read_sidebyside(Stereo3DData *s3d, const bool crosseyed) +static void imb_stereo3d_read_sidebyside(const Stereo3DData *s3d, const bool crosseyed) { int y; size_t width = s3d->x; @@ -1208,7 +1210,7 @@ static void imb_stereo3d_read_sidebyside(Stereo3DData *s3d, const bool crosseyed } /* stereo input (s3d->rectf.stereo) is always unsqueezed */ -static void imb_stereo3d_read_topbottom(Stereo3DData *s3d) +static void imb_stereo3d_read_topbottom(const Stereo3DData *s3d) { int y; size_t width = s3d->x; @@ -1258,7 +1260,7 @@ static void imb_stereo3d_read_topbottom(Stereo3DData *s3d) /** \name Preparing To Call The Read Functions * \{ */ -void IMB_ImBufFromStereo3d(Stereo3dFormat *s3d, +void IMB_ImBufFromStereo3d(const Stereo3dFormat *s3d, ImBuf *ibuf_stereo3d, ImBuf **r_ibuf_left, ImBuf **r_ibuf_right) @@ -1337,7 +1339,7 @@ void IMB_ImBufFromStereo3d(Stereo3dFormat *s3d, *r_ibuf_right = ibuf_right; } -static void imb_stereo3d_read_doit(Stereo3DData *s3d_data, Stereo3dFormat *s3d) +static void imb_stereo3d_read_doit(Stereo3DData *s3d_data, const Stereo3dFormat *s3d) { switch (s3d->display_mode) { case S3D_DISPLAY_ANAGLYPH: |