hugin-devs team mailing list archive
-
hugin-devs team
-
Mailing list archive
-
Message #00980
[Bug 705952] Re: Nona crashs when using GPU for remapping
** Tags added: gpu nona
--
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/705952
Title:
Nona crashs when using GPU for remapping
Status in Hugin - Panorama Tools GUI:
Incomplete
Bug description:
===========================================================================
*************** Panorama makefile generated by Hugin ***************
===========================================================================
System information
===========================================================================
Operating System: Windows 7 (6.1 )
Architecture: x86
Number of logical processors: 2
Physical memory: 4192760 kiB (37% occupied)
Free space on disc: 24137 MiB
Active codepage: 1252 (Western European Windows)
===========================================================================
Output options
===========================================================================
Hugin Version: 2010.4.0.854952d82c8f built by Matthew Petroff
Project file: C:\Users\web-seb\AppData\Local\Temp\hug2C53.tmp
Output prefix: DSC_2356-DSC_2360
Projection: Cylindrical (1)
Field of view: 90 x 29
Canvas dimensions: 11207 x 3736
Crop area: (39,105) - (11207,2238)
Output exposure value: 13.51
Selected outputs
Normal panorama
* Blended panorama
Using GPU for remapping
===========================================================================
Input images
===========================================================================
Number of images in project file: 5
Number of active images: 4
Image 0: F:\Bilder\2010\Winter 2010\Ponatest\DSC_2356.jpg
Image 0: Size 3872x2592, Exposure: 13.30
Image 1: F:\Bilder\2010\Winter 2010\Ponatest\DSC_2357.jpg
Image 1: Size 3872x2592, Exposure: 13.28
Image 2: F:\Bilder\2010\Winter 2010\Ponatest\DSC_2358.jpg
Image 2: Size 3872x2592, Exposure: 13.55
Image 4: F:\Bilder\2010\Winter 2010\Ponatest\DSC_2360.jpg
Image 4: Size 3872x2592, Exposure: 13.74
===========================================================================
Testing programs
===========================================================================
Checking nona...
nona is ok
Checking enblend...
enblend is ok
Checking enfuse...
enfuse is ok
Checking hugin_hdrmerge...
hugin_hdrmerge is ok
Checking exiftool...
exiftool is ok
===========================================================================
Stitching panorama
===========================================================================
"C:/Program Files/Hugin/bin/nona" -g -z LZW -r ldr -m TIFF_m -o "DSC_2356-DSC_2360" -i 0 "C:/Users/web-seb/AppData/Local/Temp/hug2C53.tmp"
nona: using graphics card: NVIDIA Corporation GeForce 6600 LE/PCI/SSE2
destStart=[7845, 105]
destEnd=[11213, 2238]
destSize=[(3368, 2133)]
srcSize=[(3872, 2592)]
srcBuffer=070C0020
srcAlphaBuffer=00000000
destBuffer=08D80020
destAlphaBuffer=0A210020
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=0
maxTextureSize=4096
Source chunks:
[(0, 0) to (3872, 2592) = (3872x2592)]
Dest chunks:
[(0, 0) to (1684, 1067) = (1684x1067)]
[(1684, 0) to (3368, 1067) = (1684x1067)]
[(0, 1067) to (1684, 2133) = (1684x1066)]
[(1684, 1067) to (3368, 2133) = (1684x1066)]
Total GPU memory used: 149314000
Interpolator chunks:
[(0, 0) to (4, 4) = (4x4)]
#version 110
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect SrcTexture;
float sinh(in float x) { return (exp(x) - exp(-x)) / 2.0; }
float cosh(in float x) { return (exp(x) + exp(-x)) / 2.0; }
float atan2_xge0(const in float y, const in float x) {
return atan(y, x);
}
float atan2_safe(const in float y, const in float x) {
return atan(y, x);
}
float atan_safe(const in float yx) {
return atan(yx);
}
void main(void)
{
float discardA = 1.0;
float discardB = 0.0;
vec2 src = gl_TexCoord[0].st;
src -= vec2(5603.5000000000000000, 1868.0000000000000000);
// erect_pano(7134.5977889234846000)
src.t = 7134.5977889234846000 * atan_safe(src.t / 7134.5977889234846000);
// rotate_erect(22414.000000000000000, -3983.4964056761296000)
{
src.s += -3983.4964056761296000;
float w = (abs(src.s) > 22414.000000000000000) ? 1.0 : 0.0;
float n = (src.s < 0.0) ? 0.5 : -0.5;
src.s += w * -44828.000000000000000 * ceil(src.s / 44828.000000000000000 + n);
}
// sphere_tp_erect(7134.5977889234846000)
{
float phi = src.s / 7134.5977889234846000;
float theta = -src.t / 7134.5977889234846000 + 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 = 7134.5977889234846000 * atan2_safe(r, s * cos(phi));
src = v * (theta / r);
}
// persp_sphere(7134.5977889234846000)
{
mat3 m = mat3(0.99999422706089558000, -0.0033808989395205978000, -0.00033965753742419075000,
0.0033979177273707746000, 0.99498566270847988000, 0.099959917765498105000,
0.00000000000000000000, -0.099960494831347613000, 0.99499140673328035000);
float r = length(src);
float theta = r / 7134.5977889234846000;
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 = 7134.5977889234846000 * atan2_safe(r, u.p) / r;
src = theta * u.st;
}
// rect_sphere_tp(7134.5977889234846000)
{
float r = length(src);
float theta = r / 7134.5977889234846000;
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(1.1320803173325249000, 1.1320803173325249000)
src *= vec2(1.1320803173325249000, 1.1320803173325249000);
// radial(0.99106007558674070000, 0.00000000000000000000, 0.0089399244132592603000, 0.00000000000000000000, 1296.0000000000000000, 1000.0000000000000000)
{
float r = length(src) / 1296.0000000000000000;
float scale = 1000.0;
if (r < 1000.0000000000000000) {
scale = ((0.00000000000000000000 * r + 0.0089399244132592603000) * r + 0.00000000000000000000) * r + 0.99106007558674070000;
}
src *= scale;
}
src += vec2(1935.5000000000000000, 1295.5000000000000000);
src = src * discardA + vec2(-1000.0, -1000.0) * discardB;
gl_FragColor = vec4(src.s, 0.0, 0.0, src.t);
}
#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;
}
#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 = 8.5940637232047938000e-005
// srcExposure = 9.9186669759203930000e-005
// 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(1935.5000000000000000, 1295.5000000000000000);
float radiusScale=0.00042923151604752391000;
float radialVigCorrCoeff0 = 1.0000000000000000000;
float radialVigCorrCoeff1 = -0.10335922565331300000;
float radialVigCorrCoeff2 = -0.017016817010169698000;
float radialVigCorrCoeff3 = 0.00047396845014202599000;
vec2 src = texture2DRect(CoordTexture, gl_TexCoord[0].st).sq;
vec2 d = src - vigCorrCenter;
d *= radiusScale;
vig = radialVigCorrCoeff0;
float r2 = dot(d, d);
float r = r2;
vig += radialVigCorrCoeff1 * r;
r *= r2;
vig += radialVigCorrCoeff2 * r;
r *= r2;
vig += radialVigCorrCoeff3 * r;
}
vec3 exposure_whitebalance = vec3(0.86645350066381432000, 0.86645350066381432000, 0.86645350066381432000);
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;
}
gpu shader program compile time = 0.125
nona: GL error: Framebuffer incomplete, incomplete attachment in: ..\..\..\hugin-2010.4.0_rc3\src\hugin_base\vigra_ext\ImageTransformsGPU.cpp:713
make: *** [DSC_2356-DSC_23600000.tif] Error 1
References