HDCD decoding filter.
More...
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "avfilter.h"
#include "internal.h"
#include "audio.h"
|
|
#define | PEAK_EXT_LEVEL 0x5981 /* + sizeof(peaktab)-1 = 0x8000 */ |
| |
|
#define | HDCD_PROCESS_STEREO_DEFAULT 1 |
| |
|
#define | HDCD_MAX_CHANNELS 2 |
| |
|
#define | GAINTOFLOAT(g) (g) ? -(float)(g>>1) - ((g & 1) ? 0.5 : 0.0) : 0.0 |
| | convert to float from 4-bit (3.1) fixed-point the always-negative value is stored positive, so make it negative
|
| |
| #define | APPLY_GAIN(s, g) do{int64_t s64 = s; s64 *= gaintab[g]; s = (int32_t)(s64 >> 23); }while(0); |
| | apply gain, 11-bit (3.8) fixed point, always negative but stored positive. More...
|
| |
|
#define | TONEGEN16(sn, f, sr, a) (int16_t)(sin((6.28318530718 * (sn) * (f)) /(sr)) * (a) * 0x7fff) |
| | tone generator: sample_number, frequency, sample_rate, amplitude
|
| |
|
#define | HDCD_ANA_OFF_DESC "disabled" |
| | analyze mode descriptions: macro for AVOption definitions, array of const char for mapping mode to string
|
| |
|
#define | HDCD_ANA_LLE_DESC "gain adjustment level at each sample" |
| |
|
#define | HDCD_ANA_PE_DESC "samples where peak extend occurs" |
| |
|
#define | HDCD_ANA_CDT_DESC "samples where the code detect timer is active" |
| |
|
#define | HDCD_ANA_TGM_DESC "samples where the target gain does not match between channels" |
| |
|
#define | OFFSET(x) offsetof(HDCDContext, x) |
| |
|
#define | A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
| |
|
| enum | hdcd_pe { HDCD_PE_NEVER = 0,
HDCD_PE_INTERMITTENT = 1,
HDCD_PE_PERMANENT = 2
} |
| |
| enum | hdcd_dv { HDCD_NONE = 0,
HDCD_NO_EFFECT = 1,
HDCD_EFFECTUAL = 2
} |
| |
| enum | hdcd_pf { HDCD_PVER_NONE = 0,
HDCD_PVER_A = 1,
HDCD_PVER_B = 2,
HDCD_PVER_MIX = 3
} |
| |
| enum | hdcd_ana_mode {
HDCD_ANA_OFF = 0,
HDCD_ANA_LLE = 1,
HDCD_ANA_PE = 2,
HDCD_ANA_CDT = 3,
HDCD_ANA_TGM = 4,
HDCD_ANA_TOP = 5
} |
| |
| enum | hdcd_control_result { HDCD_OK =0,
HDCD_TG_MISMATCH
} |
| |
|
|
| AVFILTER_DEFINE_CLASS (hdcd) |
| |
§ APPLY_GAIN
| #define APPLY_GAIN |
( |
|
s, |
|
|
|
g |
|
) |
| do{int64_t s64 = s; s64 *= gaintab[g]; s = (int32_t)(s64 >> 23); }while(0); |
apply gain, 11-bit (3.8) fixed point, always negative but stored positive.
§ hdcd_ana_mode
| Enumerator |
|---|
| HDCD_ANA_TOP | used in max value of AVOption
|
§ hdcd_dv
| Enumerator |
|---|
| HDCD_NONE | HDCD packets do not (yet) appear.
|
| HDCD_NO_EFFECT | HDCD packets appear, but all control codes are NOP.
|
| HDCD_EFFECTUAL | HDCD packets appear, and change the output in some way.
|
§ hdcd_pe
| Enumerator |
|---|
| HDCD_PE_NEVER | All valid packets have PE set to off.
|
| HDCD_PE_INTERMITTENT | Some valid packets have PE set to on.
|
| HDCD_PE_PERMANENT | All valid packets have PE set to on.
|
§ hdcd_pf
| Enumerator |
|---|
| HDCD_PVER_NONE | No packets (yet) discovered.
|
| HDCD_PVER_A | Packets of type A (8-bit control) discovered.
|
| HDCD_PVER_B | Packets of type B (8-bit control, 8-bit XOR) discovered.
|
| HDCD_PVER_MIX | Packets of type A and B discovered, most likely an encoding error.
|
§ ff_af_hdcd
Initial value:= {
.name = "hdcd",
.priv_class = &hdcd_class,
.init = init,
.uninit = uninit,
.query_formats = query_formats,
.inputs = avfilter_af_hdcd_inputs,
.outputs = avfilter_af_hdcd_outputs,
}
Definition: af_hdcd.c:943
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186