Skip to content

Commit

Permalink
use library assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
aikiriao committed Jun 22, 2024
1 parent 5d6218e commit 9fbdcad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/srla_coder/src/srla_coder.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static uint32_t RecursiveRice_ComputeCodeLength(const uint32_t *data, uint32_t n
uint32_t smpl, length;
const uint32_t k1pow = 1U << k1;

assert(data != NULL);
SRLA_ASSERT(data != NULL);

#if 0
length = 0;
Expand All @@ -378,7 +378,7 @@ static uint32_t RecursiveRice_ComputeCodeLength(const uint32_t *data, uint32_t n
}
}
#else
assert((k2 + 1) == k1);
SRLA_ASSERT((k2 + 1) == k1);
length = (k1 + 1) * num_samples;
for (smpl = 0; smpl < num_samples; smpl++) {
length += (SRLAUTILITY_MAX(0, (int32_t)data[smpl] - (int32_t)k1pow) >> k2);
Expand Down

0 comments on commit 9fbdcad

Please sign in to comment.