Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fixed lint issues." #131

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions go/goohrli/goohrli.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ZimtohrliParameters DefaultZimtohrliParameters(float sample_rate);
typedef void* Zimtohrli;

// Returns a zimtohrli::Zimtohrli for the given parameters.
Zimtohrli CreateZimtohrli(ZimtohrliParameters params);
Zimtohrli CreateZimtohrli(const ZimtohrliParameters params);

// Deletes a zimtohrli::Zimtohrli.
void FreeZimtohrli(Zimtohrli z);
Expand All @@ -88,7 +88,7 @@ typedef struct {
} EnergyAndMaxAbsAmplitude;

// Returns the energy in dB FS, and maximum absolute amplitude, of the signal.
EnergyAndMaxAbsAmplitude Measure(float* signal, int size);
EnergyAndMaxAbsAmplitude Measure(const float* signal, int size);

// Normalizes the amplitudes of the signal so that it has the provided max
// amplitude, and returns the new energ in dB FS, and the new maximum absolute
Expand All @@ -102,10 +102,10 @@ EnergyAndMaxAbsAmplitude NormalizeAmplitude(float max_abs_amplitude,
// minimum channel bandwidth (zimtohrli::Cam.minimum_bandwidth_hz)
// of 5Hz and perceptual sample rate
// (zimtohrli::Distance(..., perceptual_sample_rate, ...) of 100Hz.
float MOSFromZimtohrli(Zimtohrli zimtohrli, float zimtohrli_distance);
float MOSFromZimtohrli(const Zimtohrli zimtohrli, float zimtohrli_distance);

// Returns the Zimtohrli distance between data_b and data_b.
float Distance(Zimtohrli zimtohrli, float* data_a, int size_a,
float Distance(const Zimtohrli zimtohrli, float* data_a, int size_a,
float* data_b, int size_b);

// Sets the parameters.
Expand All @@ -116,7 +116,7 @@ void SetZimtohrliParameters(Zimtohrli zimtohrli,
ZimtohrliParameters parameters);

// Returns the parameters.
ZimtohrliParameters GetZimtohrliParameters(Zimtohrli zimtohrli);
ZimtohrliParameters GetZimtohrliParameters(const Zimtohrli zimtohrli);

// void* representation of zimtohrli::ViSQOL.
typedef void* ViSQOL;
Expand All @@ -134,8 +134,8 @@ typedef struct {
} MOSResult;

// MOS returns a ViSQOL MOS between reference and distorted.
MOSResult MOS(ViSQOL v, float sample_rate, float* reference,
int reference_size, float* distorted, int distorted_size);
MOSResult MOS(const ViSQOL v, float sample_rate, const float* reference,
int reference_size, const float* distorted, int distorted_size);

#ifdef __cplusplus
}
Expand Down
Loading