class CoefficientTable

Defined at line 39 of file ../../src/media/audio/lib/processing/coefficient_table.h

`CoefficientTable` is a shim around `std::vector` that maps indices into a physical addressing

scheme that is most optimal with respect to how this table is typically accessed. More

specifically, they are most commonly accessed with an integral stride (that is `1

<

<

frac_bits`

stride). We optimize for this use case by placing these values physically contiguously in memory.

Coefficient tables represent one side of a symmetric convolution filter. Coefficients cover the

entire discrete space of fractional position values, but for any calculation we reference only a

small subset of these values (see `ReadSlice` below for an example).

Public Methods

void CoefficientTable (int64_t width, int32_t frac_bits, cpp20::span<const float> data)

`width` is the filter width of this table, in fixed point format with `frac_bits` of fractional

precision. The `width` will determine the number of entries in the table, which will be `width`

rounded up to the nearest integer in the same fixed-point format. `data` provides the raw table

data ordered by physical address. If `data` is empty, storage is allocated automatically.

Defined at line 45 of file ../../src/media/audio/lib/processing/coefficient_table.h

const float & operator[] (int64_t offset)

Defined at line 57 of file ../../src/media/audio/lib/processing/coefficient_table.h

const float * ReadSlice (int64_t offset, int64_t num_coefficients)

Reads `num_coefficients` coefficients starting at `offset`. The result is a pointer to

`num_coefficients` coefficients with the following semantics:

```

auto c = new CoefficientTable(width, frac_bits);

auto f = c->ReadSlice(offset, size);

ASSERT_EQ(f[0], c[off + 0

<

<

frac_bits]);

ASSERT_EQ(f[1], c[off + 1

<

<

frac_bits]);

...

ASSERT_EQ(f[size], c[off + size

<

<

frac_bits]);

```

Defined at line 70 of file ../../src/media/audio/lib/processing/coefficient_table.h

cpp20::span<const float> raw_table ()

Returns the raw table in physical (not logical) order.

Defined at line 81 of file ../../src/media/audio/lib/processing/coefficient_table.h

size_t PhysicalIndex (int64_t offset)

Returns the physical index corresponding to the given logical index.

Defined at line 84 of file ../../src/media/audio/lib/processing/coefficient_table.h

Friends

class CoefficientTableTest
class CoefficientTableBuilder