Audacity 3.2.0
|
#include "Dither.h"
#include "Internat.h"
#include "Prefs.h"
#include "float_cast.h"
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <wx/defs.h>
Go to the source code of this file.
Classes | |
struct | State |
Typedefs | |
using | Ditherer = float(*)(State &, float) |
Functions | |
static float | DITHER_NOISE () |
static float | FROM_INT16 (const short *ptr) |
static float | FROM_INT24 (const int *ptr) |
static float | FROM_FLOAT (const float *ptr) |
template<typename dst_type > | |
static void | IMPLEMENT_STORE (dst_type *ptr, float sample, dst_type min_bound, dst_type max_bound) |
static void | DITHER_TO_INT16 (Ditherer dither, State &state, short *dst, float sample) |
static void | DITHER_TO_INT24 (Ditherer dither, State &state, int *dst, float sample) |
template<typename srcType , typename dstType > | |
static void | DITHER_LOOP (Ditherer dither, State &state, void(*store)(Ditherer, State &, dstType *, float), float(*load)(const srcType *), samplePtr dst, sampleFormat dstFormat, size_t dstStride, constSamplePtr src, sampleFormat srcFormat, size_t srcStride, size_t len) |
static void | DITHER (Ditherer dither, State &state, samplePtr dst, sampleFormat dstFormat, size_t dstStride, constSamplePtr src, sampleFormat srcFormat, size_t srcStride, size_t len) |
static float | NoDither (State &, float sample) |
static float | RectangleDither (State &, float sample) |
static float | TriangleDither (State &state, float sample) |
static float | ShapedDither (State &state, float sample) |
Variables | |
constexpr int | BUF_SIZE = 8 |
constexpr int | BUF_MASK = 7 |
const float | SHAPED_BS [] = { 2.033f, -2.165f, 1.959f, -1.590f, 0.6149f } |
struct State | mState |
constexpr auto | CONVERT_DIV16 = float(1<<15) |
constexpr auto | CONVERT_DIV24 = float(1<<23) |
static const std::initializer_list< EnumValueSymbol > | choicesDither |
static auto | intChoicesDither |
Definition at line 73 of file Dither.cpp.
|
inlinestatic |
Definition at line 162 of file Dither.cpp.
References DITHER_TO_INT16(), DITHER_TO_INT24(), floatSample, FROM_FLOAT(), FROM_INT24(), int16Sample, and int24Sample.
Referenced by Dither::Apply().
|
inlinestatic |
Definition at line 143 of file Dither.cpp.
References SAMPLE_SIZE.
|
inlinestatic |
Definition at line 76 of file Dither.cpp.
Referenced by RectangleDither(), ShapedDither(), and TriangleDither().
|
inlinestatic |
Definition at line 123 of file Dither.cpp.
References CONVERT_DIV16.
Referenced by DITHER().
|
inlinestatic |
Definition at line 132 of file Dither.cpp.
References CONVERT_DIV24.
Referenced by DITHER().
|
inlinestatic |
Definition at line 99 of file Dither.cpp.
Referenced by DITHER().
|
inlinestatic |
Definition at line 86 of file Dither.cpp.
References CONVERT_DIV16.
Referenced by Dither::Apply().
|
inlinestatic |
Definition at line 91 of file Dither.cpp.
References CONVERT_DIV24.
Referenced by Dither::Apply(), and DITHER().
|
inlinestatic |
Definition at line 110 of file Dither.cpp.
References lrintf.
|
inlinestatic |
Definition at line 331 of file Dither.cpp.
Referenced by Dither::Apply().
|
inlinestatic |
Definition at line 337 of file Dither.cpp.
References DITHER_NOISE().
Referenced by Dither::Apply().
|
inlinestatic |
Definition at line 353 of file Dither.cpp.
References BUF_MASK, DITHER_NOISE(), lrintf, State::mBuffer, State::mPhase, and SHAPED_BS.
Referenced by Dither::Apply().
|
inlinestatic |
Definition at line 343 of file Dither.cpp.
References DITHER_NOISE(), and State::mTriangleState.
Referenced by Dither::Apply().
|
constexpr |
Definition at line 61 of file Dither.cpp.
Referenced by ShapedDither().
|
constexpr |
Definition at line 60 of file Dither.cpp.
Referenced by Dither::Reset().
|
static |
Definition at line 377 of file Dither.cpp.
|
constexpr |
Definition at line 82 of file Dither.cpp.
Referenced by DITHER_TO_INT16(), and FROM_INT16().
|
constexpr |
Definition at line 83 of file Dither.cpp.
Referenced by DITHER_TO_INT24(), and FROM_INT24().
|
static |
Definition at line 383 of file Dither.cpp.
struct State mState |
Referenced by Dither::Apply(), audacity::cloud::audiocom::sync::CloudSyncStatusField::GetWidth(), audacity::cloud::audiocom::sync::RemoteProjectSnapshot::InProgress(), audacity::cloud::audiocom::sync::CloudSyncStatusField::IsVisible(), audacity::cloud::audiocom::sync::CloudSyncStatusField::MarkDirty(), audacity::cloud::audiocom::sync::CloudSyncStatusField::OnCloudStatusChanged(), BassTrebleBase::Instance::ProcessBlock(), PhaserBase::Instance::ProcessBlock(), ReverbBase::Instance::ProcessBlock(), WahWahBase::Instance::ProcessBlock(), BassTrebleBase::Instance::ProcessInitialize(), PhaserBase::Instance::ProcessInitialize(), ReverbBase::Instance::ProcessInitialize(), BassTrebleBase::Instance::RealtimeProcess(), PhaserBase::Instance::RealtimeProcess(), ReverbBase::Instance::RealtimeProcess(), WahWahBase::Instance::RealtimeProcess(), audacity::cloud::audiocom::sync::RemoteProjectSnapshot::ReportProgress(), Dither::Reset(), audacity::cloud::audiocom::sync::RemoteProjectSnapshot::SetState(), and ToolBarGrabber::ToolBarGrabber().
const float SHAPED_BS[] = { 2.033f, -2.165f, 1.959f, -1.590f, 0.6149f } |
Definition at line 64 of file Dither.cpp.
Referenced by ShapedDither().