⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avcodec.h

📁 wince 平台下的h264 压缩代码程序
💻 H
📖 第 1 页 / 共 5 页
字号:
     * @param fmt is the list of formats which are supported by the codec,     * its terminated by -1 as 0 is a valid format, the formats are ordered by quality     * the first is allways the native one     * @return the choosen format     * - encoding: unused     * - decoding: set by user, if not set then the native format will always be choosen     */    enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);    /**     * DTG active format information (additionnal aspect ratio     * information only used in DVB MPEG2 transport streams). 0 if     * not set.     *      * - encoding: unused.     * - decoding: set by decoder      */    int dtg_active_format;#define FF_DTG_AFD_SAME         8#define FF_DTG_AFD_4_3          9#define FF_DTG_AFD_16_9         10#define FF_DTG_AFD_14_9         11#define FF_DTG_AFD_4_3_SP_14_9  13#define FF_DTG_AFD_16_9_SP_14_9 14#define FF_DTG_AFD_SP_4_3       15    /**     * Maximum motion estimation search range in subpel units.     * if 0 then no limit     *      * - encoding: set by user.     * - decoding: unused.     */    int me_range;    /**     * frame_rate_base.     * for variable fps this is 1     * - encoding: set by user.     * - decoding: set by lavc.     * @todo move this after frame_rate     */    int frame_rate_base;    /**     * intra quantizer bias.     * - encoding: set by user.     * - decoding: unused     */    int intra_quant_bias;#define FF_DEFAULT_QUANT_BIAS 999999        /**     * inter quantizer bias.     * - encoding: set by user.     * - decoding: unused     */    int inter_quant_bias;    /**     * color table ID.     * - encoding: unused.     * - decoding: which clrtable should be used for 8bit RGB images     *             table have to be stored somewhere FIXME     */    int color_table_id;        /**     * internal_buffer count.      * Dont touch, used by lavc default_get_buffer()     */    int internal_buffer_count;        /**     * internal_buffers.      * Dont touch, used by lavc default_get_buffer()     */    void *internal_buffer;#define FF_LAMBDA_SHIFT 7#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)#define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda#define FF_LAMBDA_MAX (256*128-1)#define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove    /**     * global quality for codecs which cannot change it per frame.     * this should be proportional to MPEG1/2/4 qscale.     * - encoding: set by user.     * - decoding: unused     */    int global_quality;    #define FF_CODER_TYPE_VLC   0#define FF_CODER_TYPE_AC    1    /**     * coder type     * - encoding: set by user.     * - decoding: unused     */    int coder_type;    /**     * context model     * - encoding: set by user.     * - decoding: unused     */    int context_model;        /**     * slice flags     * - encoding: unused     * - decoding: set by user.     */    int slice_flags;#define SLICE_FLAG_CODED_ORDER    0x0001 ///< draw_horiz_band() is called in coded order instead of display#define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)#define SLICE_FLAG_ALLOW_PLANE    0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)    /**     * XVideo Motion Acceleration     * - encoding: forbidden     * - decoding: set by decoder     */    int xvmc_acceleration;        /**     * macroblock decision mode     * - encoding: set by user.     * - decoding: unused     */    int mb_decision;#define FF_MB_DECISION_SIMPLE 0        ///< uses mb_cmp#define FF_MB_DECISION_BITS   1        ///< chooses the one which needs the fewest bits#define FF_MB_DECISION_RD     2        ///< rate distoration    /**     * custom intra quantization matrix     * - encoding: set by user, can be NULL     * - decoding: set by lavc     */    uint16_t *intra_matrix;    /**     * custom inter quantization matrix     * - encoding: set by user, can be NULL     * - decoding: set by lavc     */    uint16_t *inter_matrix;        /**     * fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').     * this is used to workaround some encoder bugs     * - encoding: unused     * - decoding: set by user, will be converted to upper case by lavc during init     */    unsigned int stream_codec_tag;    /**     * scene change detection threshold.     * 0 is default, larger means fewer detected scene changes     * - encoding: set by user.     * - decoding: unused     */    int scenechange_threshold;    /**     * minimum lagrange multipler     * - encoding: set by user.     * - decoding: unused     */    int lmin;    /**     * maximum lagrange multipler     * - encoding: set by user.     * - decoding: unused     */    int lmax;    /**     * Palette control structure     * - encoding: ??? (no palette-enabled encoder yet)     * - decoding: set by user.     */    struct AVPaletteControl *palctrl;    /**     * noise reduction strength     * - encoding: set by user.     * - decoding: unused     */    int noise_reduction;        /**     * called at the beginning of a frame to get cr buffer for it.     * buffer type (size, hints) must be the same. lavc won't check it.     * lavc will pass previous buffer in pic, function should return     * same buffer or new buffer with old frame "painted" into it.     * if pic.data[0] == NULL must behave like get_buffer().     * - encoding: unused     * - decoding: set by lavc, user can override     */    int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);    /**     * number of bits which should be loaded into the rc buffer before decoding starts     * - encoding: set by user.     * - decoding: unused     */    int rc_initial_buffer_occupancy;    /**     *     * - encoding: set by user.     * - decoding: unused     */    int inter_threshold;    /**     * CODEC_FLAG2_*.     * - encoding: set by user.     * - decoding: set by user.     */    int flags2;    /**     * simulates errors in the bitstream to test error concealment.     * - encoding: set by user.     * - decoding: unused.     */    int error_rate;        /**     * MP3 antialias algorithm, see FF_AA_* below.     * - encoding: unused     * - decoding: set by user     */    int antialias_algo;#define FF_AA_AUTO    0#define FF_AA_FASTINT 1 //not implemented yet#define FF_AA_INT     2#define FF_AA_FLOAT   3    /**     * Quantizer noise shaping.     * - encoding: set by user     * - decoding: unused     */    int quantizer_noise_shaping;    /**     * Thread count.     * is used to decide how many independant tasks should be passed to execute()     * - encoding: set by user     * - decoding: set by user     */    int thread_count;        /**     * the codec may call this to execute several independant things. it will return only after     * finishing all tasks, the user may replace this with some multithreaded implementation, the     * default implementation will execute the parts serially     * @param count the number of things to execute     * - encoding: set by lavc, user can override     * - decoding: set by lavc, user can override     */    int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void **arg2, int *ret, int count);        /**     * Thread opaque.     * can be used by execute() to store some per AVCodecContext stuff.     * - encoding: set by execute()     * - decoding: set by execute()     */    void *thread_opaque;} AVCodecContext;/** * AVOption. */typedef struct AVOption {    /** options' name */    const char *name; /* if name is NULL, it indicates a link to next */    /** short English text help or const struct AVOption* subpointer */    const char *help; //	const struct AVOption* sub;    /** offset to context structure where the parsed value should be stored */    int offset;    /** options' type */    int type;#define FF_OPT_TYPE_BOOL 1      ///< boolean - true,1,on  (or simply presence)#define FF_OPT_TYPE_DOUBLE 2    ///< double#define FF_OPT_TYPE_INT 3       ///< integer#define FF_OPT_TYPE_STRING 4    ///< string (finished with \0)#define FF_OPT_TYPE_MASK 0x1f	///< mask for types - upper bits are various flags//#define FF_OPT_TYPE_EXPERT 0x20 // flag for expert option#define FF_OPT_TYPE_FLAG (FF_OPT_TYPE_BOOL | 0x40)#define FF_OPT_TYPE_RCOVERRIDE (FF_OPT_TYPE_STRING | 0x80)    /** min value  (min == max   ->  no limits) */    double min;    /** maximum value for double/int */    double max;    /** default boo [0,1]l/double/int value */    double defval;    /**     * default string value (with optional semicolon delimited extra option-list     * i.e.   option1;option2;option3     * defval might select other then first argument as default     */    const char *defstr;#define FF_OPT_MAX_DEPTH 10} AVOption;/** * Parse option(s) and sets fields in passed structure * @param strct	structure where the parsed results will be written * @param list  list with AVOptions * @param opts	string with options for parsing */int avoption_parse(void* strct, const AVOption* list, const char* opts);/** * AVCodec. */typedef struct AVCodec {    const char *name;    enum CodecType type;    int 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;    const AVOption *options;    struct AVCodec *next;    void (*flush)(AVCodecContext *);    const AVRational *supported_framerates; ///array of supported framerates, or NULL if any, array is terminated by {0,0}} 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. */#define AVPALETTE_SIZE 1024#define AVPALETTE_COUNT 256typedef 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 a IBM VGA native format, the component     * data is probably 6 bits in size and needs to be scaled */    unsigned int palette[AVPALETTE_COUNT];} AVPaletteControl;extern AVCodec ac3_encoder;extern AVCodec mp2_encoder;extern AVCodec mp3lame_encoder;extern AVCodec oggvorbis_encoder;extern AVCodec faac_encoder;extern AVCodec mpeg1video_encoder;extern AVCodec mpeg2video_encoder;extern AVCodec h263_encoder;extern AVCodec h263p_encoder;extern AVCodec flv_encoder;extern AVCodec rv10_encoder;extern AVCodec rv20_encoder;extern AVCodec dvvideo_encoder;extern AVCodec mjpeg_encoder;extern AVCodec ljpeg_encoder;extern AVCodec mpeg4_encoder;extern AVCodec msmpeg4v1_encoder;extern AVCodec msmpeg4v2_encoder;extern AVCodec msmpeg4v3_encoder;extern AVCodec wmv1_encoder;extern AVCodec wmv2_encoder;extern AVCodec huffyuv_encoder;extern AVCodec h264_encoder;extern AVCodec asv1_encoder;extern AVCodec asv2_encoder;extern AVCodec vcr1_encoder;extern AVCodec ffv1_encoder;extern AVCodec mdec_encoder;extern AVCodec zlib_encoder;extern AVCodec h263_decoder;extern AVCodec mpeg4_decoder;extern AVCodec msmpeg4v1_decoder;extern AVCodec msmpeg4v2_decoder;extern AVCodec msmpeg4v3_decoder;extern AVCodec wmv1_decoder;extern AVCodec wmv2_decoder;extern AVCodec mpeg1video_decoder;extern AVCodec mpeg2video_decoder;extern AVCodec mpegvideo_decoder;extern AVCodec mpeg_xvmc_decoder;extern AVCodec h263i_decoder;extern AVCodec flv_decoder;extern AVCodec rv10_decoder;extern AVCodec rv20_decoder;extern AVCodec svq1_decoder;extern AVCodec svq3_decoder;extern AVCodec dvvideo_decoder;extern AVCodec wmav1_decoder;extern AVCodec wmav2_decoder;extern AVCodec mjpeg_decoder;extern AVCodec mjpegb_decoder;extern AVCodec sp5x_decoder;extern AVCodec mp2_decoder;extern AVCodec mp3_decoder;extern AVCodec mace3_decoder;extern AVCodec mace6_decoder;extern AVCodec huffyuv_decoder;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -