On Aug 6, 2:08 pm, Yuval Levy <[email protected]> wrote:
> Hi Zoran,
>
> Zoran Zorkic wrote:
> >> I'm not sure what to make of this. Any image at the end of the process?
> >> and I guess this is still with the first nona-gpu binary by Guido?
>
> > Yup.
>
> yup = image at the end of the process? is it as expected.

Ah, me posting before 2 cups of coffee :)
First nona-gpu binary on ATI gpu. It crashed, no image produced :)

> > No problem. Glad I can help out.
> > 4169 gives me this on my system:
>
> I see no error message. was there a resulting image? does it look as
> expected?

Crashed, no image produced.

> > I'll try to get ATI results later today.

Got results from ATI 4850 xp 32bit, nona 4169:
still crashes, no image produced.
---------------------------
G:\nona-test>nona -g -o test test-gui.pto
nona: using graphics card: ATI Technologies Inc. ATI Radeon HD 4800
Series
destStart=[3394, 0]
destEnd=[4706, 1857]
destSize=[(1312, 1857)]
srcSize=[(2144, 1424)]
srcBuffer=087B0020
srcAlphaBuffer=00000000
destBuffer=09070020
destAlphaBuffer=09770020
destGLInternalFormat=GL_RGBA8
destGLFormat=GL_RGB
destGLType=GL_UNSIGNED_BYTE
srcGLInternalFormat=GL_RGBA8
srcGLFormat=GL_RGB
srcGLType=GL_UNSIGNED_BYTE
srcAlphaGLType=GL_BYTE
destAlphaGLType=GL_UNSIGNED_BYTE
warparound=0
needsAtanWorkaround=1
maxTextureSize=8192
Source chunks:
    [(0, 0) to (2144, 1424) = (2144x1424)]
Dest chunks:
    [(0, 0) to (1312, 1857) = (1312x1857)]
Total GPU memory used: 128572288
Interpolator chunks:
    [(0, 0) to (4, 4) = (4x4)]
