Commit c7ba34b6 authored by Burt P's avatar Burt P Committed by Michael Niedermayer

af_hdcd: more comments in state struct

Add some comments describing the fields in hdcd_state_t.
Signed-off-by: 's avatarBurt P <pburt0@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 91854b8e
...@@ -818,20 +818,28 @@ static const int32_t gaintab[] = { ...@@ -818,20 +818,28 @@ static const int32_t gaintab[] = {
typedef struct { typedef struct {
uint64_t window; uint64_t window;
unsigned char readahead, arg, control; unsigned char readahead;
int running_gain;
unsigned sustain, sustain_reset; /* arg is set when a packet prefix is found.
int code_counterA; * control is the active control code, where
int code_counterA_almost; /* looks like an A code, but a bit expected to be 0 is 1 */ * bit 0-3: target_gain, 4-bit (3.1) fixed-point value
int code_counterB; * bit 4 : peak_extend
* bit 5 : transient_filter
* bit 6,7: always zero */
unsigned char arg, control;
unsigned sustain, sustain_reset; /* code detect timer */
int running_gain; /* 11-bit (3.8) fixed point, extended from target_gain */
/* counters */
int code_counterA; /* 8-bit format packet */
int code_counterA_almost; /* looks like an A code, but a bit expected to be 0 is 1 */
int code_counterB; /* 16-bit format packet, 8-bit code, 8-bit XOR of code */
int code_counterB_checkfails; /* looks like a B code, but doesn't pass the XOR check */ int code_counterB_checkfails; /* looks like a B code, but doesn't pass the XOR check */
int code_counterC; int code_counterC; /* packet prefix was found, expect a code */
int code_counterC_unmatched; /* told to look for a code, but didn't find one */ int code_counterC_unmatched; /* told to look for a code, but didn't find one */
int count_peak_extend; /* valid packets where peak_extend was enabled */
/* For user information/stats, pulled up into HDCDContext int count_transient_filter; /* valid packets where filter was detected */
* by filter_frame() */
int count_peak_extend;
int count_transient_filter;
/* target_gain is a 4-bit (3.1) fixed-point value, always /* target_gain is a 4-bit (3.1) fixed-point value, always
* negative, but stored positive. * negative, but stored positive.
* The 16 possible values range from -7.5 to 0.0 dB in * The 16 possible values range from -7.5 to 0.0 dB in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment