vcmohan
21st July 2008, 10:51
While trying to print some values for debugging one of my plugins, I noted after hours of wasting time a problem. The values reported for nv[1] are different in the two statements !
// copy values
for( int sh = 0; sh < currentheight; sh ++)
newVseammap[wremoved * bht + sh] = seammap[wseamindex + sh * bwd ];
int *nv = newVseammap + wremoved * bht, *nv1 = seammap + wseamindex;
if ( n == - test1 && wremoved == -test2) env->ThrowError("%d %d",nv[1], nv1[bwd]);
env->ThrowError("n =%d seam =%d last:- %d %d %d %d %d %d %d %d %d %d * new:- %d %d %d %d %d %d %d %d %d %d",n,-wremoved,
nv[0],nv[1],nv[2],nv[3],nv[4],nv[5],nv[6],nv[7],nv[8],nv[9],
nv1[0],nv1[bwd],nv1[2*bwd],nv1[3*bwd],nv1[4*bwd],nv1[5*bwd],nv1[6*bwd],nv1[7*bwd],nv1[8*bwd],nv1[9*bwd]);
If i comment out the first ThrowError statement, the print for nv[1] is one less than actual value. (in my case it shows 62 instead of the correct value 63)
Is this a problem with vc6 or within Avisynth?
// copy values
for( int sh = 0; sh < currentheight; sh ++)
newVseammap[wremoved * bht + sh] = seammap[wseamindex + sh * bwd ];
int *nv = newVseammap + wremoved * bht, *nv1 = seammap + wseamindex;
if ( n == - test1 && wremoved == -test2) env->ThrowError("%d %d",nv[1], nv1[bwd]);
env->ThrowError("n =%d seam =%d last:- %d %d %d %d %d %d %d %d %d %d * new:- %d %d %d %d %d %d %d %d %d %d",n,-wremoved,
nv[0],nv[1],nv[2],nv[3],nv[4],nv[5],nv[6],nv[7],nv[8],nv[9],
nv1[0],nv1[bwd],nv1[2*bwd],nv1[3*bwd],nv1[4*bwd],nv1[5*bwd],nv1[6*bwd],nv1[7*bwd],nv1[8*bwd],nv1[9*bwd]);
If i comment out the first ThrowError statement, the print for nv[1] is one less than actual value. (in my case it shows 62 instead of the correct value 63)
Is this a problem with vc6 or within Avisynth?