libavcodec/options.c File Reference

Options definition for AVCodecContext. More...

#include "avcodec.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include <float.h>
#include <string.h>
#include "options_table.h"
Include dependency graph for libavcodec/options.c:

Go to the source code of this file.

Macros

#define alloc_and_copy_or_fail(obj, size, pad)
 
#define FOFFSET(x)   offsetof(AVFrame,x)
 
#define SROFFSET(x)   offsetof(AVSubtitleRect,x)
 

Functions

static const char * context_to_name (void *ptr)
 
static voidcodec_child_next (void *obj, void *prev)
 
static const AVClasscodec_child_class_next (const AVClass *prev)
 
static AVClassCategory get_category (void *ptr)
 
int avcodec_get_context_defaults3 (AVCodecContext *s, const AVCodec *codec)
 Set the fields of the given AVCodecContext to default values corresponding to the given codec (defaults may be codec-dependent). More...
 
AVCodecContextavcodec_alloc_context3 (const AVCodec *codec)
 Allocate an AVCodecContext and set its fields to default values. More...
 
int avcodec_copy_context (AVCodecContext *dest, const AVCodecContext *src)
 Copy the settings of the source AVCodecContext into the destination AVCodecContext. More...
 
const AVClassavcodec_get_class (void)
 Get the AVClass for AVCodecContext. More...
 
const AVClassavcodec_get_frame_class (void)
 Get the AVClass for AVFrame. More...
 
const AVClassavcodec_get_subtitle_rect_class (void)
 Get the AVClass for AVSubtitleRect. More...
 

Variables

static const AVClass av_codec_context_class
 
static const AVOption frame_options []
 
static const AVClass av_frame_class
 
static const AVOption subtitle_rect_options []
 
static const AVClass av_subtitle_rect_class
 

Detailed Description

Options definition for AVCodecContext.

Definition in file libavcodec/options.c.

Macro Definition Documentation

#define alloc_and_copy_or_fail (   obj,
  size,
  pad 
)
Value:
if (src->obj && size > 0) { \
dest->obj = av_malloc(size + pad); \
if (!dest->obj) \
goto fail; \
memcpy(dest->obj, src->obj, size); \
if (pad) \
memset(((uint8_t *) dest->obj) + size, 0, pad); \
}
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
uint8_t
int size
dest
Definition: start.py:60
AVS_Value src
Definition: avisynth_c.h:523
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:73

Referenced by avcodec_copy_context().

#define FOFFSET (   x)    offsetof(AVFrame,x)

Definition at line 244 of file libavcodec/options.c.

#define SROFFSET (   x)    offsetof(AVSubtitleRect,x)

Definition at line 271 of file libavcodec/options.c.

Function Documentation

static const AVClass* codec_child_class_next ( const AVClass prev)
static

Definition at line 54 of file libavcodec/options.c.

static void* codec_child_next ( void obj,
void prev 
)
static

Definition at line 46 of file libavcodec/options.c.

static const char* context_to_name ( void ptr)
static

Definition at line 37 of file libavcodec/options.c.

static AVClassCategory get_category ( void ptr)
static

Definition at line 70 of file libavcodec/options.c.

Variable Documentation

const AVClass av_codec_context_class
static
Initial value:
= {
.class_name = "AVCodecContext",
.item_name = context_to_name,
.option = options,
.log_level_offset_offset = offsetof(AVCodecContext, log_level_offset),
.child_next = codec_child_next,
.child_class_next = codec_child_class_next,
.get_category = get_category,
}
const OptionDef options[]
Definition: ffserver.c:4697
static void * codec_child_next(void *obj, void *prev)
AVClassCategory category
Category used for visualization (like color) This is only set if the category is equal for all object...
Definition: log.h:113
static const char * context_to_name(void *ptr)
static const AVClass * codec_child_class_next(const AVClass *prev)
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
main external API structure.
static AVClassCategory get_category(void *ptr)

Definition at line 77 of file libavcodec/options.c.

Referenced by avcodec_get_class(), and avcodec_get_context_defaults3().

const AVClass av_frame_class
static
Initial value:
= {
.class_name = "AVFrame",
.item_name = NULL,
.option = frame_options,
}
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
NULL
Definition: eval.c:55
static const AVOption frame_options[]

Definition at line 259 of file libavcodec/options.c.

Referenced by avcodec_get_frame_class().

const AVClass av_subtitle_rect_class
static
Initial value:
= {
.class_name = "AVSubtitleRect",
.item_name = NULL,
}
static const AVOption subtitle_rect_options[]
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
NULL
Definition: eval.c:55

Definition at line 284 of file libavcodec/options.c.

Referenced by avcodec_get_subtitle_rect_class().

const AVOption frame_options[]
static
Initial value:
={
{"best_effort_timestamp", "", FOFFSET(best_effort_timestamp), AV_OPT_TYPE_INT64, {.i64 = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, 0},
{"pkt_pos", "", FOFFSET(pkt_pos), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0},
{"pkt_size", "", FOFFSET(pkt_size), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0},
{"sample_aspect_ratio", "", FOFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0},
{"width", "", FOFFSET(width), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"height", "", FOFFSET(height), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"format", "", FOFFSET(format), AV_OPT_TYPE_INT, {.i64 = -1 }, 0, INT_MAX, 0},
{"channel_layout", "", FOFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, 0},
{"sample_rate", "", FOFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{NULL},
}
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate.The lists are not just lists
NULL
Definition: eval.c:55
static int width
Definition: tests/utils.c:158
sample_rate
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:190
#define FOFFSET(x)

Definition at line 246 of file libavcodec/options.c.

const AVOption subtitle_rect_options[]
static
Initial value:
={
{"x", "", SROFFSET(x), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"y", "", SROFFSET(y), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"w", "", SROFFSET(w), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"h", "", SROFFSET(h), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"type", "", SROFFSET(type), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"flags", "", SROFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, 1, 0, "flags"},
{"forced", "", SROFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, 1, 0},
{NULL},
}
output residual component w
Discrete Time axis x
NULL
Definition: eval.c:55
#define SROFFSET(x)
#define type
static int flags
Definition: cpu.c:23
function y
Definition: D.m:1

Definition at line 273 of file libavcodec/options.c.