diff --git a/EXR/ReadEXR.cpp b/EXR/ReadEXR.cpp index 80fa82f3..051ef14e 100644 --- a/EXR/ReadEXR.cpp +++ b/EXR/ReadEXR.cpp @@ -613,8 +613,8 @@ ReadEXRPlugin::decode(const string& filename, //int r = roi.x2; //int x = roi.x1; - //const int X = std::max(x, datawin.min.x + file->dataOffset); - //const int R = std::min(r, datawin.max.x + file->dataOffset + 1); + //const int X = (std::max)(x, datawin.min.x + file->dataOffset); + //const int R = (std::min)(r, datawin.max.x + file->dataOffset + 1); // if we're below or above the data window if ( (exrY < datawin.min.y) || (exrY > datawin.max.y) /* || R <= X*/ ) { diff --git a/FFmpeg/FFmpegFile.cpp b/FFmpeg/FFmpegFile.cpp index ff2dd71c..cab1eabf 100644 --- a/FFmpeg/FFmpegFile.cpp +++ b/FFmpeg/FFmpegFile.cpp @@ -875,7 +875,7 @@ FFmpegFile::FFmpegFile(const string & filename) //} else # endif { - avctx->thread_count = std::min( (int)MultiThread::getNumCPUs(), OFX_FFMPEG_MAX_THREADS ); // ask for the number of available cores for multithreading + avctx->thread_count = (std::min)( (int)MultiThread::getNumCPUs(), OFX_FFMPEG_MAX_THREADS ); // ask for the number of available cores for multithreading # ifdef AV_CODEC_CAP_SLICE_THREADS if ( avctx->codec && (avctx->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS) ) { // multiple threads are used to decode a single frame. Reduces delay @@ -1248,7 +1248,7 @@ FFmpegFile::decode(const ImageEffect* plugin, // file but those same frames will decode succesfully on a second attempt. The root cause of this is not understood but // it appears to be some oddity of FFmpeg. While I don't really like it, retrying decode enables us to successfully // decode those files rather than having to fail the read. - int retriesRemaining = std::max(1, maxRetries); + int retriesRemaining = (std::max)(1, maxRetries); // Whether we have just performed a seek and are still awaiting the first decoded frame after that seek. This controls // how we respond when a decode stall is detected. diff --git a/FFmpeg/FFmpegFile.h b/FFmpeg/FFmpegFile.h index a68361c8..b1480dd7 100644 --- a/FFmpeg/FFmpegFile.h +++ b/FFmpeg/FFmpegFile.h @@ -460,7 +460,7 @@ class FFmpegFile // Sometimes AVCodec reports a bitdepth of 0 (eg PNG codec). // In this case, assume 8 bit. - return std::max(8, _streams[0]->_bitDepth); + return (std::max)(8, _streams[0]->_bitDepth); } int getNumberOfComponents() const diff --git a/FFmpeg/WriteFFmpeg.cpp b/FFmpeg/WriteFFmpeg.cpp index d8a29b05..93616145 100644 --- a/FFmpeg/WriteFFmpeg.cpp +++ b/FFmpeg/WriteFFmpeg.cpp @@ -2711,8 +2711,8 @@ WriteFFmpegPlugin::configureVideoStream(AVCodec* avCodec, double bitrateTolerance = _bitrateTolerance->getValue(); if (bitrateTolerance >= 0) { double fps = _fps->getValue(); - double bitrateToleranceMin = std::ceil( (bitrate / std::min(fps, 4.)) * 1000000) / 1000000.; - bitrateTolerance = std::max( bitrateToleranceMin, bitrateTolerance ); + double bitrateToleranceMin = std::ceil( (bitrate / (std::min)(fps, 4.)) * 1000000) / 1000000.; + bitrateTolerance = (std::max)( bitrateToleranceMin, bitrateTolerance ); avCodecContext->bit_rate_tolerance = (int)(bitrateTolerance * 1000000); } @@ -4004,7 +4004,7 @@ WriteFFmpegPlugin::beginEncode(const string& filename, } else # endif { - avCodecContext->thread_count = std::min( (int)MultiThread::getNumCPUs(), OFX_FFMPEG_MAX_THREADS ); + avCodecContext->thread_count = (std::min)( (int)MultiThread::getNumCPUs(), OFX_FFMPEG_MAX_THREADS ); } if (openCodec(formatContext_, audioCodec, streamAudio_) < 0) { @@ -4181,7 +4181,7 @@ WriteFFmpegPlugin::beginEncode(const string& filename, } else # endif { - avCodecContext->thread_count = std::min( (int)MultiThread::getNumCPUs(), OFX_FFMPEG_MAX_THREADS ); + avCodecContext->thread_count = (std::min)( (int)MultiThread::getNumCPUs(), OFX_FFMPEG_MAX_THREADS ); } # ifdef AV_CODEC_CAP_SLICE_THREADS if (avCodecContext->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS) { @@ -4669,7 +4669,7 @@ WriteFFmpegPlugin::updateBitrateToleranceRange() double bitrate = _bitrate->getValue(); double fps = _fps->getValue(); // guard agains division by zero - the 4 comes from the ffserver.c code - double minRange = std::ceil( (bitrate / std::min(fps, 4.)) * 1000000) / 1000000.; + double minRange = std::ceil( (bitrate / (std::min)(fps, 4.)) * 1000000) / 1000000.; _bitrateTolerance->setRange(minRange, kParamBitrateToleranceMax); _bitrateTolerance->setDisplayRange(minRange, kParamBitrateToleranceMax); diff --git a/IOSupport/GenericReader.cpp b/IOSupport/GenericReader.cpp index 0875c583..02799164 100644 --- a/IOSupport/GenericReader.cpp +++ b/IOSupport/GenericReader.cpp @@ -1583,9 +1583,9 @@ GenericReaderPlugin::render(const RenderArguments &args) _originalProxyScale->getValue(proxyOriginalScale.x, proxyOriginalScale.y); ///We only support downscaling at a power of two. - unsigned int renderMipmapLevel = getLevelFromScale( std::min(args.renderScale.x, args.renderScale.y) ); - unsigned int proxyMipMapThresholdLevel = (proxyScaleThreshold.x == 0 || proxyScaleThreshold.y == 0) ? renderMipmapLevel : getLevelFromScale( std::min(proxyScaleThreshold.x, proxyScaleThreshold.y) ); - unsigned int originalProxyMipMapLevel = (proxyOriginalScale.x == 0 || proxyOriginalScale.y == 0) ? renderMipmapLevel : getLevelFromScale( std::min(proxyOriginalScale.x, proxyOriginalScale.y) ); + unsigned int renderMipmapLevel = getLevelFromScale( (std::min)(args.renderScale.x, args.renderScale.y) ); + unsigned int proxyMipMapThresholdLevel = (proxyScaleThreshold.x == 0 || proxyScaleThreshold.y == 0) ? renderMipmapLevel : getLevelFromScale( (std::min)(proxyScaleThreshold.x, proxyScaleThreshold.y) ); + unsigned int originalProxyMipMapLevel = (proxyOriginalScale.x == 0 || proxyOriginalScale.y == 0) ? renderMipmapLevel : getLevelFromScale( (std::min)(proxyOriginalScale.x, proxyOriginalScale.y) ); if ( kSupportsRenderScale && (renderMipmapLevel >= proxyMipMapThresholdLevel) ) { useProxy = true; @@ -1810,15 +1810,15 @@ GenericReaderPlugin::render(const RenderArguments &args) frameBounds.y1 = frameHeight - frameBounds.y1; frameBounds.y2 = frameHeight - frameBounds.y2; - renderWindowFullRes.x1 = std::min( (double)std::ceil( (double)renderWindowFullRes.x1 / tile_width ) * tile_width, (double)frameBounds.x1 ); - renderWindowFullRes.y1 = std::min( (double)std::ceil( (double)renderWindowFullRes.y1 / tile_height ) * tile_height, (double)frameBounds.y1 ); - renderWindowFullRes.x2 = std::max( (double)std::floor( (double)renderWindowFullRes.x2 / tile_width ) * tile_width, (double)frameBounds.x2 ); - renderWindowFullRes.y2 = std::max( (double)std::floor( (double)renderWindowFullRes.y2 / tile_height ) * tile_height, (double)frameBounds.y2 ); + renderWindowFullRes.x1 = (std::min)( (double)std::ceil( (double)renderWindowFullRes.x1 / tile_width ) * tile_width, (double)frameBounds.x1 ); + renderWindowFullRes.y1 = (std::min)( (double)std::ceil( (double)renderWindowFullRes.y1 / tile_height ) * tile_height, (double)frameBounds.y1 ); + renderWindowFullRes.x2 = (std::max)( (double)std::floor( (double)renderWindowFullRes.x2 / tile_width ) * tile_width, (double)frameBounds.x2 ); + renderWindowFullRes.y2 = (std::max)( (double)std::floor( (double)renderWindowFullRes.y2 / tile_height ) * tile_height, (double)frameBounds.y2 ); } else { - renderWindowFullRes.x1 = std::max( (double)std::floor( (double)renderWindowFullRes.x1 / tile_width ) * tile_width, (double)frameBounds.x1 ); - renderWindowFullRes.y1 = std::max( (double)std::floor( (double)renderWindowFullRes.y1 / tile_height ) * tile_height, (double)frameBounds.y1 ); - renderWindowFullRes.x2 = std::min( (double)std::ceil( (double)renderWindowFullRes.x2 / tile_width ) * tile_width, (double)frameBounds.x2 ); - renderWindowFullRes.y2 = std::min( (double)std::ceil( (double)renderWindowFullRes.y2 / tile_height ) * tile_height, (double)frameBounds.y2 ); + renderWindowFullRes.x1 = (std::max)( (double)std::floor( (double)renderWindowFullRes.x1 / tile_width ) * tile_width, (double)frameBounds.x1 ); + renderWindowFullRes.y1 = (std::max)( (double)std::floor( (double)renderWindowFullRes.y1 / tile_height ) * tile_height, (double)frameBounds.y1 ); + renderWindowFullRes.x2 = (std::min)( (double)std::ceil( (double)renderWindowFullRes.x2 / tile_width ) * tile_width, (double)frameBounds.x2 ); + renderWindowFullRes.y2 = (std::min)( (double)std::ceil( (double)renderWindowFullRes.y2 / tile_height ) * tile_height, (double)frameBounds.y2 ); } if ( isTileOrientationTopDown() ) { diff --git a/IOSupport/GenericWriter.cpp b/IOSupport/GenericWriter.cpp index 386d8365..1460cd03 100644 --- a/IOSupport/GenericWriter.cpp +++ b/IOSupport/GenericWriter.cpp @@ -647,14 +647,14 @@ GenericWriterPlugin::fetchPlaneConvertAndCopy(const string& plane, // Be careful: src may have more components than dst (eg dst is RGB, src is RGBA). // In this case, only copy the first components (thus the std::min) - assert( ( /*dstPixelComponentStartIndex=*/ 0 + /*desiredSrcNComps=*/ std::min(srcMappedComponentsCount, dstMappedComponentsCount) ) <= /*dstPixelComponentCount=*/ dstMappedComponentsCount ); + assert( ( /*dstPixelComponentStartIndex=*/ 0 + /*desiredSrcNComps=*/ (std::min)(srcMappedComponentsCount, dstMappedComponentsCount) ) <= /*dstPixelComponentCount=*/ dstMappedComponentsCount ); interleavePixelBuffers(renderWindowClipped, srcPixelData, *bounds, pixelComponents, srcMappedComponentsCount, 0, // srcNCompsStartIndex - std::min(srcMappedComponentsCount, dstMappedComponentsCount), // desiredSrcNComps + (std::min)(srcMappedComponentsCount, dstMappedComponentsCount), // desiredSrcNComps bitDepth, srcRowBytes, dstBounds, diff --git a/IOSupport/IOUtility.h b/IOSupport/IOUtility.h index 764cec7a..e4b774bf 100644 --- a/IOSupport/IOUtility.h +++ b/IOSupport/IOUtility.h @@ -198,10 +198,10 @@ intersect(const OfxRectI& r1, return false; } - intersection->x1 = std::max(r1.x1, r2.x1); - intersection->x2 = std::min(r1.x2, r2.x2); - intersection->y1 = std::max(r1.y1, r2.y1); - intersection->y2 = std::min(r1.y2, r2.y2); + intersection->x1 = (std::max)(r1.x1, r2.x1); + intersection->x2 = (std::min)(r1.x2, r2.x2); + intersection->y1 = (std::max)(r1.y1, r2.y1); + intersection->y2 = (std::min)(r1.y2, r2.y2); return true; } diff --git a/OCIO/OCIODisplay.cpp b/OCIO/OCIODisplay.cpp index 625ab72a..ab4c2af8 100644 --- a/OCIO/OCIODisplay.cpp +++ b/OCIO/OCIODisplay.cpp @@ -670,7 +670,7 @@ OCIODisplayPlugin::getProcessor(OfxTime time) // Specify an (optional) post-display transform. { - float exponent = 1.0f / std::max(1e-6f, (float)gamma); + float exponent = 1.0f / (std::max)(1e-6f, (float)gamma); const float exponent4f[] = { exponent, exponent, exponent, exponent }; OCIO::ExponentTransformRcPtr cc = OCIO::ExponentTransform::Create(); cc->setValue(exponent4f); diff --git a/OIIO/OIIOResize.cpp b/OIIO/OIIOResize.cpp index 6e058c07..05fe3b9e 100644 --- a/OIIO/OIIOResize.cpp +++ b/OIIO/OIIOResize.cpp @@ -493,8 +493,8 @@ OIIOResizePlugin::renderInternal(const RenderArguments & /*args*/, } } // older versions of OIIO 1.2 don't have ImageBufAlgo::resize(dstBuf, srcBuf, fd.name, fd.width) - float w = fd.width * std::max(1.0f, wratio); - float h = fd.width * std::max(1.0f, hratio); + float w = fd.width * (std::max)(1.0f, wratio); + float h = fd.width * (std::max)(1.0f, hratio); auto_ptr filter( Filter2D::create(fd.name, w, h) ); if ( !ImageBufAlgo::resize( dstBuf, srcBuf, filter.get(), ROI::All(), MultiThread::getNumCPUs() ) ) { @@ -725,10 +725,10 @@ OIIOResizePlugin::getRegionOfDefinition(const RegionOfDefinitionArguments &args, srcRoD.y1 *= sy; srcRoD.x2 *= sx; srcRoD.y2 *= sy; - rod.x1 = std::min(srcRoD.x1, srcRoD.x2 - 1); - rod.x2 = std::max(srcRoD.x1 + 1, srcRoD.x2); - rod.y1 = std::min(srcRoD.y1, srcRoD.y2 - 1); - rod.y2 = std::max(srcRoD.y1 + 1, srcRoD.y2); + rod.x1 = (std::min)(srcRoD.x1, srcRoD.x2 - 1); + rod.x2 = (std::max)(srcRoD.x1 + 1, srcRoD.x2); + rod.y1 = (std::min)(srcRoD.y1, srcRoD.y2 - 1); + rod.y2 = (std::max)(srcRoD.y1 + 1, srcRoD.y2); break; } } // switch diff --git a/OIIO/ReadOIIO.cpp b/OIIO/ReadOIIO.cpp index 2edb46d3..d7afec9e 100644 --- a/OIIO/ReadOIIO.cpp +++ b/OIIO/ReadOIIO.cpp @@ -1886,7 +1886,7 @@ ReadOIIOPlugin::getConfig(ImageSpec* config) const config->attribute("raw:HighlightMode", (int)rawHighlightMode); } else { // rebuild level, from 0 to 7 - int rawHighlightRebuildLevel = std::max( 0,std::min(_rawHighlightRebuildLevel->getValue(), 7) ); + int rawHighlightRebuildLevel = (std::max)( 0,(std::min)(_rawHighlightRebuildLevel->getValue(), 7) ); config->attribute("raw:HighlightMode", (int)rawHighlightMode + rawHighlightRebuildLevel); } } @@ -2328,10 +2328,10 @@ ReadOIIOPlugin::decodePlane(const string& filename, // Where to write the data in the buffer, everything outside of that is black // It depends on the extra padding we added in getFrameBounds OfxRectI renderWindowUnPadded; - renderWindowUnPadded.x1 = std::max(renderWindow.x1, specBounds.x1); - renderWindowUnPadded.y1 = std::max(renderWindow.y1, specBounds.y1); - renderWindowUnPadded.x2 = std::min(renderWindow.x2, specBounds.x2); - renderWindowUnPadded.y2 = std::min(renderWindow.y2, specBounds.y2); + renderWindowUnPadded.x1 = (std::max)(renderWindow.x1, specBounds.x1); + renderWindowUnPadded.y1 = (std::max)(renderWindow.y1, specBounds.y1); + renderWindowUnPadded.x2 = (std::min)(renderWindow.x2, specBounds.x2); + renderWindowUnPadded.y2 = (std::min)(renderWindow.y2, specBounds.y2); // The renderWindowUnPadded must be contained in the original render Window assert(renderWindowUnPadded.x1 >= renderWindow.x1 && renderWindowUnPadded.x2 <= renderWindow.x2 && @@ -2483,10 +2483,10 @@ ReadOIIOPlugin::decodePlane(const string& filename, assert( kSupportsTiles || (!kSupportsTiles && (renderWindow.x2 - renderWindow.x1) == spec.width && (renderWindow.y2 - renderWindow.y1) == spec.height) ); // We clamp to the valid scanlines portion. - int ybeginClamped = std::min(std::max(spec.y, ybegin), spec.y + spec.height); - int yendClamped = std::min(std::max(spec.y, yend), spec.y + spec.height); - int xbeginClamped = std::min(std::max(spec.x, xbegin), spec.x + spec.width); - int xendClamped = std::min(std::max(spec.x, xend), spec.x + spec.width); + int ybeginClamped = (std::min)((std::max)(spec.y, ybegin), spec.y + spec.height); + int yendClamped = (std::min)((std::max)(spec.y, yend), spec.y + spec.height); + int xbeginClamped = (std::min)((std::max)(spec.x, xbegin), spec.x + spec.width); + int xendClamped = (std::min)((std::max)(spec.x, xend), spec.x + spec.width); // Do not call valid_tile_range because a tiled file can only be read with read_tiles with OpenImageIO. // Otherwise it will give the following error: called OpenEXRInput::read_native_scanlines without an open file @@ -2539,10 +2539,10 @@ ReadOIIOPlugin::decodePlane(const string& filename, // tiledYEnd must be at a valid multiple of tile_height from spec.y tiledYEnd = spec.y + (int)std::ceil((double)(yendClamped - spec.y) / spec.tile_height ) * spec.tile_height; - tiledXBegin = std::max(spec.x, tiledXBegin); - tiledYBegin = std::max(spec.y, tiledYBegin); - tiledXEnd = std::min(spec.x + spec.width, tiledXEnd); - tiledYEnd = std::min(spec.y + spec.height, tiledYEnd); + tiledXBegin = (std::max)(spec.x, tiledXBegin); + tiledYBegin = (std::max)(spec.y, tiledYBegin); + tiledXEnd = (std::min)(spec.x + spec.width, tiledXEnd); + tiledYEnd = (std::min)(spec.y + spec.height, tiledYEnd); // Check that we made up a correct tile range assert( spec.valid_tile_range(tiledXBegin, tiledXEnd, tiledYBegin, tiledYEnd, zbegin, zend) ); diff --git a/OIIO/WriteOIIO.cpp b/OIIO/WriteOIIO.cpp index d529d1c7..6789d499 100644 --- a/OIIO/WriteOIIO.cpp +++ b/OIIO/WriteOIIO.cpp @@ -1113,20 +1113,20 @@ WriteOIIOPlugin::beginEncodeParts(void* user_data, EParamTileSize tileSizeE = (EParamTileSize)tileSize_i; switch (tileSizeE) { case eParamTileSize64: - spec.tile_width = std::min(64, spec.full_width); - spec.tile_height = std::min(64, spec.full_height); + spec.tile_width = (std::min)(64, spec.full_width); + spec.tile_height = (std::min)(64, spec.full_height); break; case eParamTileSize128: - spec.tile_width = std::min(128, spec.full_width); - spec.tile_height = std::min(128, spec.full_height); + spec.tile_width = (std::min)(128, spec.full_width); + spec.tile_height = (std::min)(128, spec.full_height); break; case eParamTileSize256: - spec.tile_width = std::min(256, spec.full_width); - spec.tile_height = std::min(256, spec.full_height); + spec.tile_width = (std::min)(256, spec.full_width); + spec.tile_height = (std::min)(256, spec.full_height); break; case eParamTileSize512: - spec.tile_width = std::min(512, spec.full_width); - spec.tile_height = std::min(512, spec.full_height); + spec.tile_width = (std::min)(512, spec.full_width); + spec.tile_height = (std::min)(512, spec.full_height); break; case eParamTileSizeScanLineBased: default: diff --git a/PFM/ReadPFM.cpp b/PFM/ReadPFM.cpp index b06f6cde..c36e355f 100644 --- a/PFM/ReadPFM.cpp +++ b/PFM/ReadPFM.cpp @@ -165,12 +165,12 @@ copyLine(PIX *image, for (int x = x1; x < x2; ++x) { if (srcC == 1) { // alpha/grayscale image - for (int c = 0; c < std::min(dstC, 3); ++c) { + for (int c = 0; c < (std::min)(dstC, 3); ++c) { dstPix[c] = srcPix[0]; } } else { // color image (if dstC == 1, only the red channel is extracted) - for (int c = 0; c < std::min(dstC, 3); ++c) { + for (int c = 0; c < (std::min)(dstC, 3); ++c) { dstPix[c] = srcPix[c]; } } diff --git a/PFM/WritePFM.cpp b/PFM/WritePFM.cpp index 0401975c..e709c95a 100644 --- a/PFM/WritePFM.cpp +++ b/PFM/WritePFM.cpp @@ -122,12 +122,12 @@ copyLine(const PIX* pixelData, for (int x = 0; x < W; ++x) { if (srcC == 1) { // alpha/grayscale image - for (int c = 0; c < std::min(dstC, 3); ++c) { + for (int c = 0; c < (std::min)(dstC, 3); ++c) { dstPix[c] = srcPix[dstNCompsStartIndex]; } } else { // color image (if dstC == 1, only the red channel is extracted) - for (int c = 0; c < std::min(dstC, 3); ++c) { + for (int c = 0; c < (std::min)(dstC, 3); ++c) { dstPix[c] = srcPix[dstNCompsStartIndex + c]; } } diff --git a/PNG/WritePNG.cpp b/PNG/WritePNG.cpp index bbe7496f..f18667c4 100644 --- a/PNG/WritePNG.cpp +++ b/PNG/WritePNG.cpp @@ -723,7 +723,7 @@ WritePNGPlugin::encode(const string& filename, int compressionLevelParam; _compressionLevel->getValue(compressionLevelParam); assert(compressionLevelParam >= 0 && compressionLevelParam <= 9); - int compressionLevel = std::max(std::min(compressionLevelParam, Z_BEST_COMPRESSION), Z_NO_COMPRESSION); + int compressionLevel = (std::max)((std::min)(compressionLevelParam, Z_BEST_COMPRESSION), Z_NO_COMPRESSION); png_set_compression_level(png, compressionLevel); int compression_i; @@ -762,7 +762,7 @@ WritePNGPlugin::encode(const string& filename, std::size_t scratchBufBytes = (bounds.y2 - bounds.y1) * pngRowBytes; RamBuffer scratchBuffer(scratchBufBytes); - int nComps = std::min(dstNComps, pixelDataNComps); + int nComps = (std::min)(dstNComps, pixelDataNComps); const int srcRowElements = rowBytes / sizeof(float); const size_t numPixels = (size_t)(bounds.x2 - bounds.x1) * (size_t)(bounds.y2 - bounds.y1); diff --git a/RunScript/pstream.h b/RunScript/pstream.h index 28cbeadb..252bac12 100644 --- a/RunScript/pstream.h +++ b/RunScript/pstream.h @@ -1780,7 +1780,7 @@ namespace redi { if (std::streamsize nbuf = this->epptr() - this->pptr()) { - nbuf = std::min(nbuf, n - done); + nbuf = (std::min)(nbuf, n - done); traits_type::copy(this->pptr(), s + done, nbuf); this->pbump(nbuf); done += nbuf; @@ -1881,7 +1881,7 @@ namespace redi { const std::streamsize pb1 = this->gptr() - this->eback(); const std::streamsize pb2 = pbsz; - const std::streamsize npb = std::min(pb1, pb2); + const std::streamsize npb = (std::min)(pb1, pb2); char_type* const rbuf = rbuffer(); diff --git a/SeExpr/SeExpr.cpp b/SeExpr/SeExpr.cpp index f06c8bb6..8a3c8fbe 100644 --- a/SeExpr/SeExpr.cpp +++ b/SeExpr/SeExpr.cpp @@ -2576,11 +2576,11 @@ SeExprPlugin::getFramesNeeded(const FramesNeededArguments &args, bool absolute; _frameRangeAbsolute->getValueAtTime(time, absolute); if (absolute) { - range.min = std::min(t1, t2); - range.max = std::max(t1, t2); + range.min = (std::min)(t1, t2); + range.max = (std::max)(t1, t2); } else { - range.min = time + std::min(t1, t2); - range.max = time + std::max(t1, t2); + range.min = time + (std::min)(t1, t2); + range.max = time + (std::max)(t1, t2); } for (int i = 0; i < kSourceClipCount; ++i) { diff --git a/SeExpr/SeGrain.cpp b/SeExpr/SeGrain.cpp index caa1247e..0eedf24c 100644 --- a/SeExpr/SeGrain.cpp +++ b/SeExpr/SeGrain.cpp @@ -284,8 +284,8 @@ class SeGrainProcessorBase _black[c] = black[c]; _minimum[c] = minimum[c]; - Matrix3x3 sizeMat(1. / _renderScale.x / std::max(size[c], kSizeMin), 0., 0., - 0., 1. / _renderScale.x / std::max(size[c], kSizeMin), 0., + Matrix3x3 sizeMat(1. / _renderScale.x / (std::max)(size[c], kSizeMin), 0., 0., + 0., 1. / _renderScale.x / (std::max)(size[c], kSizeMin), 0., 0., 0., (staticSeed ? 0. : _time) + (1 + c) * seed + irregularity[c] / 2.); double rads = irregularity[c] * 45. * M_PI / 180.; double ca = std::cos(rads); @@ -352,7 +352,7 @@ class SeGrainProcessor } } for (int c = 0; c < 3; ++c) { - unpPix[c] = std::max( _minimum[c], unpPix[c] + result[c] * (unpPix[c] * _intensity[c] + _black[c]) ); + unpPix[c] = (std::max)( _minimum[c], unpPix[c] + result[c] * (unpPix[c] * _intensity[c] + _black[c]) ); } ofxsMaskMixPix(unpPix, x, y, srcPix, _doMasking, _maskImg, (float)_mix, _maskInvert, dstPix); dstPix += nComponents; diff --git a/SupportExt b/SupportExt index 1db2bfa7..332f3caa 160000 --- a/SupportExt +++ b/SupportExt @@ -1 +1 @@ -Subproject commit 1db2bfa760d5066d5fcfaf401eac9f588ec01fc9 +Subproject commit 332f3caa9f5f6206ab39d202e56430633ee76eb6 diff --git a/openfx b/openfx index a85dc34b..31a5eb8c 160000 --- a/openfx +++ b/openfx @@ -1 +1 @@ -Subproject commit a85dc34bb3ec0f7fdcb34d8d88d0d5863688ef2b +Subproject commit 31a5eb8ce2e17265457026ba88b26b0e32203b3d