GRIB Performance: Improve decoding speed of CCSDS packing
@@ -311,10 +311,13 @@ 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;
p = decoded;
+#if 0
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:
