-
August 4th, 2014, 04:06 AM
#1
Compile 64bit more like 32bit in vs2008? issue with CxImage Library.
I have an issue with CxImage 7.01 library in 64bit mode with a certain TIFF file with Jpeg compression causing a crash.
BUT compiled as 32bit it works fine! but I need it as 64bit for a called dll been called by a 64bit app.
So, is there any flags that can be unset in the compiler to compile more like 32bit mode?
The issue is described below runnin the demo app provided:-
Windows 7, 64bit. Visual Studio 2008 sp
Unhandled exception at 0x00000001401d726a in demod.exe: 0xC0000005: Access violation writing location 0x0000000405c6ab30.
tif_getimage.c
/*
* 8-bit packed YCbCr samples w/ 2,2 subsampling => RGB
*/
DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
{
uint32* cp2;
(void) y;
fromskew = (fromskew / 2) * 6;
cp2 = cp+w+toskew;
while (h>=2) {
x = w;
while (x>=2) {
uint32 Cb = pp[4];
uint32 Cr = pp[5];
YCbCrtoRGB(cp[0], pp[0]); <--- ERRORS OUT HERE!
-
August 4th, 2014, 04:29 AM
#2
Re: Compile 64bit more like 32bit in vs2008? issue with CxImage Library.
fixed it...
found an update to that .c file.
/*
* 8-bit packed YCbCr samples w/ 2,2 subsampling => RGB
*/
DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
{
uint32* cp2;
int32 incr = 2*toskew+w;
(void) y;
fromskew = (fromskew / 2) * 6;
cp2 = cp+w+toskew;
while (h>=2) {
x = w;
while (x>=2) {
uint32 Cb = pp[4];
uint32 Cr = pp[5];
YCbCrtoRGB(cp[0], pp[0]);
YCbCrtoRGB(cp[1], pp[1]);
YCbCrtoRGB(cp2[0], pp[2]);
YCbCrtoRGB(cp2[1], pp[3]);
cp += 2;
cp2 += 2;
pp += 6;
x -= 2;
}
if (x==1) {
uint32 Cb = pp[4];
uint32 Cr = pp[5];
YCbCrtoRGB(cp[0], pp[0]);
YCbCrtoRGB(cp2[0], pp[2]);
cp ++ ;
cp2 ++ ;
pp += 6;
}
cp += incr;
cp2 += incr;
pp += fromskew;
h-=2;
}
if (h==1) {
x = w;
while (x>=2) {
uint32 Cb = pp[4];
uint32 Cr = pp[5];
YCbCrtoRGB(cp[0], pp[0]);
YCbCrtoRGB(cp[1], pp[1]);
cp += 2;
cp2 += 2;
pp += 6;
x -= 2;
}
if (x==1) {
uint32 Cb = pp[4];
uint32 Cr = pp[5];
YCbCrtoRGB(cp[0], pp[0]);
}
}
}
-
August 4th, 2014, 05:36 AM
#3
Re: Compile 64bit more like 32bit in vs2008? issue with CxImage Library.
Glad you have solved your problem.
Next time, please, use Code tags while posting code snippets! See Announcement: Before you post....
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|