Recently, I had to do this myself for input images and video frames that I had as OpenGL ES textures. I was not going to generate mipmaps for them due to the fact that I worked with textures without powering two, and you cannot generate mipmaps for NPOT textures in OpenGL ES 2.0 on iOS.
Instead, I did a multi-step reduction similar to mipmap generation, but with some minor changes. Each step down reduced the image size by four times the width and height, rather than the normal factor of two used for mipmaps. I did this by taking samples from four texture locations that were in the middle of four squares of four pixels, each of which made up a 4x4 area in a higher-level image. This uses texture texture interference to average four sets of four pixels, then I just had to average these four pixels in order to achieve 16-fold pixel reduction in one step.
, RGB vec3 (0.2125, 0.7154, 0.0721). , iOS. , , Y- , RGB.
, CPU , .
640x480 ~ 6 iPhone 4, , 1-2 . , , iOS, , mipmaps - , , .
, GPUImageLuminosity GPUImage ( GPUImageAverageColor). FilterShowcase .