Skip to content

Commit

Permalink
Updated GPU align
Browse files Browse the repository at this point in the history
  • Loading branch information
eszdman committed Jul 28, 2021
1 parent 7f3770a commit c14a0b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@
import com.particlesdevs.photoncamera.processing.opengl.GLProg;
import com.particlesdevs.photoncamera.processing.opengl.GLTexture;
import com.particlesdevs.photoncamera.processing.opengl.nodes.Node;
import com.particlesdevs.photoncamera.util.Utilities;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;
import java.util.ArrayList;
import java.util.Arrays;

import static android.opengl.GLES20.GL_CLAMP_TO_EDGE;
import static android.opengl.GLES20.GL_LINEAR;
import static android.opengl.GLES20.GL_NEAREST;

public class AlignAndMerge extends Node {
Point rawSize;
Expand Down Expand Up @@ -109,7 +104,7 @@ private GLTexture LaplacDown44(GLTexture input) {
GLTexture vsmall;
private void Align(int i) {
//startT();
glProg.setDefine("SCANSIZE",tileSize*overscan);
glProg.setDefine("SCANSIZE",tileSize* overScan);
glProg.setDefine("TILESIZE",tileSize);
glProg.setDefine("PREVSCALE",0);
glProg.setDefine("INPUTSIZE",brTex128.mSize);
Expand All @@ -125,7 +120,7 @@ private void Align(int i) {

glProg.drawBlocks(vsmall);

glProg.setDefine("SCANSIZE",tileSize*overscan);
glProg.setDefine("SCANSIZE",tileSize* overScan);
glProg.setDefine("TILESIZE",tileSize);
glProg.setDefine("PREVSCALE",4);
glProg.setDefine("INPUTSIZE",brTex32.mSize);
Expand All @@ -143,7 +138,7 @@ private void Align(int i) {


glProg.drawBlocks(small);
glProg.setDefine("SCANSIZE",tileSize*overscan);
glProg.setDefine("SCANSIZE",tileSize* overScan);
glProg.setDefine("TILESIZE",tileSize);
glProg.setDefine("PREVSCALE",4);
glProg.setDefine("INPUTSIZE",brTex8.mSize);
Expand All @@ -163,7 +158,7 @@ private void Align(int i) {

glProg.drawBlocks(medium);
//small.close();
glProg.setDefine("SCANSIZE",tileSize*overscan);
glProg.setDefine("SCANSIZE",tileSize* overScan);
glProg.setDefine("TILESIZE",tileSize);
glProg.setDefine("PREVSCALE",4);
glProg.setDefine("INPUTSIZE",brTex2.mSize);
Expand Down Expand Up @@ -316,16 +311,16 @@ private GLTexture RawOutput(GLTexture input) {
GLTexture Weights,WeightsAlt;
GLTexture[] Weight;
GLTexture GainMap;
GLTexture debug2;
int tileSize = 32;
int overscan = 1;
int overScan = 2;
boolean useLuckyLayers = false;
boolean medianFilterPyramid = false;
boolean medianFilterPyramid = true;
float opticalFlowActivity = -2.0f;
float gradientMapShift = 0.5f;
float gradientMapShift = 0.2f;
@Override
public void Run() {
tileSize = getTuning("TileSize",tileSize);
overScan = getTuning("OverScan", overScan);
useLuckyLayers = getTuning("UseLuckyLayers",useLuckyLayers);
medianFilterPyramid = getTuning("MedianFilterPyramid",medianFilterPyramid);
opticalFlowActivity = getTuning("OpticalFlowActivity",opticalFlowActivity);
Expand Down
4 changes: 2 additions & 2 deletions app/version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Thu Jul 29 01:37:17 MSK 2021
VERSION_BUILD=11076
#Thu Jul 29 01:45:43 MSK 2021
VERSION_BUILD=11085

0 comments on commit c14a0b8

Please sign in to comment.