mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibMedia: Correct the formula for converting u8 samples to float
This commit is contained in:
committed by
Gregory Bertilson
parent
7c101ab910
commit
269f232e52
Notes:
github-actions[bot]
2025-12-16 00:04:14 +00:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/269f232e528 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7149
@@ -132,7 +132,7 @@ static float float_sample_from_frame_data(u8** data, size_t plane, size_t index)
|
||||
template<>
|
||||
float float_sample_from_frame_data<u8>(u8** data, size_t plane, size_t index)
|
||||
{
|
||||
return static_cast<float>(data[plane][index] - 127) / 255;
|
||||
return static_cast<float>(data[plane][index] - 128) / 128;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user