-static uint64_t block_fs(struct aec_stream *strm, int k)
-{
- /**
- Sum FS of all samples in block for given splitting position.
- */
-
- int i;
- uint64_t fs = 0;
- struct internal_state *state = strm->state;
-
- for (i = 0; i < strm->block_size; i += 8)
- fs +=
- (uint64_t)(state->block[i + 0] >> k)
- + (uint64_t)(state->block[i + 1] >> k)
- + (uint64_t)(state->block[i + 2] >> k)
- + (uint64_t)(state->block[i + 3] >> k)
- + (uint64_t)(state->block[i + 4] >> k)
- + (uint64_t)(state->block[i + 5] >> k)
- + (uint64_t)(state->block[i + 6] >> k)
- + (uint64_t)(state->block[i + 7] >> k);
-
- if (state->ref)
- fs -= (uint64_t)(state->block[0] >> k);
-
- return fs;
-}
-