You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Update qoa.h to latest git
This commit is contained in:
2
thirdparty/README.md
vendored
2
thirdparty/README.md
vendored
@@ -792,7 +792,7 @@ Collection of single-file libraries used in Godot components.
|
||||
- `polypartition-0002-shadow-warning.patch` (GH-66808)
|
||||
- `qoa.{c,h}`
|
||||
* Upstream: https://github.com/phoboslab/qoa
|
||||
* Version: git (a2d927f8ce78a85e903676a33e0f956e53b89f7d, 2024)
|
||||
* Version: git (ae07b57deb98127a5b40916cb57775823d7437d2, 2025)
|
||||
* License: MIT
|
||||
* Modifications: Added implementation through `qoa.c`.
|
||||
- `r128.{c,h}`
|
||||
|
||||
4
thirdparty/misc/qoa.h
vendored
4
thirdparty/misc/qoa.h
vendored
@@ -387,7 +387,7 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
||||
int slice_start = sample_index * channels + c;
|
||||
int slice_end = (sample_index + slice_len) * channels + c;
|
||||
|
||||
/* Brute for search for the best scalefactor. Just go through all
|
||||
/* Brute force search for the best scalefactor. Just go through all
|
||||
16 scalefactors, encode all samples for the current slice and
|
||||
meassure the total squared error. */
|
||||
qoa_uint64_t best_rank = -1;
|
||||
@@ -402,7 +402,7 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
||||
/* There is a strong correlation between the scalefactors of
|
||||
neighboring slices. As an optimization, start testing
|
||||
the best scalefactor of the previous slice first. */
|
||||
int scalefactor = (sfi + prev_scalefactor[c]) % 16;
|
||||
int scalefactor = (sfi + prev_scalefactor[c]) & (16 - 1);
|
||||
|
||||
/* We have to reset the LMS state to the last known good one
|
||||
before trying each scalefactor, as each pass updates the LMS
|
||||
|
||||
Reference in New Issue
Block a user