diff --git a/framework/Source/GPUImageAverageColor.m b/framework/Source/GPUImageAverageColor.m index a768ecb3a..e2dd7e736 100644 --- a/framework/Source/GPUImageAverageColor.m +++ b/framework/Source/GPUImageAverageColor.m @@ -131,12 +131,6 @@ - (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates for (NSUInteger currentReduction = 0; currentReduction < reductionsToHitSideLimit; currentReduction++) { CGSize currentStageSize = CGSizeMake(floor(inputTextureSize.width / pow(4.0, currentReduction + 1.0)), floor(inputTextureSize.height / pow(4.0, currentReduction + 1.0))); - if ( (currentStageSize.height < 2.0) || (currentStageSize.width < 2.0) ) - { - // A really small last stage seems to cause significant errors in the average, so I abort and leave the rest to the CPU at this point - break; - // currentStageSize.height = 2.0; // TODO: Rotate the image to account for this case, which causes FBO construction to fail - } [outputFramebuffer unlock]; outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:currentStageSize textureOptions:self.outputTextureOptions onlyTexture:NO]; @@ -150,8 +144,8 @@ - (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates glUniform1i(filterInputTextureUniform, 2); - glUniform1f(texelWidthUniform, 0.5 / currentStageSize.width); - glUniform1f(texelHeightUniform, 0.5 / currentStageSize.height); + glUniform1f(texelWidthUniform, 0.25 / currentStageSize.width); + glUniform1f(texelHeightUniform, 0.25 / currentStageSize.height); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); diff --git a/framework/Source/iOS/GPUImageMovieWriter.m b/framework/Source/iOS/GPUImageMovieWriter.m index 8ced0dfe9..83b21a013 100755 --- a/framework/Source/iOS/GPUImageMovieWriter.m +++ b/framework/Source/iOS/GPUImageMovieWriter.m @@ -199,9 +199,9 @@ - (void)initializeMovieWithOutputSettings:(NSDictionary *)outputSettings; // custom output settings specified else { - NSString *videoCodec = [outputSettings objectForKey:AVVideoCodecKey]; - NSNumber *width = [outputSettings objectForKey:AVVideoWidthKey]; - NSNumber *height = [outputSettings objectForKey:AVVideoHeightKey]; + __unused NSString *videoCodec = [outputSettings objectForKey:AVVideoCodecKey]; + __unused NSNumber *width = [outputSettings objectForKey:AVVideoWidthKey]; + __unused NSNumber *height = [outputSettings objectForKey:AVVideoHeightKey]; NSAssert(videoCodec && width && height, @"OutputSettings is missing required parameters."); @@ -579,7 +579,7 @@ - (void)createDataFBO; } - GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + __unused GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); NSAssert(status == GL_FRAMEBUFFER_COMPLETE, @"Incomplete filter FBO: %d", status); } diff --git a/framework/Source/iOS/GPUImageView.m b/framework/Source/iOS/GPUImageView.m index 5def624cd..9a4606cb3 100755 --- a/framework/Source/iOS/GPUImageView.m +++ b/framework/Source/iOS/GPUImageView.m @@ -184,7 +184,7 @@ - (void)createDisplayFramebuffer; glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, displayRenderbuffer); - GLuint framebufferCreationStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER); + __unused GLuint framebufferCreationStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER); NSAssert(framebufferCreationStatus == GL_FRAMEBUFFER_COMPLETE, @"Failure with display framebuffer generation for display of size: %f, %f", self.bounds.size.width, self.bounds.size.height); boundsSizeAtFrameBufferEpoch = self.bounds.size; }