Skip to content
Snippets Groups Projects
avcodec.h 77.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • #define FF_COMPLIANCE_EXPERIMENTAL -2 ///< allow non standarized experimental things
    
    
         * qscale offset between ip and b frames.
    
         * if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset)
         * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset)
    
         * - encoding: set by user.
         * - decoding: unused
    
         */
        float b_quant_offset;
    
         * error resilience higher values will detect more errors but may missdetect
    
         * some more or less valid parts as errors.
         * - encoding: unused
         * - decoding: set by user
    
        int error_resilience;
    
    #define FF_ER_CAREFUL         1
    
    #define FF_ER_COMPLIANT       2
    #define FF_ER_AGGRESSIVE      3
    #define FF_ER_VERY_AGGRESSIVE 4
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * called at the beginning of each frame to get a buffer for it.
         * if pic.reference is set then the frame will be read later by lavc
    
         * avcodec_align_dimensions() should be used to find the required width and
         * height, as they normally need to be rounded up to the next multiple of 16
    
         * - encoding: unused
         * - decoding: set by lavc, user can override
    
        int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * called to release buffers which where allocated with get_buffer.
         * a released buffer can be reused in get_buffer()
         * pic.data[*] must be set to NULL
    
         * - encoding: unused
         * - decoding: set by lavc, user can override
    
        void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    
    
         * if 1 the stream has a 1 frame delay during decoding.
         * - encoding: set by lavc
    
    
        /**
         * number of bytes per packet if constant and known or 0
         * used by some WAV based audio codecs
         */
        int block_align;
    
        int parse_only; /* - decoding only: if true, only parsing is done
    
                           (function avcodec_parse_frame()). The frame
                           data is returned. Only MPEG codecs support this now. */
    
         * - encoding: set by user.
         * - decoding: unused
    
         * pass1 encoding statistics output buffer.
         * - encoding: set by lavc
         * - decoding: unused
    
        /**
         * pass2 encoding statistics input buffer.
         * concatenated stuff from stats_out of pass1 should be placed here
    
         * - encoding: allocated/set/freed by user
         * - decoding: unused
    
         * ratecontrol qmin qmax limiting method.
    
         * 0-> clipping, 1-> use a nice continous function to limit qscale wthin qmin/qmax
    
         * - encoding: set by user.
         * - decoding: unused
    
        float rc_qsquish;
    
        float rc_qmod_amp;
        int rc_qmod_freq;
    
         * ratecontrol override, see RcOverride.
         * - encoding: allocated/set/freed by user.
         * - decoding: unused
    
        RcOverride *rc_override;
        int rc_override_count;
    
         * rate control equation.
         * - encoding: set by user
         * - decoding: unused
    
        char *rc_eq;
    
         * maximum bitrate.
         * - encoding: set by user.
         * - decoding: unused
    
        int rc_max_rate;
    
         * minimum bitrate.
         * - encoding: set by user.
         * - decoding: unused
    
        int rc_min_rate;
    
         * decoder bitstream buffer size.
         * - encoding: set by user.
         * - decoding: unused
    
        int rc_buffer_size;
        float rc_buffer_aggressivity;
    
         * qscale factor between p and i frames.
    
         * if > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset)
         * if < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset)
    
         * - encoding: set by user.
         * - decoding: unused
    
         */
        float i_quant_factor;
    
         * qscale offset between p and i frames.
         * - encoding: set by user.
         * - decoding: unused
    
         */
        float i_quant_offset;
    
         * initial complexity for pass1 ratecontrol.
         * - encoding: set by user.
         * - decoding: unused
    
        float rc_initial_cplx;
    
         * dct algorithm, see FF_DCT_* below.
         * - encoding: set by user
         * - decoding: unused
    
    #define FF_DCT_INT     2
    #define FF_DCT_MMX     3
    #define FF_DCT_MLIB    4
    
    #define FF_DCT_FAAN    6
    
         * luminance masking (0-> disabled).
         * - encoding: set by user
         * - decoding: unused
    
         * temporary complexity masking (0-> disabled).
         * - encoding: set by user
         * - decoding: unused
    
         * spatial complexity masking (0-> disabled).
         * - encoding: set by user
         * - decoding: unused
    
         * p block masking (0-> disabled).
         * - encoding: set by user
         * - decoding: unused
    
         * darkness masking (0-> disabled).
         * - encoding: set by user
         * - decoding: unused
    
        /* for binary compatibility */
        int unused;
    
         * idct algorithm, see FF_IDCT_* below.
         * - encoding: set by user
         * - decoding: set by user
    
         */
        int idct_algo;
    #define FF_IDCT_AUTO         0
    #define FF_IDCT_INT          1
    #define FF_IDCT_SIMPLE       2
    #define FF_IDCT_SIMPLEMMX    3
    #define FF_IDCT_LIBMPEG2MMX  4
    #define FF_IDCT_PS2          5
    #define FF_IDCT_MLIB         6
    #define FF_IDCT_ARM          7
    
    #define FF_IDCT_VP3          12
    
    #define FF_IDCT_XVIDMMX      14
    
    #define FF_IDCT_CAVS         15
    
    Måns Rullgård's avatar
    Måns Rullgård committed
    #define FF_IDCT_SIMPLEARMV5TE 16
    
         * slice count.
         * - encoding: set by lavc
         * - decoding: set by user (or 0)
    
         * slice offsets in the frame in bytes.
         * - encoding: set/allocated by lavc
         * - decoding: set/allocated by user (or NULL)
    
         * error concealment flags.
         * - encoding: unused
         * - decoding: set by user
    
         */
        int error_concealment;
    #define FF_EC_GUESS_MVS   1
    #define FF_EC_DEBLOCK     2
    
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
        /**
    
         * dsp_mask could be add used to disable unwanted CPU features
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
         * CPU features (i.e. MMX, SSE. ...)
    
         *
         * with FORCE flag you may instead enable given CPU features
         * (Dangerous: usable in case of misdetection, improper usage however will
         * result into program crash)
         */
        unsigned dsp_mask;
    
    #define FF_MM_FORCE    0x80000000 /* force usage of selected flags (OR) */
    
        /* lower 16 bits - CPU features */
    #ifdef HAVE_MMX
    
    #define FF_MM_MMX      0x0001 /* standard MMX */
    #define FF_MM_3DNOW    0x0004 /* AMD 3DNOW */
    #define FF_MM_MMXEXT   0x0002 /* SSE integer functions or AMD MMX ext */
    #define FF_MM_SSE      0x0008 /* SSE functions */
    #define FF_MM_SSE2     0x0010 /* PIV SSE2 functions */
    #define FF_MM_3DNOWEXT 0x0020 /* AMD 3DNowExt */
    
    #endif /* HAVE_MMX */
    
    #define FF_MM_IWMMXT   0x0100 /* XScale IWMMXT */
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    
        /**
    
         * bits per sample/pixel from the demuxer (needed for huffyuv).
         * - encoding: set by lavc
         * - decoding: set by user
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
         int bits_per_sample;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        /**
    
         * prediction method (needed for huffyuv).
         * - encoding: set by user
         * - decoding: unused
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
         int prediction_method;
    #define FF_PRED_LEFT   0
    #define FF_PRED_PLANE  1
    #define FF_PRED_MEDIAN 2
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * sample aspect ratio (0 if unknown).
    
         * numerator and denominator must be relative prime and smaller then 256 for some video standards
    
         * - encoding: set by user.
         * - decoding: set by lavc.
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        AVRational sample_aspect_ratio;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    
        /**
    
         * the picture in the bitstream.
         * - encoding: set by lavc
         * - decoding: set by lavc
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
    
        AVFrame *coded_frame;
    
         * debug.
         * - encoding: set by user.
         * - decoding: set by user.
    
         */
        int debug;
    #define FF_DEBUG_PICT_INFO 1
    #define FF_DEBUG_RC        2
    #define FF_DEBUG_BITSTREAM 4
    #define FF_DEBUG_MB_TYPE   8
    #define FF_DEBUG_QP        16
    #define FF_DEBUG_MV        32
    
    #define FF_DEBUG_SKIP      0x00000080
    #define FF_DEBUG_STARTCODE 0x00000100
    #define FF_DEBUG_PTS       0x00000200
    
    #define FF_DEBUG_ER        0x00000400
    
    #define FF_DEBUG_MMCO      0x00000800
    
    #define FF_DEBUG_BUGS      0x00001000
    
    #define FF_DEBUG_VIS_QP    0x00002000
    #define FF_DEBUG_VIS_MB_TYPE 0x00004000
    
        /**
         * debug.
         * - encoding: set by user.
         * - decoding: set by user.
         */
        int debug_mv;
    #define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames
    #define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames
    #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
    
    
         * error.
         * - encoding: set by lavc if flags&CODEC_FLAG_PSNR
         * - decoding: unused
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        /**
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
        int mb_qmin;
    
        /**
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
        int mb_qmax;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        /**
    
         * motion estimation compare function.
         * - encoding: set by user.
         * - decoding: unused
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
        int me_cmp;
        /**
    
         * subpixel motion estimation compare function.
         * - encoding: set by user.
         * - decoding: unused
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
        int me_sub_cmp;
        /**
    
         * macroblock compare function (not supported yet).
         * - encoding: set by user.
         * - decoding: unused
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
        int mb_cmp;
    
        /**
         * interlaced dct compare function
         * - encoding: set by user.
         * - decoding: unused
         */
        int ildct_cmp;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    #define FF_CMP_SAD  0
    #define FF_CMP_SSE  1
    #define FF_CMP_SATD 2
    #define FF_CMP_DCT  3
    #define FF_CMP_PSNR 4
    #define FF_CMP_BIT  5
    #define FF_CMP_RD   6
    #define FF_CMP_ZERO 7
    
    #define FF_CMP_VSAD 8
    #define FF_CMP_VSSE 9
    
    #define FF_CMP_W53  11
    #define FF_CMP_W97  12
    
    #define FF_CMP_DCTMAX 13
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    #define FF_CMP_CHROMA 256
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        /**
    
         * ME diamond size & shape.
         * - encoding: set by user.
         * - decoding: unused
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
        int dia_size;
    
         * amount of previous MV predictors (2a+1 x 2a+1 square).
         * - encoding: set by user.
         * - decoding: unused
    
         */
        int last_predictor_count;
    
         * pre pass for motion estimation.
         * - encoding: set by user.
         * - decoding: unused
    
         */
        int pre_me;
    
         * motion estimation pre pass compare function.
         * - encoding: set by user.
         * - decoding: unused
    
         */
        int me_pre_cmp;
    
         * ME pre pass diamond size & shape.
         * - encoding: set by user.
         * - decoding: unused
    
         */
        int pre_dia_size;
    
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        /**
    
         * subpel ME quality.
         * - encoding: set by user.
         * - decoding: unused
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
        int me_subpel_quality;
    
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        /**
    
         * callback to negotiate the pixelFormat.
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * @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
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         */
    
    Ivan Kalvachev's avatar
    Ivan Kalvachev committed
        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.
    
         * - 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.
    
    Zdenek Kabelac's avatar
    Zdenek Kabelac committed
        int me_range;
    
        /**
         * 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.
    
    Diego Biurrun's avatar
    Diego Biurrun committed
         * Don't touch, used by lavc default_get_buffer()
    
         */
        int internal_buffer_count;
    
         * internal_buffers.
    
    Diego Biurrun's avatar
    Diego Biurrun committed
         * Don't 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
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
        /**
         * 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;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    #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;
    
    #if 0
        /**
         *
         * - encoding: unused
         * - decoding: set by user.
         */
        uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
    #endif
    
        /**
         * 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)
    
    
    Ivan Kalvachev's avatar
    Ivan Kalvachev committed
        /**
         * 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;
    
         * Motion estimation threshold. under which no motion estimation is
    
         * performed, but instead the user specified motion vectors are used
    
         int me_threshold;
    
    
        /**
         * Macroblock threshold. under which the user specified macroblock types will be used
         * - encoding: set by user
         * - decoding: unused
         */
         int mb_threshold;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * precision of the intra dc coefficient - 8.
    
         * - encoding: set by user
         * - decoding: unused
         */
         int intra_dc_precision;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    
        /**
         * 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 lavc
         */
         int profile;
    #define FF_PROFILE_UNKNOWN -99
    
        /**
         * level
         * - encoding: set by user
         * - decoding: set by lavc
         */
         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;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * bitsream 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;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    
        /**
         * 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 comparission 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;
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
    
        /**
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * - encoding: unused
         * - decoding: set by user.
         */
        enum AVDiscard skip_loop_filter;
    
        /**
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * - encoding: unused
         * - decoding: set by user.
         */
        enum AVDiscard skip_idct;
    
        /**
    
    Michael Niedermayer's avatar
    Michael Niedermayer committed
         * - 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;
    
    Robert Swain's avatar
    Robert Swain committed
    
        /**
         * constant rate factor - quality-based VBR - values ~correspond to qps
         * - encoding: set by user.
         * - decoding: unused
         */
        int 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 functin used for fullpel ME
         * - encoding: set by user.
         * - decoding: unused
         */
        int mv0_threshold;