diff --git a/source/blender/blenkernel/intern/lightprobe.cc b/source/blender/blenkernel/intern/lightprobe.cc index dc1fe1bd011..9aa827b50c6 100644 --- a/source/blender/blenkernel/intern/lightprobe.cc +++ b/source/blender/blenkernel/intern/lightprobe.cc @@ -287,5 +287,5 @@ int64_t BKE_lightprobe_grid_cache_frame_sample_count(const LightProbeGridCacheFr return cache->block_len * cube_i(cache->block_size); } /* LIGHTPROBE_CACHE_UNIFORM_GRID */ - return cache->size[0] * cache->size[1] * cache->size[2]; + return int64_t(cache->size[0]) * cache->size[1] * cache->size[2]; } diff --git a/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.cc b/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.cc index 2921a9939f0..100ae8d1b92 100644 --- a/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.cc +++ b/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.cc @@ -1226,7 +1226,7 @@ LightProbeGridCacheFrame *IrradianceBake::read_result_packed() cache_frame->baking.L1_c = (float(*)[4])irradiance_L1_c_tx_.read(GPU_DATA_FLOAT); cache_frame->baking.validity = (float *)validity_tx_.read(GPU_DATA_FLOAT); - int64_t sample_count = irradiance_L0_tx_.width() * irradiance_L0_tx_.height() * + int64_t sample_count = int64_t(irradiance_L0_tx_.width()) * irradiance_L0_tx_.height() * irradiance_L0_tx_.depth(); size_t coefficient_texture_size = sizeof(*cache_frame->irradiance.L0) * sample_count; size_t validity_texture_size = sizeof(*cache_frame->connectivity.validity) * sample_count; diff --git a/source/blender/imbuf/intern/jp2.cc b/source/blender/imbuf/intern/jp2.cc index d068f569707..99846842152 100644 --- a/source/blender/imbuf/intern/jp2.cc +++ b/source/blender/imbuf/intern/jp2.cc @@ -429,7 +429,7 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, } if (image->comps[i].sgnd) { - signed_offsets[i] = 1 << (image->comps[i].prec - 1); + signed_offsets[i] = long(1) << (image->comps[i].prec - 1); } /* only needed for float images but doesn't hurt to calc this */ diff --git a/source/blender/sequencer/intern/disk_cache.cc b/source/blender/sequencer/intern/disk_cache.cc index a5cf6fc98b8..c3f6abf124e 100644 --- a/source/blender/sequencer/intern/disk_cache.cc +++ b/source/blender/sequencer/intern/disk_cache.cc @@ -519,11 +519,11 @@ static int seq_disk_cache_add_header_entry(SeqCacheKey *key, ImBuf *ibuf, DiskCa /* Store colorspace name of ibuf. */ const char *colorspace_name; if (ibuf->byte_buffer.data) { - header->entry[i].size_raw = ibuf->x * ibuf->y * ibuf->channels; + header->entry[i].size_raw = int64_t(ibuf->x) * ibuf->y * ibuf->channels; colorspace_name = IMB_colormanagement_get_rect_colorspace(ibuf); } else { - header->entry[i].size_raw = ibuf->x * ibuf->y * ibuf->channels * 4; + header->entry[i].size_raw = int64_t(ibuf->x) * ibuf->y * ibuf->channels * 4; colorspace_name = IMB_colormanagement_get_float_colorspace(ibuf); } STRNCPY(header->entry[i].colorspace_name, colorspace_name);