jl777 7 years ago
parent
commit
79176ef6cc
  1. 11
      iguana/exchanges/LP_privkey.c

11
iguana/exchanges/LP_privkey.c

@ -483,12 +483,13 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
{
val = row_ptrs[compnum][0][blocknum][i];
//if ( val < -8 || val > 8 )
if ( val >= 0 && val < 2 )
if ( val == 0 || val == 1 )
{
if ( (*capacityp) < required )
{
if ( (val & 1) != 0 )
decoded[(*capacityp) >> 3] |= (1 << ((*capacityp)&7));
printf("%c",(val&1)!=0?'1':'0');
}
(*capacityp)++;
}
@ -520,12 +521,13 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
{
val = coef_buffers[compnum][rownum][blocknum][i];
//if ( val < -8 || val > 8 )
if ( val >= 0 && val < 2 )
if ( val == 0 || val == 1 )
{
val &= ~1;
if ( (emit < required && (data[emit >> 3] & (1 << (emit&7))) != 0) || (rand() & 1) != 0 )
val |= 1;
emit++;
printf("%c",(val&1)!=0?'1':'0');
}
coef_buffers[compnum][rownum][blocknum][i] = val;
//printf("%i,", coef_buffers[compnum][rownum][blocknum][i]);
@ -533,9 +535,8 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
}
}
}
//printf("\n\n");
/* Output the new DCT coeffs to a JPEG file */
printf(" emit.%d\n",emit);
// Output the new DCT coeffs to a JPEG file
modified = 0;
for (compnum=0; compnum<num_components; compnum++)
{

Loading…
Cancel
Save