#version 110
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect SrcTexture;
float sinh(const in float x) { return (exp(x) - exp(-x)) / 2.0; }
float cosh(const in float x) { return (exp(x) + exp(-x)) / 2.0; }
float atan2_xge0(const in float y, const in float x) {
    if (abs(y) > x) {
        return sign(y) * (1.5707963267948966000 - atan(x, abs(y)));
    } else {
        return atan(y, x);
    }
}
float atan2_safe(const in float y, const in float x) {
    if (x >= 0.0) return atan2_xge0(y, x);
    else return (sign(y) * 3.1415926535897931000) - atan2_xge0(y, -x);
}
float atan_safe(const in float yx) {
    if (abs(yx) > 1.0) {
        return sign(yx) * (1.5707963267948966000 - atan(1.0/abs(yx)));
    } else {
        return atan(yx);
    }
}
void main(void)
{
    float discardA = 1.0;
    float discardB = 0.0;
    vec2 src = gl_TexCoord[0].st;
    src -= vec2(2350.0000000000000000, 928.50000000000000000);

    // rotate_erect(5222.2222222222217000, -1767.9272076346463000)
    {
        src.s += -1767.9272076346463000;
        float w = (abs(src.s) > 5222.2222222222217000) ? 1.0 : 0.0;
        float n = (src.s < 0.0) ? 0.5 : -0.5;
        src.s += w * -10444.444444444443000 * ceil(src.s /
10444.444444444443000
 + n);
    }

    // sphere_tp_erect(1662.2849611820179000)
    {
        float phi = src.s / 1662.2849611820179000;
        float theta = -src.t / 1662.2849611820179000 +
1.5707963267948966000;
        if (theta < 0.0) {
            theta = -theta;
            phi += 3.1415926535897931000;
        }
        if (theta > 3.1415926535897931000) {
            theta = 3.1415926535897931000 - (theta -
3.1415926535897931000);
            phi += 3.1415926535897931000;
        }
        float s = sin(theta);
        vec2 v = vec2(s * sin(phi), cos(theta));
        float r = length(v);
        theta = 1662.2849611820179000 * atan2_safe(r, s * cos(phi));
        src = v * (theta / r);
    }

    // persp_sphere(1662.2849611820179000)
    {
        mat3 m = mat3(-0.0013991153339531414000,
-0.99995332803644821000, 0.0095
595096691022414000,
                      0.99999902123766216000,
-0.0013990514038320933000,
1.33748
69653932957000e-005,
                      0.00000000000000000000,
0.0095595190255994313000,
0.999954
30675406327000);
        float r = length(src);
        float theta = r / 1662.2849611820179000;
        float s = 0.0;
        if (r != 0.0) s = sin(theta) / r;
        vec3 v = vec3(s * src.s, s * src.t, cos(theta));
        vec3 u = v * m;
        r = length(u.st);
        theta = 0.0;
        if (r != 0.0) theta = 1662.2849611820179000 * atan2_safe(r,
u.p)
/ r;
        src = theta * u.st;
    }

    // rect_sphere_tp(1662.2849611820179000)
    {
        float r = length(src);
        float theta = r / 1662.2849611820179000;
        float rho = 0.0;
        if (theta >= 1.5707963267948966000) rho = 1.6e16;
        else if (theta == 0.0) rho = 1.0;
        else rho = tan(theta) / theta;
        src *= rho;
    }

    // resize(0.98018589452762850000, 0.98018589452762850000)
    src *= vec2(0.98018589452762850000, 0.98018589452762850000);

    // radial(1.0200684747885995000, 0.00000000000000000000,
-0.0200684747885996
02000, 0.00000000000000000000, 712.00000000000000000,
4.1162036363733581000)
    {
        float r = length(src) / 712.00000000000000000;
        float scale = 1000.0;
        if (r < 4.1162036363733581000) {
            scale = ((0.00000000000000000000 * r +
-0.020068474788599602000) * r
 + 0.00000000000000000000) * r + 1.0200684747885995000;
        }
        src *= scale;
    }

    // vert(-8.2353767291722306000)
    src.t += -8.2353767291722306000;

    // horiz(-39.822211692411202000)
    src.s += -39.822211692411202000;

    src += vec2(1071.5000000000000000, 711.50000000000000000);

    src = src * discardA + vec2(-1000.0, -1000.0) * discardB;
    gl_FragColor = vec4(src.s, 0.0, 0.0, src.t);
}
nona: GL info log:
Fragment shader was successfully compiled to run on hardware.

nona: GL info log:
Fragment shader(s) linked, no vertex shader(s) defined.


#version 110
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect CoordTexture;
uniform sampler2DRect SrcTexture;
uniform sampler2DRect AccumTexture;
uniform vec2 SrcUL;
uniform vec2 SrcLR;
uniform vec2 KernelUL;
uniform vec2 KernelWH;
float w(const in float i, const in float f) {
    float A = -0.75000000000000000000;
    float c = abs(i - 1.0);
    float m = (i > 1.0) ? -1.0 : 1.0;
    float p = c + m * f;
    if (i == 1.0 || i == 2.0) {
        return (( A + 2.0 )*p - ( A + 3.0 ))*p*p + 1.0;
    } else {
        return (( A * p - 5.0 * A ) * p + 8.0 * A ) * p - 4.0 * A;
    }
}
void main(void)
{
    vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
    vec4 accum = texture2DRect(AccumTexture, gl_TexCoord[0].st);

    src -= SrcUL;
    vec2 t = floor(src) + -0.50000000000000000000;
    vec2 f = fract(src);
    vec2 k = vec2(0.0, 0.0);

    for (float ky = 0.0; ky < 4.0000000000000000000; ky += 1.0) {
        k.t = ky + KernelUL.t;
        float wy = w(k.t, f.t);
        for (float kx = 0.0; kx < 4.0000000000000000000; kx += 1.0) {
            k.s = kx + KernelUL.s;
            float wx = w(k.s, f.s);
            vec2 ix = t + k;
            vec4 sp = texture2DRect(SrcTexture, ix);
            float weight = wx * wy * sp.a;
            accum += sp * weight;
        }
    }

    gl_FragColor = accum;
}

nona: GL info log:
Fragment shader was successfully compiled to run on hardware.

nona: GL info log:
Fragment shader(s) linked, no vertex shader(s) defined.


#version 120
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect NormTexture;
uniform sampler2DRect CoordTexture;
uniform sampler2DRect InvLutTexture;
uniform sampler2DRect DestLutTexture;
void main(void)
{
    // Normalization
    vec4 n = texture2DRect(NormTexture, gl_TexCoord[0].st);
    vec4 p = vec4(0.0, 0.0, 0.0, 0.0);
    if (n.a >= 0.2) p = n / n.a;

    // Photometric
    // invLutSize = 256.00000000000000000
    // pixelMax = 255.00000000000000000
    // destLutSize = 1024.0000000000000000
    // destExposure = 0.00012499863837714539000
    // srcExposure = 0.00012500000593717716000
    // whiteBalanceRed = 1.0000000000000000000
    // whiteBalanceBlue = 1.0000000000000000000
    p.rgb = p.rgb * 255.00000000000000000;
    vec2 invR = texture2DRect(InvLutTexture, vec2(p.r, 0.0)).sq;
    vec2 invG = texture2DRect(InvLutTexture, vec2(p.g, 0.0)).sq;
    vec2 invB = texture2DRect(InvLutTexture, vec2(p.b, 0.0)).sq;
    vec3 invX = vec3(invR.x, invG.x, invB.x);
    vec3 invY = vec3(invR.y, invG.y, invB.y);
    vec3 invA = fract(p.rgb);
    p.rgb = mix(invX, invY, invA);
    // VigCorrMode=VIGCORR_RADIAL
    float vig = 1.0;
    {
        vec2 vigCorrCenter = vec2(1071.5000000000000000,
711.50000000000000000);

        float radiusScale=0.00077705730958018185000;
        float radialVigCorrCoeff[4] = float[4](1.0000000000000000000,
-0.1863289
0308207500000, 0.15276620308634001000, -0.12052132655603000000);
        vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
        vec2 d = src - vigCorrCenter;
        d *= radiusScale;
        vig = radialVigCorrCoeff[0];
        float r2 = dot(d, d);
        float r = r2;
        vig += radialVigCorrCoeff[1] * r;
        r *= r2;
        vig += radialVigCorrCoeff[2] * r;
        r *= r2;
        vig += radialVigCorrCoeff[3] * r;
    }
    vec3 exposure_whitebalance = vec3(0.99998905952026551000,
0.9999890595202655
1000, 0.99998905952026551000);
    p.rgb = (p.rgb * exposure_whitebalance) / vig;
    p.rgb = p.rgb * 1023.0000000000000000;
    vec2 destR = texture2DRect(DestLutTexture, vec2(p.r, 0.0)).sq;
    vec2 destG = texture2DRect(DestLutTexture, vec2(p.g, 0.0)).sq;
    vec2 destB = texture2DRect(DestLutTexture, vec2(p.b, 0.0)).sq;
    vec3 destX = vec3(destR.x, destG.x, destB.x);
    vec3 destY = vec3(destR.y, destG.y, destB.y);
    vec3 destA = fract(p.rgb);
    p.rgb = mix(destX, destY, destA);

    gl_FragColor = p;
}

nona: GL info log:
Fragment shader was successfully compiled to run on hardware.

nona: GL info log:
Fragment shader(s) linked, no vertex shader(s) defined.


