diff options
Diffstat (limited to 'source/blender/imbuf/intern/cineon')
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineon_dpx.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cineon/logImageCore.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index 18942c9abb8..50785d7a857 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -139,7 +139,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon /* don't use the float buffer to save 8 bpp picture to prevent color banding * (there's no dithering algorithm behind the logImageSetDataRGBA function) */ - fbuf = (float *)MEM_mallocN(ibuf->x * ibuf->y * 4 * sizeof(float), + fbuf = (float *)MEM_mallocN(sizeof(float[4]) * ibuf->x * ibuf->y, "fbuf in imb_save_dpx_cineon"); for (y = 0; y < ibuf->y; y++) { @@ -158,7 +158,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon IMB_rect_from_float(ibuf); } - fbuf = (float *)MEM_mallocN(ibuf->x * ibuf->y * 4 * sizeof(float), + fbuf = (float *)MEM_mallocN(sizeof(float[4]) * ibuf->x * ibuf->y, "fbuf in imb_save_dpx_cineon"); if (fbuf == NULL) { printf("DPX/Cineon: error allocating memory.\n"); diff --git a/source/blender/imbuf/intern/cineon/logImageCore.c b/source/blender/imbuf/intern/cineon/logImageCore.c index 362a558b505..6a81abd96e3 100644 --- a/source/blender/imbuf/intern/cineon/logImageCore.c +++ b/source/blender/imbuf/intern/cineon/logImageCore.c @@ -483,7 +483,7 @@ int logImageGetDataRGBA(LogImageFile *logImage, float *data, int dataIsLinearRGB memcpy(&mergedElement, &logImage->element[0], sizeof(LogImageElement)); mergedElement.descriptor = -1; mergedElement.depth = logImage->depth; - memset(&sortedElementData, -1, 8 * sizeof(int)); + memset(&sortedElementData, -1, sizeof(int[8])); /* Try to know how to assemble the elements */ for (i = 0; i < logImage->numElements; i++) { |