## DCT

DCT — Discrete Cosine Transform Related Function Classes

##

# Synopsis

    void        oil_dct36_f32                   (float *d_36,
                                                 int dstr,
                                                 const float *s_36,
                                                 int sstr);
    void        oil_fdct8_f64                   (double *d_8,
                                                 const double *s_8,
                                                 int dstr,
                                                 int sstr);
    void        oil_fdct8x8_f64                 (double *d_8x8,
                                                 int dstr,
                                                 const double *s_8x8,
                                                 int sstr);
    void        oil_fdct8x8s_s16                (int16_t *d_8x8,
                                                 int ds,
                                                 const int16_t *s_8x8,
                                                 int ss);
    void        oil_idct8_f64                   (double *d_8,
                                                 int dstr,
                                                 const double *s_8,
                                                 int sstr);
    void        oil_idct8x8_f64                 (double *d_8x8,
                                                 int dstr,
                                                 const double *s_8x8,
                                                 int sstr);
    void        oil_idct8x8_s16                 (int16_t *d_8x8,
                                                 int dstr,
                                                 const int16_t *s_8x8,
                                                 int sstr);
    void        oil_imdct12_f64                 (double *d_12,
                                                 const double *s_6);
    void        oil_imdct32_f32                 (float *d_32,
                                                 const float *s_32);
    void        oil_imdct36_f64                 (double *d_36,
                                                 const double *s_18);
    void        oil_mdct12_f64                  (double *d_6,
                                                 const double *s_12);
    void        oil_mdct36_f64                  (double *d_18,
                                                 const double *s_36);
    void        oil_idct8theora_s16             (int16_t *d_8,
                                                 int dstr,
                                                 const int16_t *s_8,
                                                 int sstr);
    void        oil_idct8x8lim10_f64            (double *d_8x8,
                                                 int dstr,
                                                 const double *s_8x8,
                                                 int sstr);
    void        oil_idct8x8lim10_s16            (int16_t *d_8x8,
                                                 int dstr,
                                                 const int16_t *s_8x8,
                                                 int sstr);
    void        oil_idct8x8theora_s16           (int16_t *d_8x8,
                                                 int dstr,
                                                 const int16_t *s_8x8,
                                                 int sstr);

## Description

Functions operate on arrays of data. The arrays can be either source arrays (input only), destination arrays (output only), or in-place arrays (both input and output).

The interpretation of a parameter can usually be determined from its name. Parameters for arrays are of the form d1_1xn, where the first character represents the direction (source, destination, or in-place), the second represents the index for that particular direction, and the characters after the underscore indicate the size of the array. In this case, "1xn" represents an array that is 1 by N. Note that the index and the size can both be omitted, giving a default of 1 for the index and 1xn for the size.

Parameters that represent strides are of the form "d1s". The interpretation is similar to above, except that the s indicates a stride parameter.

The exceptions to the above rule are "dest", "src", "dstr", "sstr", etc. These are aliases for "d1", "s1", "d1s", and "s1s", respectively. This form is deprecated and will be removed in the 0.4 series.

Two special parameters are "n" and "m", which determine the size of the arrays in other parameters.

Data arrays are laid out such that rows are separated by the number of bytes given by the corresponding stride. Elements in each row are contiguous. If there is no stride parameter corresponding to an array, the rows of the array are contiguous.

## Details

### oil_dct36_f32 ()

    void        oil_dct36_f32                   (float *d_36,
                                                 int dstr,
                                                 const float *s_36,
                                                 int sstr);

`d_36` : |
`dstr` : |
`s_36` : |
`sstr` : |

### oil_fdct8_f64 ()

    void        oil_fdct8_f64                   (double *d_8,
                                                 const double *s_8,
                                                 int dstr,
                                                 int sstr);

Calculates the forward discrete cosine transform on the source array.

`d_8` : |
`s_8` : |
`dstr` : |
`sstr` : |

### oil_fdct8x8_f64 ()

    void        oil_fdct8x8_f64                 (double *d_8x8,
                                                 int dstr,
                                                 const double *s_8x8,
                                                 int sstr);

Calculates the 2-D forward discrete cosine transform on the source array.