gpu shader program compile time = 0.547
gpu shader texture/framebuffer setup time = 0.203
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] coord image
render
time =
0.078
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] source chunk=
[(0,
0) to (2
144, 1424) = (2144x1424)] src upload = 0.031
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] source chunk=
[(0,
0) to (2
144, 1424) = (2144x1424)] src render = 0.016
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] source chunk=
[(0,
0) to (2
144, 1424) = (2144x1424)] interpolation chunk=[(0, 0) to (4, 4) =
(4x4)]
setup =
 0
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] source chunk=
[(0,
0) to (2
144, 1424) = (2144x1424)] interpolation chunk=[(0, 0) to (4, 4) =
(4x4)]
render
= 0.016
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] normalization
setup = 0.01
6
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] normalization
render = 0.0
15
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] dest rgb
disassembly setup
 = 0
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] dest rgb
disassembly rende
r = 0
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] rgb readback =
0.563
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] dest alpha
disassembly set
up = 0.015
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] dest alpha
disassembly ren
der = 0
gpu dest chunk=[(0, 0) to (1312, 1857) = (1312x1857)] alpha readback =
0.219
gpu destruct time = 0
gpu total time = 1.734
destStart=[2246, 0]
destEnd=[3734, 1857]
destSize=[(1488, 1857)]
srcSize=[(2144, 1424)]
srcBuffer=087B0020
srcAlphaBuffer=00000000
destBuffer=09070020
destAlphaBuffer=0A320020
destGLInternalFormat=GL_RGBA8
destGLFormat=GL_RGB
destGLType=GL_UNSIGNED_BYTE
srcGLInternalFormat=GL_RGBA8
srcGLFormat=GL_RGB
srcGLType=GL_UNSIGNED_BYTE
srcAlphaGLType=GL_BYTE
destAlphaGLType=GL_UNSIGNED_BYTE
warparound=0
needsAtanWorkaround=1
maxTextureSize=8192
Source chunks:
    [(0, 0) to (2144, 1424) = (2144x1424)]
Dest chunks:
    [(0, 0) to (1488, 1857) = (1488x1857)]
Total GPU memory used: 142952896
Interpolator chunks:
    [(0, 0) to (4, 4) = (4x4)]
