mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
update brrUtils aaaaaaagain
This commit is contained in:
parent
cbdf23efa7
commit
d78b1cb79a
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,7 @@ long brrEncode(short* buf, unsigned char* out, long len, long loopStart) {
|
|||
for (int j=0; j<16; j++) {
|
||||
short s=buf[j];
|
||||
if (s<0) s=-s;
|
||||
while (range<11 && s>((8<<range)-1)) range++;
|
||||
while (range<12 && s>((8<<range)-1)) range++;
|
||||
}
|
||||
next[0]=(range<<4)|(filter<<2)|((i+16>len)?1:0);
|
||||
switch (filter) {
|
||||
|
@ -67,6 +67,7 @@ long brrEncode(short* buf, unsigned char* out, long len, long loopStart) {
|
|||
o0=buf[j]>>range;
|
||||
if (o0>7) o0=7;
|
||||
if (o0<-8) o0=-8;
|
||||
if (range>=12) if (o0<-7) o0=-7;
|
||||
o=o0&15;
|
||||
if (j&1) {
|
||||
next[1+(j>>1)]|=o;
|
||||
|
|
Loading…
Reference in a new issue