From 564a91c16b6ff1f5576bc98bb2c9804e8d4b1e4a Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 24 Jan 2018 20:53:22 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_privkey.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/iguana/exchanges/LP_privkey.c b/iguana/exchanges/LP_privkey.c index c73706b5d..89ec7516e 100644 --- a/iguana/exchanges/LP_privkey.c +++ b/iguana/exchanges/LP_privkey.c @@ -482,15 +482,14 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin for (i=0; i 8 ) - if ( val == 0 || val == 1 ) + if ( val < -limit || val > limit ) { if ( (*capacityp) < required ) { if ( (val & 1) != 0 ) SETBIT(decoded,(*capacityp)); //decoded[(*capacityp) >> 3] |= (1 << ((*capacityp)&7)); - printf("%c",(val&1)!=0?'1':'0'); + //printf("%c",(val&1)!=0?'1':'0'); } (*capacityp)++; } @@ -521,14 +520,11 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin for (i=0; i 8 ) - if ( val == 0 || val == 1 ) + if ( val < -limit || val > limit ) { val &= ~1; if ( (emit < required && GETBIT(data,emit) != 0) || (emit >= required && (rand() & 1) != 0) ) val |= 1; - if ( emit < required ) - printf("%d",val-'0'); emit++; } coef_buffers[compnum][rownum][blocknum][i] = val; @@ -537,7 +533,6 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin } } } - printf(" emit.%d\n",emit); // Output the new DCT coeffs to a JPEG file modified = 0; for (compnum=0; compnum 0 ) @@ -612,7 +607,7 @@ char *LP_jpg(char *srcfile,char *destfile,int32_t power2,char *passphrase,char * { printf("len.%d required.%d capacity.%d\n",len,required,capacity); decodedstr = calloc(1,(len+required)*2+1); - init_hexbytes_noT(decodedstr,decoded,required/8+1); + init_hexbytes_noT(decodedstr,decoded,required/8); jaddstr(retjson,"decoded",decodedstr); free(decodedstr); }