Commit Graph

186 Commits

Author SHA1 Message Date
Christian R. Helmrich b17f659c35 update docs, v1.2.1 2023-12-21 17:00:02 +01:00
Christian R. Helmrich 6ba7b9f9dc finish 1.2.1 release 2023-12-20 13:01:00 +01:00
Christian R. Helmrich 1ba38d5894 finish MSE test code 2023-11-30 10:01:38 +01:00
Christian R. Helmrich 0b683be9c7 tune MSE test code 2023-09-30 19:00:23 +02:00
Christian R. Helmrich 1b231994ec add MSE test code 2023-08-30 20:00:08 +02:00
Christian R. Helmrich 4c5a301d30 update the (c) year 2023-07-31 17:00:15 +02:00
Christian R. Helmrich e796ab6a78 fix high-rate issues 2023-07-14 11:00:18 +02:00
Christian R. Helmrich cfbcd5b7cc update docs, v1.2.0 2022-11-29 12:00:02 +01:00
Christian R. Helmrich c0fe486c0f fix MSYS issue #26 2022-10-25 01:30:49 +02:00
Christian R. Helmrich 46ae72aabf fix Mac compiling 2022-10-24 02:03:20 +02:00
Christian R. Helmrich 9202dbcc19 finish 1.2.0 release 2022-10-23 19:00:10 +02:00
Christian R. Helmrich 444a006269 correct modes f, 5 2022-10-17 18:00:36 +00:00
Christian R. Helmrich 71f2a4ab92 fix TNS regression 2022-07-22 10:00:39 +00:00
John Regan b10947e9e9 Correct regression introduced in ac021570
In ac021570, a series of 4 int8_t was cast into an int32_t t, by
casting each int8_t into a uint32_t and shifting by an appropriate
number of bits, then casting back into int32_t.

It seems on GCC, when casting a negative int8_t into a uint32_t,
the sign bit is extended into the rest of the value. So you can wind up
with different values based on whether the integer is constructed using
little-endian ordering or big-endian.

Since the goal of the code is to just check if the values are the same
or not, this is replaced with a memcmp call.
2022-07-16 16:48:59 -04:00
John Regan ac021570a3 fix undefined behavior: unaligned read
Casting a type pointer into a larger type pointer requires
alignment. This replaces the unportable code with a portable
equivalent.
2022-07-07 10:54:23 -04:00
John Regan 5cc33e5af7 fix undefined behavior: left shift a negative integer
C/C++ leaves left-shifting a negative integer up to the compiler
implementation.

On most platforms, left-shifting a negative integer is the same as
casting to the unsigned equivalent, then casting back into the signed
type.

This replaces the left-shift with the mathematical equivalent and avoids
the undefined behavior.

Ideally this should be performed for any case of left-shifting a signed
type, but this commit only covers cases picked up by the undefined
behavior sanitizer.
2022-07-07 10:35:08 -04:00
John Regan c2665b890c Fix undefined behavior: shift exponent is too large
Previously, the bestOrder value was being decremented inside
the loop. This caused the following:

In the case where the loop enters with bestOrder == 2, the
value is decremented to 1, and the following operations occurs:

m_tnsPredGains[channelIndex] >> (8 * bestOrder - 16)

bestOrder being 1 - this evaluates to (8 - 16), causing an integer
underflow, and a right shift by 4294967288. m_tnsPredGains is a
32-bit unsigned int, right-shifting by a value > 32 is undefined.

I think the intent of the loop conditional is to avoid running the
calculation with bestOrder == 1 - as far as I can tell, this is
the lowest possible value.

By re-arranging the comparison and using a prefix decrement,
we can exhibit the same behavior but avoid the case where
bestOrder == 1 within the loop body.
2022-07-07 09:52:33 -04:00
Christian R. Helmrich 4ef4bc3c96 fix warning, credit 2022-06-30 07:00:12 +00:00
John Regan d21008f87b fixes for issue #24 2022-06-20 18:00:10 +00:00
John Regan 74512c0ce1 correction to C API 2022-06-17 18:00:24 +00:00
Christian R. Helmrich 00423757b1 finish 1.1.9 release 2021-12-17 11:00:00 +01:00
Christian R. Helmrich 7ebdd6308a fixes for issue #21 2021-11-10 06:00:00 +01:00
Christian R. Helmrich 7688ab502e finish 1.1.8 release 2021-10-27 10:00:00 +02:00
Christian R. Helmrich f145f63fe5 code cleanup, CBR 2021-09-27 12:00:00 +02:00
Christian R. Helmrich acd53a2198 finish 1.1.7 release 2021-08-30 09:00:00 +02:00
Christian R. Helmrich 9d500c648d loudness leveling 2021-07-31 23:00:00 +02:00
Christian R. Helmrich e72c4b1dcb allow 22-kHz SBR 2021-07-30 23:00:00 +02:00
Christian R. Helmrich 057bb87e64 clean DTX and RC 2021-06-28 23:00:00 +02:00
Christian R. Helmrich b11042a0f0 correct csgp atom 2021-05-29 16:00:01 +02:00
Christian R. Helmrich e38b9a3d7d finish 1.1.6 release 2021-05-22 18:00:00 +02:00
Christian R. Helmrich 1592b40c66 allow delayless SBR 2021-05-16 14:00:00 +02:00
Christian R. Helmrich a327f120c1 retune TNS for SBR 2021-05-13 01:00:01 +02:00
Christian R. Helmrich 08ac873cef near-mono tuning 2021-05-08 18:00:00 +02:00
Christian R. Helmrich aaf8b0aa5a finish reader, SBR 2021-05-06 22:00:00 +02:00
Christian R. Helmrich accb67be08 tune value for SBR 2021-05-04 10:00:00 +02:00
Christian R. Helmrich 9a1c4ee39d clean extra frames 2021-04-30 11:00:00 +02:00
Christian R. Helmrich 94a4ed9adf finish 1.1.5 release 2021-04-24 11:00:00 +02:00
Christian R. Helmrich cc4151b9c7 Universal2 support 2021-04-01 23:00:00 +02:00
Christian R. Helmrich c3a90381de clean up new code 2021-04-01 20:00:00 +02:00
Christian R. Helmrich d59780dcff fix Unicode text 2021-04-01 01:00:03 +02:00
Christian R. Helmrich 27e9e9e02e finish 1.1.4 release 2021-03-27 15:00:00 +01:00
Christian R. Helmrich 760f862fd5 app -> work path 2021-03-27 01:00:00 +01:00
Christian R. Helmrich ad8881519d fix frame flushing 2021-03-23 11:00:00 +01:00
Christian R. Helmrich ea8fed7f7e finish rel. notes 2021-03-22 01:00:00 +01:00
Christian R. Helmrich ab91fd8f9c realign and clean 2021-03-21 00:00:00 +01:00
Christian R. Helmrich 5bfcbaca3e clean up new code 2021-03-12 22:00:00 +01:00
Christian R. Helmrich 0bde366c7f autom. IPF update 2021-03-08 21:00:00 +01:00
Christian R. Helmrich 2d0fa2f10d some fine-tuning 2021-03-06 13:00:00 +01:00
Christian R. Helmrich 8cdc188bb6 editorial changes 2021-02-28 23:00:00 +01:00
Christian R. Helmrich 86f24988e2 improve IPF writing 2021-02-28 19:00:03 +01:00