📄 avcodec.h
字号:
/**
* thread opaque
* Can be used by execute() to store some per AVCodecContext stuff.
* - encoding: set by execute()
* - decoding: set by execute()
*/
void *thread_opaque;
/**
* Motion estimation threshold below which no motion estimation is
* performed, but instead the user specified motion vectors are used.
*
* - encoding: Set by user.
* - decoding: unused
*/
int me_threshold;
/**
* Macroblock threshold below which the user specified macroblock types will be used.
* - encoding: Set by user.
* - decoding: unused
*/
int mb_threshold;
/**
* precision of the intra DC coefficient - 8
* - encoding: Set by user.
* - decoding: unused
*/
int intra_dc_precision;
/**
* noise vs. sse weight for the nsse comparsion function
* - encoding: Set by user.
* - decoding: unused
*/
int nsse_weight;
/**
* Number of macroblock rows at the top which are skipped.
* - encoding: unused
* - decoding: Set by user.
*/
int skip_top;
/**
* Number of macroblock rows at the bottom which are skipped.
* - encoding: unused
* - decoding: Set by user.
*/
int skip_bottom;
/**
* profile
* - encoding: Set by user.
* - decoding: Set by libavcodec.
*/
int profile;
#define FF_PROFILE_UNKNOWN -99
#define FF_PROFILE_AAC_MAIN 0
#define FF_PROFILE_AAC_LOW 1
#define FF_PROFILE_AAC_SSR 2
#define FF_PROFILE_AAC_LTP 3
/**
* level
* - encoding: Set by user.
* - decoding: Set by libavcodec.
*/
int level;
#define FF_LEVEL_UNKNOWN -99
/**
* low resolution decoding, 1-> 1/2 size, 2->1/4 size
* - encoding: unused
* - decoding: Set by user.
*/
int lowres;
/**
* Bitstream width / height, may be different from width/height if lowres
* or other things are used.
* - encoding: unused
* - decoding: Set by user before init if known. Codec should override / dynamically change if needed.
*/
int coded_width, coded_height;
/**
* frame skip threshold
* - encoding: Set by user.
* - decoding: unused
*/
int frame_skip_threshold;
/**
* frame skip factor
* - encoding: Set by user.
* - decoding: unused
*/
int frame_skip_factor;
/**
* frame skip exponent
* - encoding: Set by user.
* - decoding: unused
*/
int frame_skip_exp;
/**
* frame skip comparison function
* - encoding: Set by user.
* - decoding: unused
*/
int frame_skip_cmp;
/**
* Border processing masking, raises the quantizer for mbs on the borders
* of the picture.
* - encoding: Set by user.
* - decoding: unused
*/
float border_masking;
/**
* minimum MB lagrange multipler
* - encoding: Set by user.
* - decoding: unused
*/
int mb_lmin;
/**
* maximum MB lagrange multipler
* - encoding: Set by user.
* - decoding: unused
*/
int mb_lmax;
/**
*
* - encoding: Set by user.
* - decoding: unused
*/
int me_penalty_compensation;
/**
*
* - encoding: unused
* - decoding: Set by user.
*/
enum AVDiscard skip_loop_filter;
/**
*
* - encoding: unused
* - decoding: Set by user.
*/
enum AVDiscard skip_idct;
/**
*
* - encoding: unused
* - decoding: Set by user.
*/
enum AVDiscard skip_frame;
/**
*
* - encoding: Set by user.
* - decoding: unused
*/
int bidir_refine;
/**
*
* - encoding: Set by user.
* - decoding: unused
*/
int brd_scale;
/**
* constant rate factor - quality-based VBR - values ~correspond to qps
* - encoding: Set by user.
* - decoding: unused
*/
float crf;
/**
* constant quantization parameter rate control method
* - encoding: Set by user.
* - decoding: unused
*/
int cqp;
/**
* minimum GOP size
* - encoding: Set by user.
* - decoding: unused
*/
int keyint_min;
/**
* number of reference frames
* - encoding: Set by user.
* - decoding: unused
*/
int refs;
/**
* chroma qp offset from luma
* - encoding: Set by user.
* - decoding: unused
*/
int chromaoffset;
/**
* Influences how often B-frames are used.
* - encoding: Set by user.
* - decoding: unused
*/
int bframebias;
/**
* trellis RD quantization
* - encoding: Set by user.
* - decoding: unused
*/
int trellis;
/**
* Reduce fluctuations in qp (before curve compression).
* - encoding: Set by user.
* - decoding: unused
*/
float complexityblur;
/**
* in-loop deblocking filter alphac0 parameter
* alpha is in the range -6...6
* - encoding: Set by user.
* - decoding: unused
*/
int deblockalpha;
/**
* in-loop deblocking filter beta parameter
* beta is in the range -6...6
* - encoding: Set by user.
* - decoding: unused
*/
int deblockbeta;
/**
* macroblock subpartition sizes to consider - p8x8, p4x4, b8x8, i8x8, i4x4
* - encoding: Set by user.
* - decoding: unused
*/
int partitions;
#define X264_PART_I4X4 0x001 /* Analyse i4x4 */
#define X264_PART_I8X8 0x002 /* Analyse i8x8 (requires 8x8 transform) */
#define X264_PART_P8X8 0x010 /* Analyse p16x8, p8x16 and p8x8 */
#define X264_PART_P4X4 0x020 /* Analyse p8x4, p4x8, p4x4 */
#define X264_PART_B8X8 0x100 /* Analyse b16x8, b8x16 and b8x8 */
/**
* direct MV prediction mode - 0 (none), 1 (spatial), 2 (temporal)
* - encoding: Set by user.
* - decoding: unused
*/
int directpred;
/**
* Audio cutoff bandwidth (0 means "automatic"), currently used only by FAAC.
* - encoding: Set by user.
* - decoding: unused
*/
int cutoff;
/**
* Multiplied by qscale for each frame and added to scene_change_score.
* - encoding: Set by user.
* - decoding: unused
*/
int scenechange_factor;
/**
*
* Note: Value depends upon the compare function used for fullpel ME.
* - encoding: Set by user.
* - decoding: unused
*/
int mv0_threshold;
/**
* Adjusts sensitivity of b_frame_strategy 1.
* - encoding: Set by user.
* - decoding: unused
*/
int b_sensitivity;
/**
* - encoding: Set by user.
* - decoding: unused
*/
int compression_level;
#define FF_COMPRESSION_DEFAULT -1
/**
* Sets whether to use LPC mode - used by FLAC encoder.
* - encoding: Set by user.
* - decoding: unused
*/
int use_lpc;
/**
* LPC coefficient precision - used by FLAC encoder
* - encoding: Set by user.
* - decoding: unused
*/
int lpc_coeff_precision;
/**
* - encoding: Set by user.
* - decoding: unused
*/
int min_prediction_order;
/**
* - encoding: Set by user.
* - decoding: unused
*/
int max_prediction_order;
/**
* search method for selecting prediction order
* - encoding: Set by user.
* - decoding: unused
*/
int prediction_order_method;
/**
* - encoding: Set by user.
* - decoding: unused
*/
int min_partition_order;
/**
* - encoding: Set by user.
* - decoding: unused
*/
int max_partition_order;
/**
* GOP timecode frame start number, in non drop frame format
* - encoding: Set by user.
* - decoding: unused
*/
int64_t timecode_frame_start;
/**
* Decoder should decode to this many channels if it can (0 for default)
* - encoding: unused
* - decoding: Set by user.
*/
int request_channels;
} AVCodecContext;
/**
* AVCodec.
*/
typedef struct AVCodec {
/**
* Name of the codec implementation.
* The name is globally unique among encoders and among decoders (but an
* encoder and a decoder can share the same name).
* This is the primary way to find a codec from the user perspective.
*/
const char *name;
enum CodecType type;
enum CodecID id;
int priv_data_size;
int (*init)(AVCodecContext *);
int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
int (*close)(AVCodecContext *);
int (*decode)(AVCodecContext *, void *outdata, int *outdata_size,
uint8_t *buf, int buf_size);
int capabilities;
struct AVCodec *next;
void (*flush)(AVCodecContext *);
const AVRational *supported_framerates; ///array of supported framerates, or NULL if any, array is terminated by {0,0}
const enum PixelFormat *pix_fmts; ///array of supported pixel formats, or NULL if unknown, array is terminanted by -1
} AVCodec;
/**
* four components are given, that's all.
* the last component is alpha
*/
typedef struct AVPicture {
uint8_t *data[4];
int linesize[4]; ///< number of bytes per line
} AVPicture;
/**
* AVPaletteControl
* This structure defines a method for communicating palette changes
* between and demuxer and a decoder.
*
* @deprecated Use AVPacket to send palette changes instead.
* This is totally broken.
*/
#define AVPALETTE_SIZE 1024
#define AVPALETTE_COUNT 256
typedef struct AVPaletteControl {
/* Demuxer sets this to 1 to indicate the palette has changed;
* decoder resets to 0. */
int palette_changed;
/* 4-byte ARGB palette entries, stored in native byte order; note that
* the individual palette components should be on a 8-bit scale; if
* the palette data comes from an IBM VGA native format, the component
* data is probably 6 bits in size and needs to be scaled. */
unsigned int palette[AVPALETTE_COUNT];
} AVPaletteControl attribute_deprecated;
typedef struct AVSubtitleRect {
uint16_t x;
uint16_t y;
uint16_t w;
uint16_t h;
uint16_t nb_colors;
int linesize;
uint32_t *rgba_palette;
uint8_t *bitmap;
} AVSubtitleRect;
typedef struct AVSubtitle {
uint16_t format; /* 0 = graphics */
uint32_t start_display_time; /* relative to packet pts, in ms */
uint32_t end_display_time; /* relative to packet pts, in ms */
uint32_t num_rects;
AVSubti
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -