"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "base/gxblend1.c" between
ghostpdl-9.28rc1.tar.xz and ghostpdl-9.28rc2.tar.xz

About: GhostPDL is a suite of interpreters for PCL, PXL and XPS implemented using the Ghostscript graphics library (GPL release). Release candidate.

gxblend1.c  (ghostpdl-9.28rc1.tar.xz):gxblend1.c  (ghostpdl-9.28rc2.tar.xz)
skipping to change at line 879 skipping to change at line 879
/* Convert from native -> big endian */ /* Convert from native -> big endian */
/* FIXME: Are compilers smart enough to spot that this is /* FIXME: Are compilers smart enough to spot that this is
* a no-op on big endian hosts? */ * a no-op on big endian hosts? */
for (comp_num = 0; comp_num < num_comp; comp_num++) { for (comp_num = 0; comp_num < num_comp; comp_num++) {
comp = buf_ptr[position + planestride * comp_num]; comp = buf_ptr[position + planestride * comp_num];
((byte *)&buf_ptr[position + planestride * comp_num])[0] = c omp>>8; ((byte *)&buf_ptr[position + planestride * comp_num])[0] = c omp>>8;
((byte *)&buf_ptr[position + planestride * comp_num])[1] = c omp; ((byte *)&buf_ptr[position + planestride * comp_num])[1] = c omp;
} }
} else { } else {
a ^= 0xffff; a ^= 0xffff;
a += a>>15; a += a>>15; /* a is now 0 to 0x10000 */
a >>= 1; /* We can only use 15 bits as bg-comp has a sign bit we
can't lose */
for (comp_num = 0; comp_num < num_comp; comp_num++) { for (comp_num = 0; comp_num < num_comp; comp_num++) {
comp = buf_ptr[position + planestride * comp_num]; comp = buf_ptr[position + planestride * comp_num];
tmp = ((bg - comp) * a) + 0x8000; tmp = (((int)bg - comp) * a) + 0x4000;
comp += (tmp >> 16); /* Errors in bit 16 upwards will be ign comp += (tmp >> 15); /* Errors in bit 16 upwards will be ign
ored */ ored */
/* Store as big endian */ /* Store as big endian */
((byte *)&buf_ptr[position + planestride * comp_num])[0] = c omp>>8; ((byte *)&buf_ptr[position + planestride * comp_num])[0] = c omp>>8;
((byte *)&buf_ptr[position + planestride * comp_num])[1] = c omp; ((byte *)&buf_ptr[position + planestride * comp_num])[1] = c omp;
} }
} }
position+=1; position+=1;
} }
} }
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)