1
0

template.c: bit depth < 8: fix the bug

This commit is contained in:
Intel A80486DX2-66 2024-01-09 17:16:15 +03:00
parent 16126c0b98
commit eb531a2fe7
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -139,7 +139,7 @@ main(void)
// 4. if bit depth is less than 8, stretch it // 4. if bit depth is less than 8, stretch it
#if BIT_DEPTH < 8 #if BIT_DEPTH < 8
sample_res = (SAMPLE_TYPE) sample_res = (SAMPLE_TYPE)
((long double) buffer[w] * ((long double) BIT_DEPTH / 8.L)); ((long double) sample_res * ((long double) BIT_DEPTH / 8.L));
#endif #endif
// 5. save sample into buffer // 5. save sample into buffer