Merge branch 'feature/ECC-1427-Performace-CCSDS' into develop

This commit is contained in:
Shahram Najm 2022-07-25 17:10:44 +01:00
commit 3d5c52b5f0
1 changed files with 6 additions and 3 deletions

View File

@ -224,7 +224,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
size_t n_vals = 0;
size_t size = 0;
unsigned char* decoded = NULL;
unsigned char* p = NULL;
/*unsigned char* p = NULL;*/
long pos = 0;
long nn = 0;
@ -310,11 +310,14 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
/* printf("bscale=%g dscale=%g reference_value=%g\n",bscale,dscale,reference_value); */
pos = 0;
#if 0
p = decoded;
for (i = 0; i < n_vals; i++) {
val[i] = (double)(((grib_decode_unsigned_long(p, &pos, bits8) * bscale) + reference_value) * dscale);
}
/*-------------------------------------------*/
#endif
/* ECC-1427: Performance improvement */
grib_decode_double_array(decoded, &pos, bits8 , reference_value, bscale, dscale, n_vals, val);
*len = n_vals;
cleanup: