diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-08-25 19:43:32 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-08-25 19:43:32 (GMT) |
commit | 908c7a8222769dc48824f12b0c30570994c50b86 (patch) | |
tree | 0b544ea55e4a985d1bb136889828f92c9b714e92 /src | |
parent | c28d63481bb1d6cbfa9075d923e2d5ff9e33d5d5 (diff) |
Initialize tng compressions algorithm completely.
Also fixed a bug where position and velocity compression
algorithms were mixed up.
Change-Id: Ia52351e0099b2f156ffdc974eef62fb9f548eb4c
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/tng_io.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index e4234a5..54b7e84 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -4645,11 +4645,15 @@ static tng_function_status tng_compress(tng_trajectory_t tng_data, { alt_algo[0] = tng_data->compress_algo_pos[0]; alt_algo[1] = tng_data->compress_algo_pos[1]; + alt_algo[2] = tng_data->compress_algo_pos[2]; + alt_algo[3] = tng_data->compress_algo_pos[3]; } else { alt_algo[0] = -1; alt_algo[1] = -1; + alt_algo[2] = -1; + alt_algo[3] = -1; } /* If the initial coding and initial coding parameter are -1 @@ -4778,15 +4782,19 @@ static tng_function_status tng_compress(tng_trajectory_t tng_data, /* If we have already determined the initial coding and * initial coding parameter do not determine them again. */ - if(tng_data->compress_algo_pos) + if(tng_data->compress_algo_vel) { alt_algo[0] = tng_data->compress_algo_vel[0]; alt_algo[1] = tng_data->compress_algo_vel[1]; + alt_algo[2] = tng_data->compress_algo_vel[2]; + alt_algo[3] = tng_data->compress_algo_vel[3]; } else { alt_algo[0] = -1; alt_algo[1] = -1; + alt_algo[2] = -1; + alt_algo[3] = -1; } /* If the initial coding and initial coding parameter are -1 |