#version 110
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect SrcTexture;
float sinh(const in float x) { return (exp(x) - exp(-x)) / 2.0; }
float cosh(const in float x) { return (exp(x) + exp(-x)) / 2.0; }
float atan2_xge0(const in float y, const in float x) {
    if (abs(y) > x) {
        return sign(y) * (1.5707963267948966000 - atan(x, abs(y)));
    } else {
        return atan(y, x);
    }
}
float atan2_safe(const in float y, const in float x) {
    if (x >= 0.0) return atan2_xge0(y, x);
    else return (sign(y) * 3.1415926535897931000) - atan2_xge0(y, -x);
}
float atan_safe(const in float yx) {
    if (abs(yx) > 1.0) {
        return sign(yx) * (1.5707963267948966000 - atan(1.0/abs(yx)));
    } else {
        return atan(yx);
    }
}
void main(void)
{
    float discardA = 1.0;
    float discardB = 0.0;
    vec2 src = gl_TexCoord[0].st;
    src -= vec2(2350.0000000000000000, 928.50000000000000000);

    // rotate_erect(5222.2222222222217000, -615.44724491426177000)
    {
        src.s += -615.44724491426177000;
        float w = (abs(src.s) > 5222.2222222222217000) ? 1.0 : 0.0;
        float n = (src.s < 0.0) ? 0.5 : -0.5;
        src.s += w * -10444.444444444443000 * ceil(src.s /
10444.444444444443000
 + n);
    }

    // sphere_tp_erect(1662.2849611820179000)
    {
        float phi = src.s / 1662.2849611820179000;
        float theta = -src.t / 1662.2849611820179000 +
1.5707963267948966000;
        if (theta < 0.0) {
            theta = -theta;
            phi += 3.1415926535897931000;
        }
        if (theta > 3.1415926535897931000) {
            theta = 3.1415926535897931000 - (theta -
3.1415926535897931000);
            phi += 3.1415926535897931000;
        }
        float s = sin(theta);
        vec2 v = vec2(s * sin(phi), cos(theta));
        float r = length(v);
        theta = 1662.2849611820179000 * atan2_safe(r, s * cos(phi));
        src = v * (theta / r);
    }

    // persp_sphere(1662.2849611820179000)
    {
        mat3 m = mat3(-0.0056712720158038649000,
-0.99996699222001262000, 0.0058
181736123949345000,
                      0.99998391820754939000,
-0.0056711760223806616000,
3.29969
75841580861000e-005,
                      0.00000000000000000000,
0.0058182671805601547000,
0.999983
07374025863000);
        float r = length(src);
        float theta = r / 1662.2849611820179000;
        float s = 0.0;
        if (r != 0.0) s = sin(theta) / r;
        vec3 v = vec3(s * src.s, s * src.t, cos(theta));
        vec3 u = v * m;
        r = length(u.st);
        theta = 0.0;
        if (r != 0.0) theta = 1662.2849611820179000 * atan2_safe(r,
u.p)
/ r;
        src = theta * u.st;
    }

    // rect_sphere_tp(1662.2849611820179000)
    {
        float r = length(src);
        float theta = r / 1662.2849611820179000;
        float rho = 0.0;
        if (theta >= 1.5707963267948966000) rho = 1.6e16;
        else if (theta == 0.0) rho = 1.0;
        else rho = tan(theta) / theta;
        src *= rho;
    }

    // resize(0.98018589452762850000, 0.98018589452762850000)
    src *= vec2(0.98018589452762850000, 0.98018589452762850000);

    // radial(1.0200684747885995000, 0.00000000000000000000,
-0.0200684747885996
02000, 0.00000000000000000000, 712.00000000000000000,
4.1162036363733581000)
    {
        float r = length(src) / 712.00000000000000000;
        float scale = 1000.0;
        if (r < 4.1162036363733581000) {
            scale = ((0.00000000000000000000 * r +
-0.020068474788599602000) * r
 + 0.00000000000000000000) * r + 1.0200684747885995000;
        }
        src *= scale;
    }

    // vert(-8.2353767291722306000)
    src.t += -8.2353767291722306000;

    // horiz(-39.822211692411202000)
    src.s += -39.822211692411202000;

    src += vec2(1071.5000000000000000, 711.50000000000000000);

    src = src * discardA + vec2(-1000.0, -1000.0) * discardB;
    gl_FragColor = vec4(src.s, 0.0, 0.0, src.t);
}
nona: GL info log:
Fragment shader was successfully compiled to run on hardware.

nona: GL info log:
Fragment shader(s) linked, no vertex shader(s) defined.


#version 110
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect CoordTexture;
uniform sampler2DRect SrcTexture;
uniform sampler2DRect AccumTexture;
uniform vec2 SrcUL;
uniform vec2 SrcLR;
uniform vec2 KernelUL;
uniform vec2 KernelWH;
float w(const in float i, const in float f) {
    float A = -0.75000000000000000000;
    float c = abs(i - 1.0);
    float m = (i > 1.0) ? -1.0 : 1.0;
    float p = c + m * f;
    if (i == 1.0 || i == 2.0) {
        return (( A + 2.0 )*p - ( A + 3.0 ))*p*p + 1.0;
    } else {
        return (( A * p - 5.0 * A ) * p + 8.0 * A ) * p - 4.0 * A;
    }
}
void main(void)
{
    vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
    vec4 accum = texture2DRect(AccumTexture, gl_TexCoord[0].st);

    src -= SrcUL;
    vec2 t = floor(src) + -0.50000000000000000000;
    vec2 f = fract(src);
    vec2 k = vec2(0.0, 0.0);

    for (float ky = 0.0; ky < 4.0000000000000000000; ky += 1.0) {
        k.t = ky + KernelUL.t;
        float wy = w(k.t, f.t);
        for (float kx = 0.0; kx < 4.0000000000000000000; kx += 1.0) {
            k.s = kx + KernelUL.s;
            float wx = w(k.s, f.s);
            vec2 ix = t + k;
            vec4 sp = texture2DRect(SrcTexture, ix);
            float weight = wx * wy * sp.a;
            accum += sp * weight;
        }
    }

    gl_FragColor = accum;
}

nona: GL info log:
Fragment shader was successfully compiled to run on hardware.

nona: GL info log:
Fragment shader(s) linked, no vertex shader(s) defined.


#version 120
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect NormTexture;
uniform sampler2DRect CoordTexture;
uniform sampler2DRect InvLutTexture;
uniform sampler2DRect DestLutTexture;
void main(void)
{
    // Normalization
    vec4 n = texture2DRect(NormTexture, gl_TexCoord[0].st);
    vec4 p = vec4(0.0, 0.0, 0.0, 0.0);
    if (n.a >= 0.2) p = n / n.a;

    // Photometric
    // invLutSize = 256.00000000000000000
    // pixelMax = 255.00000000000000000
    // destLutSize = 1024.0000000000000000
    // destExposure = 0.00012499863837714539000
    // srcExposure = 0.00012434661782106230000
    // whiteBalanceRed = 1.0000000000000000000
    // whiteBalanceBlue = 1.0000000000000000000
    p.rgb = p.rgb * 255.00000000000000000;
    vec2 invR = texture2DRect(InvLutTexture, vec2(p.r, 0.0)).sq;
    vec2 invG = texture2DRect(InvLutTexture, vec2(p.g, 0.0)).sq;
    vec2 invB = texture2DRect(InvLutTexture, vec2(p.b, 0.0)).sq;
    vec3 invX = vec3(invR.x, invG.x, invB.x);
    vec3 invY = vec3(invR.y, invG.y, invB.y);
    vec3 invA = fract(p.rgb);
    p.rgb = mix(invX, invY, invA);
    // VigCorrMode=VIGCORR_RADIAL
    float vig = 1.0;
    {
        vec2 vigCorrCenter = vec2(1071.5000000000000000,
711.50000000000000000);

        float radiusScale=0.00077705730958018185000;
        float radialVigCorrCoeff[4] = float[4](1.0000000000000000000,
-0.1863289
0308207500000, 0.15276620308634001000, -0.12052132655603000000);
        vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
        vec2 d = src - vigCorrCenter;
        d *= radiusScale;
        vig = radialVigCorrCoeff[0];
        float r2 = dot(d, d);
        float r = r2;
        vig += radialVigCorrCoeff[1] * r;
        r *= r2;
        vig += radialVigCorrCoeff[2] * r;
        r *= r2;
        vig += radialVigCorrCoeff[3] * r;
    }
    vec3 exposure_whitebalance = vec3(1.0052435729053875000,
1.00524357290538750
00, 1.0052435729053875000);
    p.rgb = (p.rgb * exposure_whitebalance) / vig;
    p.rgb = p.rgb * 1023.0000000000000000;
    vec2 destR = texture2DRect(DestLutTexture, vec2(p.r, 0.0)).sq;
    vec2 destG = texture2DRect(DestLutTexture, vec2(p.g, 0.0)).sq;
    vec2 destB = texture2DRect(DestLutTexture, vec2(p.b, 0.0)).sq;
    vec3 destX = vec3(destR.x, destG.x, destB.x);
    vec3 destY = vec3(destR.y, destG.y, destB.y);
    vec3 destA = fract(p.rgb);
    p.rgb = mix(destX, destY, destA);

    gl_FragColor = p;
}

nona: GL info log:
Fragment shader was successfully compiled to run on hardware.

nona: GL info log:
Fragment shader(s) linked, no vertex shader(s) defined.

G:\nona-test>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---

Reply via email to