+ /**
+ * callback to negotiate the pixelFormat.
+ * @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, 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_QUALITY_SCALE 256
+ /**
+ * 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;