FFmpeg
mpegvideoenc.h
Go to the documentation of this file.
1 /*
2  * Generic DCT based hybrid video encoder
3  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4  * Copyright (c) 2002-2004 Michael Niedermayer
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 /**
24  * @file
25  * mpegvideo header.
26  */
27 
28 #ifndef AVCODEC_MPEGVIDEOENC_H
29 #define AVCODEC_MPEGVIDEOENC_H
30 
31 #include <float.h>
32 
33 #include "libavutil/avassert.h"
34 #include "libavutil/opt.h"
35 #include "fdctdsp.h"
36 #include "motion_est.h"
37 #include "mpegvideo.h"
38 #include "mpegvideoencdsp.h"
39 #include "pixblockdsp.h"
40 #include "put_bits.h"
41 #include "ratecontrol.h"
42 
43 #define MPVENC_MAX_B_FRAMES 16
44 
45 typedef struct MPVEncContext {
46  MpegEncContext c; ///< the common base context
47 
48  /** bit output */
50 
51  unsigned int lambda; ///< Lagrange multiplier used in rate distortion
52  unsigned int lambda2; ///< (lambda*lambda) >> FF_LAMBDA_SHIFT
54  int adaptive_quant; ///< use adaptive quantization
55  int dquant; ///< qscale difference to prev qscale
56  int skipdct; ///< skip dct and code zero residual
57 
59 
62 
63  int mpv_flags; ///< flags set by private options
64  /// Bitfield containing information which frames to reconstruct.
66 
67  /**
68  * Reference to the source picture.
69  */
71 
73 
78 
79  int f_code; ///< forward MV resolution
80  int b_code; ///< backward MV resolution for B-frames
81 
82  int16_t (*p_mv_table)[2]; ///< MV table (1MV per MB) P-frame
83  int16_t (*b_forw_mv_table)[2]; ///< MV table (1MV per MB) forward mode B-frame
84  int16_t (*b_back_mv_table)[2]; ///< MV table (1MV per MB) backward mode B-frame
85  int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame
86  int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame
87  int16_t (*b_direct_mv_table)[2]; ///< MV table (1MV per MB) direct mode B-frame
88  int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame
89  uint8_t (*p_field_select_table[2]); ///< Only the first element is allocated
90  uint8_t (*b_field_select_table[2][2]); ///< allocated jointly with p_field_select_table
91 
92  uint16_t *mb_type; ///< Table for candidate MB types
93  uint16_t *mb_var; ///< Table for MB variances
94  uint16_t *mc_mb_var; ///< Table for motion compensated MB variances
95  uint8_t *mb_mean; ///< Table for MB luminance
97 
98  int intra_quant_bias; ///< bias for the quantizer
99  int inter_quant_bias; ///< bias for the quantizer
100  int min_qcoeff; ///< minimum encodable coefficient
101  int max_qcoeff; ///< maximum encodable coefficient
102  int ac_esc_length; ///< num of bits needed to encode the longest esc
103  const uint8_t *intra_ac_vlc_length;
104  const uint8_t *intra_ac_vlc_last_length;
107  const uint8_t *inter_ac_vlc_length;
108  const uint8_t *inter_ac_vlc_last_length;
109  const uint8_t *luma_dc_vlc_length;
110 
111  int coded_score[12];
112 
113  /** precomputed matrix (combine qscale and DCT renorm) */
114  int (*q_intra_matrix)[64];
116  int (*q_inter_matrix)[64];
117  /** identical to the above but for MMX & these are not permutated, second 64 entries are bias*/
118  uint16_t (*q_intra_matrix16)[2][64];
119  uint16_t (*q_chroma_intra_matrix16)[2][64];
120  uint16_t (*q_inter_matrix16)[2][64];
121 
122  /* noise reduction */
123  void (*denoise_dct)(struct MPVEncContext *s, int16_t *block);
124  int (*dct_error_sum)[64];
125  int dct_count[2];
126  uint16_t (*dct_offset)[64];
127 
128  /* statistics, used for 2-pass encoding */
129  int mv_bits;
132  int i_count;
133  int misc_bits; ///< cbp, mb_type
134  int last_bits; ///< temp var used for calculating the above vars
135 
136  /* H.263 specific */
137  int mb_info; ///< interval for outputting info about mb offsets as side data
140  uint8_t *mb_info_ptr;
141 
142  /* MJPEG specific */
144  int esc_pos;
145 
146  /* MPEG-1 specific */
147  int last_mv_dir; ///< last mv_dir, used for B-frame encoding
148 
149  /* MPEG-4 specific */
150  PutBitContext tex_pb; ///< used for data partitioned VOPs
151  PutBitContext pb2; ///< used for data partitioned VOPs
152 
153  /* MSMPEG4 specific */
155 
156  /* RTP specific */
157  int rtp_mode;
160 
161  uint8_t *ptr_lastgob;
162 
163  void (*encode_mb)(struct MPVEncContext *s, int16_t block[][64],
164  int motion_x, int motion_y);
165 
166  int (*dct_quantize)(struct MPVEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);
167 
168  me_cmp_func ildct_cmp[2]; ///< 0 = intra, 1 = non-intra
169  me_cmp_func n_sse_cmp[2]; ///< either SSE or NSSE cmp func
172  int (*sum_abs_dctelem)(const int16_t *block);
173 
175 } MPVEncContext;
176 
177 typedef struct MPVMainEncContext {
178  MPVEncContext s; ///< The main slicecontext
179 
180  int intra_only; ///< if true, only intra pictures are generated
181  int gop_size;
182  int max_b_frames; ///< max number of B-frames
183  int picture_in_gop_number; ///< 0-> first pic in gop, ...
184  int input_picture_number; ///< used to set pic->display_picture_number
185  int coded_picture_number; ///< used to set pic->coded_picture_number
186 
187  MPVPicture *input_picture[MPVENC_MAX_B_FRAMES + 1]; ///< next pictures in display order
188  MPVPicture *reordered_input_picture[MPVENC_MAX_B_FRAMES + 1]; ///< next pictures in coded order
189 
190  int64_t user_specified_pts; ///< last non-zero pts from user-supplied AVFrame
191  /**
192  * pts difference between the first and second input frame, used for
193  * calculating dts of the first frame when there's a delay */
195  /**
196  * reordered pts to be used as dts for the next output frame when there's
197  * a delay */
199 
200  /// temporary frames used by b_frame_strategy = 2
205 
207 
209 
211  int lmin, lmax;
213 
214  /* MPEG-1/2 specific */
215  int vbv_delay_pos; ///< offset of vbv_delay in the bitstream
216 
217  const uint8_t *fcode_tab; ///< smallest fcode needed for each MV
218 
219  /* frame skip options */
225 
227 
228  /* bit rate control */
231  int frame_bits; ///< bits used for the current frame
233  int stuffing_bits; ///< bits used for stuffing
234  int next_lambda; ///< next lambda used for retrying to encode a frame
235  int fixed_qscale; ///< fixed qscale if non zero
236  int last_lambda_for[5]; ///< last lambda for a specific pict type
237  int last_pict_type; //FIXME removes
238  int last_non_b_pict_type; ///< used for MPEG-4 gmc B-frames & ratecontrol
239  RateControlContext rc_context; ///< contains stuff only accessed in ratecontrol.c
240 
242  int me_pre; ///< prepass for motion estimation
243 
244  int64_t mb_var_sum; ///< sum of MB variance for current frame
245  int64_t mc_mb_var_sum; ///< motion compensated MB variance for current frame
246 
247  char *me_map_base; ///< backs MotionEstContext.(map|score_map)
248  char *dct_error_sum_base; ///< backs dct_error_sum
249  int16_t (*mv_table_base)[2];
251 
252 static inline const MPVMainEncContext *slice_to_mainenc(const MPVEncContext *s)
253 {
254 #ifdef NO_SLICE_THREADING_HERE
255  av_assert2(s->c.slice_context_count <= 1 &&
256  !(s->c.avctx->codec->capabilities & AV_CODEC_CAP_SLICE_THREADS));
257  return (const MPVMainEncContext*)s;
258 #else
259  return s->parent;
260 #endif
261 }
262 
263 #define MAX_FCODE 7
264 #define UNI_AC_ENC_INDEX(run,level) ((run)*128 + (level))
265 #define INPLACE_OFFSET 16
266 
267 /* MB types for encoding */
268 #define CANDIDATE_MB_TYPE_INTRA (1 << 0)
269 #define CANDIDATE_MB_TYPE_INTER (1 << 1)
270 #define CANDIDATE_MB_TYPE_INTER4V (1 << 2)
271 #define CANDIDATE_MB_TYPE_SKIPPED (1 << 3)
272 
273 #define CANDIDATE_MB_TYPE_DIRECT (1 << 4)
274 #define CANDIDATE_MB_TYPE_FORWARD (1 << 5)
275 #define CANDIDATE_MB_TYPE_BACKWARD (1 << 6)
276 #define CANDIDATE_MB_TYPE_BIDIR (1 << 7)
277 
278 #define CANDIDATE_MB_TYPE_INTER_I (1 << 8)
279 #define CANDIDATE_MB_TYPE_FORWARD_I (1 << 9)
280 #define CANDIDATE_MB_TYPE_BACKWARD_I (1 << 10)
281 #define CANDIDATE_MB_TYPE_BIDIR_I (1 << 11)
282 
283 #define CANDIDATE_MB_TYPE_DIRECT0 (1 << 12)
284 
285 /* mpegvideo_enc common options */
286 #define FF_MPV_FLAG_SKIP_RD 0x0001
287 #define FF_MPV_FLAG_STRICT_GOP 0x0002
288 #define FF_MPV_FLAG_QP_RD 0x0004
289 #define FF_MPV_FLAG_CBP_RD 0x0008
290 #define FF_MPV_FLAG_NAQ 0x0010
291 #define FF_MPV_FLAG_MV0 0x0020
292 
293 #define FF_MPV_OPT_CMP_FUNC \
294 { "sad", "Sum of absolute differences, fast", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
295 { "sse", "Sum of squared errors", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
296 { "satd", "Sum of absolute Hadamard transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SATD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
297 { "dct", "Sum of absolute DCT transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCT }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
298 { "psnr", "Sum of squared quantization errors, low quality", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_PSNR }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
299 { "bit", "Number of bits needed for the block", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_BIT }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
300 { "rd", "Rate distortion optimal, slow", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_RD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
301 { "zero", "Zero", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_ZERO }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
302 { "vsad", "Sum of absolute vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
303 { "vsse", "Sum of squared vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
304 { "nsse", "Noise preserving sum of squared differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_NSSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
305 { "dct264", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCT264 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
306 { "dctmax", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
307 { "chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_CHROMA }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
308 { "msad", "Sum of absolute differences, median predicted", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_MEDIAN_SAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }
309 
310 #define FF_MPV_OFFSET(x) offsetof(MPVEncContext, x)
311 #define FF_MPV_MAIN_OFFSET(x) offsetof(MPVMainEncContext, x)
312 #define FF_RC_OFFSET(x) offsetof(MPVMainEncContext, rc_context.x)
313 #define FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
314 #define FF_MPV_COMMON_OPTS \
315 FF_MPV_OPT_CMP_FUNC, \
316 { "mpv_flags", "Flags common for all mpegvideo-based encoders.", FF_MPV_OFFSET(mpv_flags), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "mpv_flags" },\
317 { "skip_rd", "RD optimal MB level residual skipping", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_SKIP_RD }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "mpv_flags" },\
318 { "strict_gop", "Strictly enforce gop size", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_STRICT_GOP }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "mpv_flags" },\
319 { "qp_rd", "Use rate distortion optimization for qp selection", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_QP_RD }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "mpv_flags" },\
320 { "cbp_rd", "use rate distortion optimization for CBP", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_CBP_RD }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "mpv_flags" },\
321 { "naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_NAQ }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "mpv_flags" },\
322 { "luma_elim_threshold", "single coefficient elimination threshold for luminance (negative values also consider dc coefficient)",\
323  FF_MPV_OFFSET(luma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\
324 { "chroma_elim_threshold", "single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)",\
325  FF_MPV_OFFSET(chroma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\
326 { "quantizer_noise_shaping", NULL, FF_MPV_OFFSET(quantizer_noise_shaping), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FF_MPV_OPT_FLAGS },\
327 { "error_rate", "Simulate errors in the bitstream to test error concealment.", \
328  FF_MPV_OFFSET(error_rate), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FF_MPV_OPT_FLAGS },\
329 {"qsquish", "how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function)", \
330  FF_RC_OFFSET(qsquish), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0, 99, FF_MPV_OPT_FLAGS}, \
331 {"rc_qmod_amp", "experimental quantizer modulation", FF_RC_OFFSET(qmod_amp), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \
332 {"rc_qmod_freq", "experimental quantizer modulation", FF_RC_OFFSET(qmod_freq), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS}, \
333 {"rc_eq", "Set rate control equation. When computing the expression, besides the standard functions " \
334  "defined in the section 'Expression Evaluation', the following functions are available: " \
335  "bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv " \
336  "fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.", \
337  FF_RC_OFFSET(rc_eq), AV_OPT_TYPE_STRING, .flags = FF_MPV_OPT_FLAGS }, \
338 {"rc_init_cplx", "initial complexity for 1-pass encoding", FF_RC_OFFSET(initial_cplx), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \
339 {"rc_buf_aggressivity", "currently useless", FF_RC_OFFSET(buffer_aggressivity), AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \
340 {"border_mask", "increase the quantizer for macroblocks close to borders", FF_MPV_MAIN_OFFSET(border_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \
341 {"lmin", "minimum Lagrange factor (VBR)", FF_MPV_MAIN_OFFSET(lmin), AV_OPT_TYPE_INT, {.i64 = 2*FF_QP2LAMBDA }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, \
342 {"lmax", "maximum Lagrange factor (VBR)", FF_MPV_MAIN_OFFSET(lmax), AV_OPT_TYPE_INT, {.i64 = 31*FF_QP2LAMBDA }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, \
343 {"skip_threshold", "Frame skip threshold", FF_MPV_MAIN_OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
344 {"skip_factor", "Frame skip factor", FF_MPV_MAIN_OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
345 {"skip_exp", "Frame skip exponent", FF_MPV_MAIN_OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
346 {"skip_cmp", "Frame skip compare function", FF_MPV_MAIN_OFFSET(frame_skip_cmp), AV_OPT_TYPE_INT, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, .unit = "cmp_func" }, \
347 {"noise_reduction", "Noise reduction", FF_MPV_MAIN_OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
348 {"ps", "RTP payload size in bytes", FF_MPV_OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
349 
350 #define FF_MPV_COMMON_BFRAME_OPTS \
351 {"b_strategy", "Strategy to choose between I/P/B-frames", FF_MPV_MAIN_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS }, \
352 {"b_sensitivity", "Adjust sensitivity of b_frame_strategy 1", FF_MPV_MAIN_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS }, \
353 {"brd_scale", "Downscale frames for dynamic B-frame decision", FF_MPV_MAIN_OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 3, FF_MPV_OPT_FLAGS },
354 
355 #define FF_MPV_COMMON_MOTION_EST_OPTS \
356 { "mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_MV0 }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "mpv_flags" },\
357 {"motion_est", "motion estimation algorithm", FF_MPV_OFFSET(me.motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_XONE, FF_MPV_OPT_FLAGS, .unit = "motion_est" }, \
358 { "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "motion_est" }, \
359 { "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "motion_est" }, \
360 { "xone", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_XONE }, 0, 0, FF_MPV_OPT_FLAGS, .unit = "motion_est" }, \
361 {"mepc", "Motion estimation bitrate penalty compensation (1.0 = 256)", FF_MPV_MAIN_OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
362 {"mepre", "pre motion estimation", FF_MPV_MAIN_OFFSET(me_pre), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
363 {"intra_penalty", "Penalty for intra blocks in block decision", FF_MPV_OFFSET(intra_penalty), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX/2, FF_MPV_OPT_FLAGS }, \
364 {"sc_threshold", "Scene change threshold", FF_MPV_MAIN_OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
365 
366 extern const AVClass ff_mpv_enc_class;
367 
369 
372  const AVFrame *frame, int *got_packet);
373 int ff_mpv_reallocate_putbitbuffer(MPVEncContext *s, size_t threshold, size_t size_increase);
374 
375 void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix);
376 
380 
381 void ff_convert_matrix(MPVEncContext *s, int (*qmat)[64], uint16_t (*qmat16)[2][64],
382  const uint16_t *quant_matrix, int bias, int qmin, int qmax, int intra);
383 
384 void ff_block_permute(int16_t *block, const uint8_t *permutation,
385  const uint8_t *scantable, int last);
386 
387 static inline int get_bits_diff(MPVEncContext *s)
388 {
389  const int bits = put_bits_count(&s->pb);
390  const int last = s->last_bits;
391 
392  s->last_bits = bits;
393 
394  return bits - last;
395 }
396 
397 #endif
ratecontrol.h
MPV_MAX_PLANES
#define MPV_MAX_PLANES
Definition: mpegpicture.h:31
MPVMainEncContext::me_pre
int me_pre
prepass for motion estimation
Definition: mpegvideoenc.h:242
MPVMainEncContext::fcode_tab
const uint8_t * fcode_tab
smallest fcode needed for each MV
Definition: mpegvideoenc.h:217
MPVMainEncContext::fixed_qscale
int fixed_qscale
fixed qscale if non zero
Definition: mpegvideoenc.h:235
MPVMainEncContext::frame_skip_cmp_fn
me_cmp_func frame_skip_cmp_fn
Definition: mpegvideoenc.h:224
MPVMainEncContext::bit_rate
int64_t bit_rate
Definition: mpegvideoenc.h:229
MPVEncContext::skipdct
int skipdct
skip dct and code zero residual
Definition: mpegvideoenc.h:56
MPVEncContext::misc_bits
int misc_bits
cbp, mb_type
Definition: mpegvideoenc.h:133
MPVEncContext::mpvencdsp
MpegvideoEncDSPContext mpvencdsp
Definition: mpegvideoenc.h:75
MPVEncContext
Definition: mpegvideoenc.h:45
MPVEncContext::b_code
int b_code
backward MV resolution for B-frames
Definition: mpegvideoenc.h:80
opt.h
MPVEncContext::luma_dc_vlc_length
const uint8_t * luma_dc_vlc_length
Definition: mpegvideoenc.h:109
MPVMainEncContext::dct_error_sum_base
char * dct_error_sum_base
backs dct_error_sum
Definition: mpegvideoenc.h:248
MPVEncContext::inter_ac_vlc_last_length
const uint8_t * inter_ac_vlc_last_length
Definition: mpegvideoenc.h:108
MPVEncContext::max_qcoeff
int max_qcoeff
maximum encodable coefficient
Definition: mpegvideoenc.h:101
MPVEncContext::tex_pb
PutBitContext tex_pb
used for data partitioned VOPs
Definition: mpegvideoenc.h:150
matrix
Definition: vc1dsp.c:43
MPVEncContext::c
MpegEncContext c
the common base context
Definition: mpegvideoenc.h:46
MotionEstContext
Motion estimation context.
Definition: motion_est.h:49
MPVMainEncContext::total_bits
int64_t total_bits
Definition: mpegvideoenc.h:230
int64_t
long long int64_t
Definition: coverity.c:34
MPVMainEncContext::noise_reduction
int noise_reduction
Definition: mpegvideoenc.h:208
MPVMainEncContext::last_lambda_for
int last_lambda_for[5]
last lambda for a specific pict type
Definition: mpegvideoenc.h:236
MPVEncContext::mv_bits
int mv_bits
Definition: mpegvideoenc.h:129
MPVMainEncContext::frame_skip_threshold
int frame_skip_threshold
Definition: mpegvideoenc.h:220
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:410
ff_mpv_reallocate_putbitbuffer
int ff_mpv_reallocate_putbitbuffer(MPVEncContext *s, size_t threshold, size_t size_increase)
Definition: mpegvideo_enc.c:2941
MPVEncContext::lambda
unsigned int lambda
Lagrange multiplier used in rate distortion.
Definition: mpegvideoenc.h:51
MPVEncContext::sum_abs_dctelem
int(* sum_abs_dctelem)(const int16_t *block)
Definition: mpegvideoenc.h:172
MPVMainEncContext::dts_delta
int64_t dts_delta
pts difference between the first and second input frame, used for calculating dts of the first frame ...
Definition: mpegvideoenc.h:194
MPVEncContext::dquant
int dquant
qscale difference to prev qscale
Definition: mpegvideoenc.h:55
MPVEncContext::inter_ac_vlc_length
const uint8_t * inter_ac_vlc_length
Definition: mpegvideoenc.h:107
MPVEncContext::b_field_select_table
uint8_t *[2][2] b_field_select_table
allocated jointly with p_field_select_table
Definition: mpegvideoenc.h:90
float.h
MPVEncContext::intra_ac_vlc_last_length
const uint8_t * intra_ac_vlc_last_length
Definition: mpegvideoenc.h:104
MPVEncContext::mb_type
uint16_t * mb_type
Table for candidate MB types.
Definition: mpegvideoenc.h:92
ff_mpv_encode_init
int ff_mpv_encode_init(AVCodecContext *avctx)
Definition: mpegvideo_enc.c:544
mpegvideo.h
MPVEncContext::lambda_table
int * lambda_table
Definition: mpegvideoenc.h:53
MPVMainEncContext::gop_size
int gop_size
Definition: mpegvideoenc.h:181
MPVMainEncContext::mb_var_sum
int64_t mb_var_sum
sum of MB variance for current frame
Definition: mpegvideoenc.h:244
MPVEncContext::esc3_level_length
int esc3_level_length
Definition: mpegvideoenc.h:154
MPVMainEncContext::encode_picture_header
int(* encode_picture_header)(struct MPVMainEncContext *m)
Definition: mpegvideoenc.h:226
MPVEncContext::last_bits
int last_bits
temp var used for calculating the above vars
Definition: mpegvideoenc.h:134
ff_dct_encode_init
void ff_dct_encode_init(MPVEncContext *s)
Definition: mpegvideo_enc.c:301
MPVMainEncContext::coded_picture_number
int coded_picture_number
used to set pic->coded_picture_number
Definition: mpegvideoenc.h:185
MPVEncContext::mb_info_size
int mb_info_size
Definition: mpegvideoenc.h:139
MPVEncContext::sse_cmp
me_cmp_func sse_cmp[2]
Definition: mpegvideoenc.h:171
MPVEncContext::mb_info
int mb_info
interval for outputting info about mb offsets as side data
Definition: mpegvideoenc.h:137
MPVEncContext::pb2
PutBitContext pb2
used for data partitioned VOPs
Definition: mpegvideoenc.h:151
FDCTDSPContext
Definition: fdctdsp.h:28
MPVMainEncContext::b_sensitivity
int b_sensitivity
Definition: mpegvideoenc.h:203
MPVEncContext::mb_mean
uint8_t * mb_mean
Table for MB luminance.
Definition: mpegvideoenc.h:95
MPVEncContext::b_bidir_forw_mv_table
int16_t(* b_bidir_forw_mv_table)[2]
MV table (1MV per MB) bidir mode B-frame.
Definition: mpegvideoenc.h:85
MPVEncContext::encoding_error
uint64_t encoding_error[MPV_MAX_PLANES]
Definition: mpegvideoenc.h:96
MPVEncContext::intra_penalty
int intra_penalty
Definition: mpegvideoenc.h:174
MPVMainEncContext::input_picture
MPVPicture * input_picture[MPVENC_MAX_B_FRAMES+1]
next pictures in display order
Definition: mpegvideoenc.h:187
MPVEncContext::mb_var
uint16_t * mb_var
Table for MB variances.
Definition: mpegvideoenc.h:93
motion_est.h
MPVMainEncContext::frame_skip_factor
int frame_skip_factor
Definition: mpegvideoenc.h:221
MPVEncContext::q_intra_matrix16
uint16_t(* q_intra_matrix16)[2][64]
identical to the above but for MMX & these are not permutated, second 64 entries are bias
Definition: mpegvideoenc.h:118
MPVMainEncContext::stuffing_bits
int stuffing_bits
bits used for stuffing
Definition: mpegvideoenc.h:233
MPVMainEncContext::picture_in_gop_number
int picture_in_gop_number
0-> first pic in gop, ...
Definition: mpegvideoenc.h:183
avassert.h
RateControlContext
rate control context.
Definition: ratecontrol.h:60
pkt
AVPacket * pkt
Definition: movenc.c:60
me_cmp_func
int(* me_cmp_func)(MPVEncContext *c, const uint8_t *blk1, const uint8_t *blk2, ptrdiff_t stride, int h)
Definition: me_cmp.h:50
MPVEncContext::ptr_lastgob
uint8_t * ptr_lastgob
Definition: mpegvideoenc.h:161
MPVEncContext::q_inter_matrix16
uint16_t(* q_inter_matrix16)[2][64]
Definition: mpegvideoenc.h:120
MPVEncContext::rtp_payload_size
int rtp_payload_size
Definition: mpegvideoenc.h:158
MPVMainEncContext::tmp_frames
AVFrame * tmp_frames[MPVENC_MAX_B_FRAMES+2]
temporary frames used by b_frame_strategy = 2
Definition: mpegvideoenc.h:201
s
#define s(width, name)
Definition: cbs_vp9.c:198
MPVMainEncContext::brd_scale
int brd_scale
Definition: mpegvideoenc.h:204
MPVMainEncContext::reordered_input_picture
MPVPicture * reordered_input_picture[MPVENC_MAX_B_FRAMES+1]
next pictures in coded order
Definition: mpegvideoenc.h:188
MPVMainEncContext::intra_only
int intra_only
if true, only intra pictures are generated
Definition: mpegvideoenc.h:180
MPVMainEncContext::mc_mb_var_sum
int64_t mc_mb_var_sum
motion compensated MB variance for current frame
Definition: mpegvideoenc.h:245
MPVMainEncContext::rc_context
RateControlContext rc_context
contains stuff only accessed in ratecontrol.c
Definition: mpegvideoenc.h:239
MPVEncContext::q_inter_matrix
int(* q_inter_matrix)[64]
Definition: mpegvideoenc.h:116
MPVEncContext::parent
struct MPVMainEncContext * parent
Definition: mpegvideoenc.h:72
bits
uint8_t bits
Definition: vp3data.h:128
MPVEncContext::pb
PutBitContext pb
bit output
Definition: mpegvideoenc.h:49
MPVMainEncContext::header_bits
int header_bits
Definition: mpegvideoenc.h:232
MPVMainEncContext::max_b_frames
int max_b_frames
max number of B-frames
Definition: mpegvideoenc.h:182
PutBitContext
Definition: put_bits.h:50
MPVEncContext::q_chroma_intra_matrix
int(* q_chroma_intra_matrix)[64]
Definition: mpegvideoenc.h:115
MPVEncContext::dct_count
int dct_count[2]
Definition: mpegvideoenc.h:125
MPVEncContext::intra_chroma_ac_vlc_last_length
const uint8_t * intra_chroma_ac_vlc_last_length
Definition: mpegvideoenc.h:106
PixblockDSPContext
Definition: pixblockdsp.h:26
MPVEncContext::min_qcoeff
int min_qcoeff
minimum encodable coefficient
Definition: mpegvideoenc.h:100
MPVEncContext::frame_reconstruction_bitfield
int frame_reconstruction_bitfield
Bitfield containing information which frames to reconstruct.
Definition: mpegvideoenc.h:65
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:76
MPVEncContext::esc_pos
int esc_pos
Definition: mpegvideoenc.h:144
MPVEncContext::dct_quantize
int(* dct_quantize)(struct MPVEncContext *s, int16_t *block, int n, int qscale, int *overflow)
Definition: mpegvideoenc.h:166
MPVEncContext::dct_error_sum
int(* dct_error_sum)[64]
Definition: mpegvideoenc.h:124
MPVMainEncContext::lmin
int lmin
Definition: mpegvideoenc.h:211
bias
static int bias(int x, int c)
Definition: vqcdec.c:115
MPVEncContext::i_tex_bits
int i_tex_bits
Definition: mpegvideoenc.h:130
MPVEncContext::lambda2
unsigned int lambda2
(lambda*lambda) >> FF_LAMBDA_SHIFT
Definition: mpegvideoenc.h:52
MPVMainEncContext::me_map_base
char * me_map_base
backs MotionEstContext.(map|score_map)
Definition: mpegvideoenc.h:247
MPVEncContext::quantizer_noise_shaping
int quantizer_noise_shaping
Definition: mpegvideoenc.h:58
MPVEncContext::pdsp
PixblockDSPContext pdsp
Definition: mpegvideoenc.h:76
MPVEncContext::inter_quant_bias
int inter_quant_bias
bias for the quantizer
Definition: mpegvideoenc.h:99
MPVMainEncContext
Definition: mpegvideoenc.h:177
MPVMainEncContext::last_pict_type
int last_pict_type
Definition: mpegvideoenc.h:237
MPVEncContext::intra_quant_bias
int intra_quant_bias
bias for the quantizer
Definition: mpegvideoenc.h:98
MPVMainEncContext::vbv_delay_pos
int vbv_delay_pos
offset of vbv_delay in the bitstream
Definition: mpegvideoenc.h:215
MPVEncContext::chroma_elim_threshold
int chroma_elim_threshold
Definition: mpegvideoenc.h:61
MPVEncContext::prev_mb_info
int prev_mb_info
Definition: mpegvideoenc.h:138
MPVEncContext::error_rate
int error_rate
Definition: mpegvideoenc.h:159
MPVMainEncContext::frame_bits
int frame_bits
bits used for the current frame
Definition: mpegvideoenc.h:231
MPVEncContext::ildct_cmp
me_cmp_func ildct_cmp[2]
0 = intra, 1 = non-intra
Definition: mpegvideoenc.h:168
ff_convert_matrix
void ff_convert_matrix(MPVEncContext *s, int(*qmat)[64], uint16_t(*qmat16)[2][64], const uint16_t *quant_matrix, int bias, int qmin, int qmax, int intra)
Definition: mpegvideo_enc.c:111
MPVEncContext::new_pic
AVFrame * new_pic
Reference to the source picture.
Definition: mpegvideoenc.h:70
MPVEncContext::me
MotionEstContext me
Definition: mpegvideoenc.h:77
MPVMainEncContext::input_picture_number
int input_picture_number
used to set pic->display_picture_number
Definition: mpegvideoenc.h:184
AV_CODEC_CAP_SLICE_THREADS
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:99
MPVEncContext::ac_esc_length
int ac_esc_length
num of bits needed to encode the longest esc
Definition: mpegvideoenc.h:102
MPVEncContext::i_count
int i_count
Definition: mpegvideoenc.h:132
MPVMainEncContext::me_penalty_compensation
int me_penalty_compensation
Definition: mpegvideoenc.h:241
MPVEncContext::p_field_select_table
uint8_t *[2] p_field_select_table
Only the first element is allocated.
Definition: mpegvideoenc.h:89
MPVEncContext::q_intra_matrix
int(* q_intra_matrix)[64]
precomputed matrix (combine qscale and DCT renorm)
Definition: mpegvideoenc.h:114
MPVEncContext::b_field_mv_table
int16_t(*[2][2][2] b_field_mv_table)[2]
MV table (4MV per MB) interlaced B-frame.
Definition: mpegvideoenc.h:88
get_bits_diff
static int get_bits_diff(MPVEncContext *s)
Definition: mpegvideoenc.h:387
MpegvideoEncDSPContext
Definition: mpegvideoencdsp.h:32
av_assert2
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
Definition: avassert.h:67
MPVEncContext::encode_mb
void(* encode_mb)(struct MPVEncContext *s, int16_t block[][64], int motion_x, int motion_y)
Definition: mpegvideoenc.h:163
put_bits_count
static int put_bits_count(PutBitContext *s)
Definition: put_bits.h:80
MPVEncContext::f_code
int f_code
forward MV resolution
Definition: mpegvideoenc.h:79
MPVMainEncContext::mv_table_base
int16_t(* mv_table_base)[2]
Definition: mpegvideoenc.h:249
MPVEncContext::dct_offset
uint16_t(* dct_offset)[64]
Definition: mpegvideoenc.h:126
MPVENC_MAX_B_FRAMES
#define MPVENC_MAX_B_FRAMES
Definition: mpegvideoenc.h:43
MPVMainEncContext::next_lambda
int next_lambda
next lambda used for retrying to encode a frame
Definition: mpegvideoenc.h:234
fdctdsp.h
MPVEncContext::b_bidir_back_mv_table
int16_t(* b_bidir_back_mv_table)[2]
MV table (1MV per MB) bidir mode B-frame.
Definition: mpegvideoenc.h:86
MPVMainEncContext::border_masking
float border_masking
Definition: mpegvideoenc.h:210
MPVEncContext::mc_mb_var
uint16_t * mc_mb_var
Table for motion compensated MB variances.
Definition: mpegvideoenc.h:94
MPVEncContext::last_mb_info
int last_mb_info
Definition: mpegvideoenc.h:138
MPVEncContext::intra_chroma_ac_vlc_length
const uint8_t * intra_chroma_ac_vlc_length
Definition: mpegvideoenc.h:105
MPVMainEncContext::last_non_b_pict_type
int last_non_b_pict_type
used for MPEG-4 gmc B-frames & ratecontrol
Definition: mpegvideoenc.h:238
MPVEncContext::mjpeg_ctx
struct MJpegContext * mjpeg_ctx
Definition: mpegvideoenc.h:143
MPVEncContext::adaptive_quant
int adaptive_quant
use adaptive quantization
Definition: mpegvideoenc.h:54
MPVMainEncContext::vbv_ignore_qmax
int vbv_ignore_qmax
Definition: mpegvideoenc.h:212
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
ff_mpv_encode_end
int ff_mpv_encode_end(AVCodecContext *avctx)
Definition: mpegvideo_enc.c:1105
MPVEncContext::fdsp
FDCTDSPContext fdsp
Definition: mpegvideoenc.h:74
ff_mpvenc_dct_init_mips
void ff_mpvenc_dct_init_mips(MPVEncContext *s)
Definition: mpegvideoenc_init_mips.c:26
MPVEncContext::b_direct_mv_table
int16_t(* b_direct_mv_table)[2]
MV table (1MV per MB) direct mode B-frame.
Definition: mpegvideoenc.h:87
MPVMainEncContext::reordered_pts
int64_t reordered_pts
reordered pts to be used as dts for the next output frame when there's a delay
Definition: mpegvideoenc.h:198
MPVMainEncContext::frame_skip_cmp
int frame_skip_cmp
Definition: mpegvideoenc.h:223
AVCodecContext
main external API structure.
Definition: avcodec.h:431
MPVEncContext::mpv_flags
int mpv_flags
flags set by private options
Definition: mpegvideoenc.h:63
MPVEncContext::sad_cmp
me_cmp_func sad_cmp[2]
Definition: mpegvideoenc.h:170
MPVMainEncContext::lmax
int lmax
Definition: mpegvideoenc.h:211
ff_mpv_enc_class
const AVClass ff_mpv_enc_class
Definition: mpegvideo_enc.c:104
mpegvideoencdsp.h
MPVEncContext::p_mv_table
int16_t(* p_mv_table)[2]
MV table (1MV per MB) P-frame.
Definition: mpegvideoenc.h:82
MJpegContext
Holds JPEG frame data and Huffman table data.
Definition: mjpegenc.h:44
MPVEncContext::rtp_mode
int rtp_mode
Definition: mpegvideoenc.h:157
MPVMainEncContext::frame_skip_exp
int frame_skip_exp
Definition: mpegvideoenc.h:222
ff_mpv_encode_picture
int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: mpegvideo_enc.c:1927
ff_write_quant_matrix
void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix)
Definition: mpegvideo_enc.c:228
MPVEncContext::coded_score
int coded_score[12]
Definition: mpegvideoenc.h:111
overflow
Undefined Behavior In the C some operations are like signed integer overflow
Definition: undefined.txt:3
MPVEncContext::b_forw_mv_table
int16_t(* b_forw_mv_table)[2]
MV table (1MV per MB) forward mode B-frame.
Definition: mpegvideoenc.h:83
MPVMainEncContext::b_frame_strategy
int b_frame_strategy
Definition: mpegvideoenc.h:202
slice_to_mainenc
static const MPVMainEncContext * slice_to_mainenc(const MPVEncContext *s)
Definition: mpegvideoenc.h:252
AVPacket
This structure stores compressed data.
Definition: packet.h:512
MPVEncContext::luma_elim_threshold
int luma_elim_threshold
Definition: mpegvideoenc.h:60
MPVEncContext::mb_info_ptr
uint8_t * mb_info_ptr
Definition: mpegvideoenc.h:140
MPVMainEncContext::scenechange_threshold
int scenechange_threshold
Definition: mpegvideoenc.h:206
ff_dct_encode_init_x86
void ff_dct_encode_init_x86(MPVEncContext *s)
Definition: mpegvideoenc.c:122
MPVEncContext::n_sse_cmp
me_cmp_func n_sse_cmp[2]
either SSE or NSSE cmp func
Definition: mpegvideoenc.h:169
ff_block_permute
void ff_block_permute(int16_t *block, const uint8_t *permutation, const uint8_t *scantable, int last)
Permute an 8x8 block according to permutation.
Definition: mpegvideo_enc.c:4623
MPVEncContext::p_tex_bits
int p_tex_bits
Definition: mpegvideoenc.h:131
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
MPVEncContext::last_mv_dir
int last_mv_dir
last mv_dir, used for B-frame encoding
Definition: mpegvideoenc.h:147
MPVEncContext::denoise_dct
void(* denoise_dct)(struct MPVEncContext *s, int16_t *block)
Definition: mpegvideoenc.h:123
MPVMainEncContext::user_specified_pts
int64_t user_specified_pts
last non-zero pts from user-supplied AVFrame
Definition: mpegvideoenc.h:190
MPVPicture
MPVPicture.
Definition: mpegpicture.h:58
MPVEncContext::q_chroma_intra_matrix16
uint16_t(* q_chroma_intra_matrix16)[2][64]
Definition: mpegvideoenc.h:119
put_bits.h
MpegEncContext
MpegEncContext.
Definition: mpegvideo.h:64
MPVEncContext::intra_ac_vlc_length
const uint8_t * intra_ac_vlc_length
Definition: mpegvideoenc.h:103
MPVMainEncContext::s
MPVEncContext s
The main slicecontext.
Definition: mpegvideoenc.h:178
pixblockdsp.h
MPVEncContext::b_back_mv_table
int16_t(* b_back_mv_table)[2]
MV table (1MV per MB) backward mode B-frame.
Definition: mpegvideoenc.h:84