47 #define OFFSET(x) offsetof(Bs2bContext, x)
48 #define A AV_OPT_FLAG_AUDIO_PARAM
51 {
"profile",
"Apply a pre-defined crossfeed level",
53 {
"default",
"default profile", 0,
AV_OPT_TYPE_CONST, { .i64 = BS2B_DEFAULT_CLEVEL }, 0, 0,
A,
"profile" },
54 {
"cmoy",
"Chu Moy circuit", 0,
AV_OPT_TYPE_CONST, { .i64 = BS2B_CMOY_CLEVEL }, 0, 0,
A,
"profile" },
55 {
"jmeier",
"Jan Meier circuit", 0,
AV_OPT_TYPE_CONST, { .i64 = BS2B_JMEIER_CLEVEL }, 0, 0,
A,
"profile" },
56 {
"fcut",
"Set cut frequency (in Hz)",
58 {
"feed",
"Set feed level (in Hz)",
69 if (!(bs2b->
bs2bp = bs2b_open()))
75 bs2b_set_level_fcut(bs2b->
bs2bp, bs2b->
fcut);
78 bs2b_set_level_feed(bs2b->
bs2bp, bs2b->
feed);
88 bs2b_close(bs2b->
bs2bp);
150 if (frame != out_frame)
166 bs2b->
filter = bs2b_cross_feed_u8;
169 bs2b->
filter = (
void*)bs2b_cross_feed_s16;
172 bs2b->
filter = (
void*)bs2b_cross_feed_s32;
175 bs2b->
filter = (
void*)bs2b_cross_feed_f;
178 bs2b->
filter = (
void*)bs2b_cross_feed_d;
184 if ((srate < BS2B_MINSRATE) || (srate > BS2B_MAXSRATE))
187 bs2b_set_srate(bs2b->
bs2bp, srate);
215 .priv_class = &bs2b_class,
This structure describes decoded (raw) audio or video data.
Main libavfilter public API header.
static const AVFilterPad bs2b_inputs[]
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static enum AVSampleFormat formats[]
#define AV_CH_LAYOUT_STEREO
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static int query_formats(AVFilterContext *ctx)
A filter pad used for either input or output.
A link between two filters.
int sample_rate
samples per second
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
audio channel layout utility functions
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
AVFilterContext * src
source filter
static const AVFilterPad outputs[]
int format
agreed upon media format
static int config_output(AVFilterLink *outlink)
A list of supported channel layouts.
static const AVFilterPad inputs[]
AVSampleFormat
Audio sample formats.
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
AVFILTER_DEFINE_CLASS(bs2b)
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Describe the class of an AVClass context structure.
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
enum MovChannelLayoutTag * layouts
void(* filter)(t_bs2bdp bs2bdp, uint8_t *sample, int n)
static const AVOption bs2b_options[]
common internal and external API header
static const AVFilterPad bs2b_outputs[]
AVFilterContext * dst
dest filter
static av_cold void uninit(AVFilterContext *ctx)
static enum AVSampleFormat sample_fmts[]
uint8_t ** extended_data
pointers to the data planes/channels.
static av_cold int init(AVFilterContext *ctx)
int nb_samples
number of audio samples (per channel) described by this frame
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.