`d_8x8` : |
`dstr` : |
`s_8x8` : |
`sstr` : |

### oil_fdct8x8s_s16 ()

    void        oil_fdct8x8s_s16                (int16_t *d_8x8,
                                                 int ds,
                                                 const int16_t *s_8x8,
                                                 int ss);

Calculates the 2-D forward discrete cosine transform on the source array, multiplying some values in the destination array by values interesting to the algorithm. This function is not recommended.

`d_8x8` : |
`ds` : |
`s_8x8` : |
`ss` : |

### oil_idct8_f64 ()

    void        oil_idct8_f64                   (double *d_8,
                                                 int dstr,
                                                 const double *s_8,
                                                 int sstr);

Calculates the inverse discrete cosine transform on the source array.

`d_8` : |
`dstr` : |
`s_8` : |
`sstr` : |

### oil_idct8x8_f64 ()

    void        oil_idct8x8_f64                 (double *d_8x8,
                                                 int dstr,
                                                 const double *s_8x8,
                                                 int sstr);

Calculates the 2-D inverse discrete cosine transform on the source array.

`d_8x8` : |
`dstr` : |
`s_8x8` : |
`sstr` : |

### oil_idct8x8_s16 ()

    void        oil_idct8x8_s16                 (int16_t *d_8x8,
                                                 int dstr,
                                                 const int16_t *s_8x8,
                                                 int sstr);

Calculates the 2-D inverse discrete cosine transform on the source array, multiplying some values in the destination array by values interesting to the algorithm. This function is not recommended.

`d_8x8` : |
`dstr` : |
`s_8x8` : |
`sstr` : |

### oil_imdct12_f64 ()

    void        oil_imdct12_f64                 (double *d_12,
                                                 const double *s_6);

Calculate the inverse modified discrete cosine transform of the source array. This function is interesting in mp3 decoding.

`d_12` : |
`s_6` : |

### oil_imdct32_f32 ()

    void        oil_imdct32_f32                 (float *d_32,
                                                 const float *s_32);

Calculate the inverse modified discrete cosine transform of the source array. This function is interesting in mp3 decoding.

`d_32` : |
`s_32` : |

### oil_imdct36_f64 ()

    void        oil_imdct36_f64                 (double *d_36,
                                                 const double *s_18);

Calculate the inverse modified discrete cosine transform of the source array. This function is interesting in mp3 decoding.

`d_36` : |
`s_18` : |

### oil_mdct12_f64 ()

    void        oil_mdct12_f64                  (double *d_6,
                                                 const double *s_12);

Calculates the modified discrete cosine transform of the source array.

`d_6` : |
`s_12` : |

### oil_mdct36_f64 ()

    void        oil_mdct36_f64                  (double *d_18,
                                                 const double *s_36);

Calculates the modified discrete cosine transform of the source array.

`d_18` : |
`s_36` : |

### oil_idct8theora_s16 ()

    void        oil_idct8theora_s16             (int16_t *d_8,
                                                 int dstr,
                                                 const int16_t *s_8,
                                                 int sstr);

Requires version 0.3.2

`d_8` : |
`dstr` : |
`s_8` : |
`sstr` : |

### oil_idct8x8lim10_f64 ()

    void        oil_idct8x8lim10_f64            (double *d_8x8,
                                                 int dstr,
                                                 const double *s_8x8,
                                                 int sstr);

Requires version 0.3.2

`d_8x8` : |
`dstr` : |
`s_8x8` : |
`sstr` : |

### oil_idct8x8lim10_s16 ()

    void        oil_idct8x8lim10_s16            (int16_t *d_8x8,
                                                 int dstr,
                                                 const int16_t *s_8x8,
                                                 int sstr);

Requires version 0.3.2

`d_8x8` : |
`dstr` : |
`s_8x8` : |
`sstr` : |

### oil_idct8x8theora_s16 ()

    void        oil_idct8x8theora_s16           (int16_t *d_8x8,
                                                 int dstr,
                                                 const int16_t *s_8x8,
                                                 int sstr);

Requires version 0.3.2

`d_8x8` : |
`dstr` : |
`s_8x8` : |
`sstr` : |