Encoder  4.4
VC-5 Sample Encoder
companding.c File Reference

Functions

int32_t CompandedValue (int32_t value)
 Apply the default companding curve to the specified value. More...
 
uint32_t CompandingParameter ()
 Return the parameter that controls the companding curve. More...
 
CODEC_ERROR ComputeCubicTable (int16_t cubic_table[], int cubic_table_length, int16_t maximum_value)
 Compute a table of values for the cubic companding curve. More...
 
int32_t UncompandedValue (int32_t value)
 Invert the companding curve. More...
 
PIXEL UncompandedPixel (PIXEL value)
 Invert the companding curve applied to a pixel.
 
CODEC_ERROR InvertCompanding (PIXEL *image, DIMENSION width, DIMENSION height, DIMENSION pitch)
 Invert the companding curve applied during encoding.
 

Variables

const int maximum_codebook_value = 255
 Maximum coefficient magnitude in the codebook. More...
 

Detailed Description

(c) 2013 Society of Motion Picture & Television Engineers LLC and Woodman Labs, Inc. All rights reserved–use subject to compliance with end user license agreement.

Function Documentation

◆ CompandedValue()

int32_t CompandedValue ( int32_t  value)

Apply the default companding curve to the specified value.

Note that this companding curve has been superceeded by the cubic curve.

Here is the caller graph for this function:

◆ CompandingParameter()

uint32_t CompandingParameter ( )

Return the parameter that controls the companding curve.

This parameter does not apply if the cubic companding curve is used.

Here is the caller graph for this function:

◆ ComputeCubicTable()

CODEC_ERROR ComputeCubicTable ( int16_t  cubic_table[],
int  cubic_table_length,
int16_t  maximum_value 
)

Compute a table of values for the cubic companding curve.

The companding curve is f(x) = x + (x ^ 3 / (255 ^ 3)) * 768 so the range of coefficient magnitudes from 0 to 255 becomess 0 to 1023.

Here is the caller graph for this function:

◆ UncompandedValue()

int32_t UncompandedValue ( int32_t  value)

Invert the companding curve.

Invert the companding curve applied during encoding.

This routine is used for debugging and only applies if the default companding curve is used.

Here is the caller graph for this function:

Variable Documentation

◆ maximum_codebook_value

const int maximum_codebook_value = 255

Maximum coefficient magnitude in the codebook.

Todo:
Need to calculate the maximum value from the codebook