I have a closed source library for AR, and i must call method from this library with width, height and byte[] parameters(in onPreviewFrame callback). I render preview with opengles 2.0 and SurfaceTexture. I wish to render in higher resolution and transmit data to library in lower resolution. Is it possible?
No it isn't. Most image processing libraries know how to downscale their input. If yours is not the case, you should resample the byte[] in your onPreviewFrame() callback for it. Note that often AR processes only need grayscale, and thus you can save 33% of CPU cycles of downscaling.