View Single Post
Old 20th August 2006, 03:54   #6  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Yesterday I got a mail from one of the users that my TransPush function of TransAll was in the "up" option sliding instead of pushing. On checking in my system I found that the "down" option was sliding and the rest of options were correct.

I checked my source and could find nothing wrong in that. Then I introduced 'else' in front of some if statements eventhough they should have no effect. I checked up values of parameters in the operating part of code and all were expected values. Still it did not work. After a dozen compilations suddenly it started to work. I am really perplexed as to what was happening.

The earlier TransAll plugin is at warpenterprises site. My yesterdays recompiled one is at my site. The source at my site is still the old one. The new source of the relevant part is
<code>
if(*dir=='d' || *dir=='D')

{ // RightFrame pushes down the leftframe

if(deltay<2)
return LeftFrame;

if(vi.IsRGB32())
{
for(int w=0;w<bwd;w++)
{

CopyVLineRGB32(LeftFramep+(deltay)*lpitch+4*w,
wp+4*w,
bht-deltay,lpitch,wpitch);
CopyVLineRGB32(RightFramep+4*w,
wp+(bht-deltay)*wpitch+4*w,
deltay,rpitch,wpitch);
}

}
else if(vi.IsRGB24())
{
for(int w=0;w<bwd;w++)
{
CopyVLineRGB24(LeftFramep+(deltay)*lpitch+3*w,
wp+3*w,
bht-deltay,lpitch,wpitch);
CopyVLineRGB24(RightFramep+3*w,
wp+(bht-deltay)*wpitch+3*w,
deltay,rpitch,wpitch);
}

}

else if(vi.IsYUY2())
{

for(int w=0;w<bwd;w+=2)
{
//

CopyVLineYUY2(LeftFramep + 2*w,
wp+deltay*wpitch + 2*w,
bht-deltay,lpitch,wpitch);
CopyVLineYUY2(RightFramep+(bht-deltay)*rpitch+2*w,
wp+2*w,
deltay,rpitch,wpitch);


}

}
else if(vi.IsYV12())
{
for(int w=0;w<bwd;w++)
{
CopyVLineYV12(LeftFramep+w,
wp+deltay*wpitch+w,
bht-deltay,lpitch,wpitch);
CopyVLineYV12(RightFramep+(bht-deltay)*rpitch+w,
wp+w,
deltay,rpitch,wpitch);
if((w & 1)==1)
continue;
CopyVLineYV12(lpU+w/2,
wpU+deltay/2*wpitchUV+w/2,
(bht-deltay)/2,lpitchUV,wpitchUV);
CopyVLineYV12(rpU+(bht-deltay)/2*rpitchUV+w/2,
wpU+w/2,
deltay/2,rpitchUV,wpitchUV);

CopyVLineYV12(lpV+w/2,
wpV+deltay/2*wpitchUV+w/2,
(bht-deltay)/2,lpitchUV,wpitchUV);
CopyVLineYV12(rpV+(bht-deltay)/2*rpitchUV+w/2,
wpV+w/2,
deltay/2,rpitchUV,wpitchUV);
}

}

}
</code>

I need help in unravelling this mystery.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote