google / lyra

A Very Low-Bitrate Codec for Speech Compression
Apache License 2.0
3.8k stars 354 forks source link

Why does the sampling result need to be multiplied by 256? #139

Open Joll123 opened 5 months ago

Joll123 commented 5 months ago

Hi, in project_and_sample.h of Lyra-0.0.2-release, why does the sampling result be multipled by 256? float f_result = mean + scale log((1.0f - prob) / prob); int result = std::min(static_cast(std::numeric_limits::max()), std::max(static_cast(std::numeric_limits::min()), static_cast(f_result 256)));