22 #ifndef AVCODEC_OPTIONS_TABLE_H
23 #define AVCODEC_OPTIONS_TABLE_H
33 #define OFFSET(x) offsetof(AVCodecContext,x)
34 #define DEFAULT 0 //should be NAN but it does not work as it is not a constant in glibc as required by ANSI/ISO C
36 #define V AV_OPT_FLAG_VIDEO_PARAM
37 #define A AV_OPT_FLAG_AUDIO_PARAM
38 #define S AV_OPT_FLAG_SUBTITLE_PARAM
39 #define E AV_OPT_FLAG_ENCODING_PARAM
40 #define D AV_OPT_FLAG_DECODING_PARAM
42 #define AV_CODEC_DEFAULT_BITRATE 200*1000
47 {
"bt",
"Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far "
48 "ratecontrol is willing to deviate from the target average bitrate value. This is not related "
49 "to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality.",
61 {
"mv0",
"always try a mb with mv=<0,0>", 0,
AV_OPT_TYPE_CONST, {.i64 =
CODEC_FLAG_MV0 }, INT_MIN, INT_MAX,
V|
E,
"flags"},
63 #if FF_API_INPUT_PRESERVED
74 #if FF_API_NORMALIZE_AQP
99 {
"esa",
"esa motion estimation (alias for full)", 0,
AV_OPT_TYPE_CONST, {.i64 =
ME_FULL }, INT_MIN, INT_MAX,
V|
E,
"me_method" },
101 {
"dia",
"diamond motion estimation (alias for EPZS)", 0,
AV_OPT_TYPE_CONST, {.i64 =
ME_EPZS }, INT_MIN, INT_MAX,
V|
E,
"me_method" },
117 {
"qcomp",
"video quantizer scale compression (VBR). Constant of ratecontrol equation. "
118 "Recommended range for default rc_eq: 0.0-1.0",
123 {
"qdiff",
"maximum difference between the quantizer scales (VBR)",
OFFSET(max_qdiff),
AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX,
V|
E},
125 {
"b_qfactor",
"QP factor between P- and B-frames",
OFFSET(b_quant_factor),
AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX,
V|
E},
126 #if FF_API_RC_STRATEGY
129 #if FF_API_PRIVATE_OPT
130 {
"b_strategy",
"strategy to choose between I/P/B-frames",
OFFSET(b_frame_strategy),
AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX,
V|
E},
147 #if FF_API_OLD_MSMPEG4
164 {
"ms",
"work around various bugs in Microsoft's broken decoders", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_BUG_MS }, INT_MIN, INT_MAX,
V|
D,
"bug"},
172 {
"b_qoffset",
"QP offset between P- and B-frames",
OFFSET(b_quant_offset),
AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX,
V|
E},
173 {
"err_detect",
"set error detection flags",
OFFSET(err_recognition),
AV_OPT_TYPE_FLAGS, {.i64 = 0 }, INT_MIN, INT_MAX,
A|
V|
D,
"err_detect"},
179 {
"careful",
"consider things that violate the spec, are fast to check and have not been seen in the wild as errors", 0,
AV_OPT_TYPE_CONST, {.i64 =
AV_EF_CAREFUL }, INT_MIN, INT_MAX,
A|
V|
D,
"err_detect"},
184 #if FF_API_PRIVATE_OPT
190 {
"rc_qmod_freq",
"deprecated, use encoder private options instead",
OFFSET(rc_qmod_freq),
AV_OPT_TYPE_INT, {.i64 =
DEFAULT }, INT_MIN, INT_MAX,
V|
E},
197 {
"minrate",
"minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.",
201 {
"rc_buf_aggressivity",
"deprecated, use encoder private options instead",
OFFSET(rc_buffer_aggressivity),
AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX,
V|
E},
203 {
"i_qfactor",
"QP factor between P- and I-frames",
OFFSET(i_quant_factor),
AV_OPT_TYPE_FLOAT, {.dbl = -0.8 }, -FLT_MAX, FLT_MAX,
V|
E},
204 {
"i_qoffset",
"QP offset between P- and I-frames",
OFFSET(i_quant_offset),
AV_OPT_TYPE_FLOAT, {.dbl = 0.0 }, -FLT_MAX, FLT_MAX,
V|
E},
215 {
"lumi_mask",
"compresses bright areas stronger than medium ones",
OFFSET(lumi_masking),
AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX,
V|
E},
216 {
"tcplx_mask",
"temporal complexity masking",
OFFSET(temporal_cplx_masking),
AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX,
V|
E},
217 {
"scplx_mask",
"spatial complexity masking",
OFFSET(spatial_cplx_masking),
AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX,
V|
E},
219 {
"dark_mask",
"compresses dark areas stronger than medium ones",
OFFSET(dark_masking),
AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX,
V|
E},
234 #if FF_API_ARCH_ALPHA
237 #if FF_API_UNUSED_MEMBERS
241 {
"xvidmmx",
"deprecated, for compatibility only", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_IDCT_XVID }, INT_MIN, INT_MAX,
V|
E|
D,
"idct"},
245 {
"ec",
"set error concealment strategy",
OFFSET(error_concealment),
AV_OPT_TYPE_FLAGS, {.i64 = 3 }, INT_MIN, INT_MAX,
V|
D,
"ec"},
250 #if FF_API_PRIVATE_OPT
271 #if FF_API_UNUSED_MEMBERS
277 {
"vis_qp",
"visualize quantization parameter (QP), lower QP are tinted greener", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_DEBUG_VIS_QP }, INT_MIN, INT_MAX,
V|
D,
"debug"},
293 {
"last_pred",
"amount of motion predictors from the previous frame",
OFFSET(last_predictor_count),
AV_OPT_TYPE_INT, {.i64 =
DEFAULT }, INT_MIN, INT_MAX,
V|
E},
294 #if FF_API_PRIVATE_OPT
298 {
"sad",
"sum of absolute differences, fast", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_CMP_SAD }, INT_MIN, INT_MAX,
V|
E,
"cmp_func"},
302 {
"psnr",
"sum of squared quantization errors (avoid, low quality)", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_CMP_PSNR }, INT_MIN, INT_MAX,
V|
E,
"cmp_func"},
304 {
"rd",
"rate distortion optimal, slow", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_CMP_RD }, INT_MIN, INT_MAX,
V|
E,
"cmp_func"},
309 #if CONFIG_SNOW_ENCODER
310 {
"w53",
"5/3 wavelet, only used in snow", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_CMP_W53 }, INT_MIN, INT_MAX,
V|
E,
"cmp_func"},
311 {
"w97",
"9/7 wavelet, only used in snow", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_CMP_W97 }, INT_MIN, INT_MAX,
V|
E,
"cmp_func"},
315 {
"msad",
"sum of absolute differences, median predicted", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_CMP_MEDIAN_SAD }, INT_MIN, INT_MAX,
V|
E,
"cmp_func"},
316 {
"pre_dia_size",
"diamond type & size for motion estimation pre-pass",
OFFSET(pre_dia_size),
AV_OPT_TYPE_INT, {.i64 =
DEFAULT }, INT_MIN, INT_MAX,
V|
E},
317 {
"subq",
"sub-pel motion estimation quality",
OFFSET(me_subpel_quality),
AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX,
V|
E},
322 #if FF_API_QUANT_BIAS
327 #if FF_API_CODER_TYPE
333 #if FF_API_UNUSED_MEMBERS
337 #if FF_API_PRIVATE_OPT
348 #if FF_API_STREAM_CODEC_TAG
351 #if FF_API_PRIVATE_OPT
355 {
"lmin",
"deprecated, use encoder private options instead",
OFFSET(lmin),
AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX,
V|
E},
356 {
"lmax",
"deprecated, use encoder private options instead",
OFFSET(lmax),
AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX,
V|
E},
358 #if FF_API_PRIVATE_OPT
361 {
"rc_init_occupancy",
"number of bits which should be loaded into the rc buffer before decoding starts",
OFFSET(rc_initial_buffer_occupancy),
AV_OPT_TYPE_INT, {.i64 =
DEFAULT }, INT_MIN, INT_MAX,
V|
E},
363 #if FF_API_ERROR_RATE
366 {
"threads",
"set the number of threads",
OFFSET(thread_count),
AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX,
V|
A|
E|
D,
"threads"},
367 {
"auto",
"autodetect a suitable number of threads to use", 0,
AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX,
V|
E|
D,
"threads"},
374 {
"skip_top",
"number of macroblock rows at the top which are skipped",
OFFSET(skip_top),
AV_OPT_TYPE_INT, {.i64 =
DEFAULT }, INT_MIN, INT_MAX,
V|
D},
375 {
"skip_bottom",
"number of macroblock rows at the bottom which are skipped",
OFFSET(skip_bottom),
AV_OPT_TYPE_INT, {.i64 =
DEFAULT }, INT_MIN, INT_MAX,
V|
D},
399 {
"lowres",
"decode at 1= 1/2, 2=1/4, 3=1/8 resolutions",
OFFSET(
lowres),
AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX,
V|
A|
D},
400 #if FF_API_PRIVATE_OPT
411 #if FF_API_PRIVATE_OPT
412 {
"mepc",
"motion estimation bitrate penalty compensation (1.0 = 256)",
OFFSET(me_penalty_compensation),
AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX,
V|
E},
425 #if FF_API_PRIVATE_OPT
428 {
"keyint_min",
"minimum interval between IDR-frames",
OFFSET(keyint_min),
AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX,
V|
E},
429 {
"refs",
"reference frames to consider for motion compensation",
OFFSET(refs),
AV_OPT_TYPE_INT, {.i64 = 1 }, INT_MIN, INT_MAX,
V|
E},
430 #if FF_API_PRIVATE_OPT
434 #if FF_API_UNUSED_MEMBERS
435 {
"sc_factor",
"multiplied by qscale for each frame and added to scene_change_score",
OFFSET(scenechange_factor),
AV_OPT_TYPE_INT, {.i64 = 6 }, 0, INT_MAX,
V|
E},
438 #if FF_API_PRIVATE_OPT
439 {
"b_sensitivity",
"adjust sensitivity of b_frame_strategy 1",
OFFSET(b_sensitivity),
AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX,
V|
E},
442 #if FF_API_PRIVATE_OPT
445 {
"timecode_frame_start",
"GOP timecode frame start number, in non-drop-frame format",
OFFSET(timecode_frame_start),
AV_OPT_TYPE_INT64, {.i64 = -1 }, -1, INT64_MAX,
V|
E},
508 {
"slices",
"set the number of slices, used in parallelized encoding",
OFFSET(slices),
AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX,
V|
E},
529 #if FF_API_ASS_TIMING
535 #if FF_API_ASS_TIMING
539 #if FF_API_SIDEDATA_ONLY_PKT
550 {
"codec_whitelist",
"List of decoders that are allowed to be used",
OFFSET(codec_whitelist),
AV_OPT_TYPE_STRING, { .str =
NULL }, CHAR_MIN, CHAR_MAX,
A|
V|
S|
D },
#define FF_IDCT_SIMPLEARMV5TE
ITU-R BT2020 for 12-bit system.
#define AV_CODEC_FLAG_INTERLACED_ME
interlaced motion estimation
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
#define FF_DEBUG_VIS_MB_TYPE
only access through AVOptions from outside libavcodec
#define FF_PROFILE_MPEG4_SIMPLE
#define AV_EF_AGGRESSIVE
consider things that a sane encoder should not do as an error
#define FF_SUB_CHARENC_MODE_PRE_DECODER
the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv ...
discard all frames except keyframes
#define FF_BUG_XVID_ILACE
static enum AVPixelFormat pix_fmt
#define FF_COMPRESSION_DEFAULT
#define FF_SUB_CHARENC_MODE_AUTOMATIC
libavcodec will select the mode itself
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
#define FF_MB_DECISION_BITS
chooses the one which needs the fewest bits
"Linear transfer characteristics"
#define AV_CODEC_FLAG_INTERLACED_DCT
Use interlaced DCT.
SMPTE ST 428-1 (CIE 1931 XYZ)
#define AV_CODEC_FLAG2_SKIP_MANUAL
Do not skip samples and export skip information as frame side data.
#define AV_CODEC_FLAG_LOOP_FILTER
loop filter.
#define FF_IDCT_SIMPLEALPHA
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
#define FF_PROFILE_DTS_HD_HRA
#define FF_COMPLIANCE_VERY_STRICT
Strictly conform to an older more strict version of the spec or reference software.
#define FF_PROFILE_MPEG2_AAC_HE
SMPTE ST 432-1 D65 (2010)
#define FF_SUB_CHARENC_MODE_DO_NOTHING
do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for inst...
#define FF_DEBUG_BITSTREAM
#define AV_EF_COMPLIANT
consider all spec non compliances as errors
#define AV_EF_BUFFER
detect improper bitstream length
enhanced predictive zonal search
#define FF_BUG_HPEL_CHROMA
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
static const AVOption avcodec_options[]
static int bidir_refine(MpegEncContext *s, int mb_x, int mb_y)
#define FF_PROFILE_AAC_MAIN
#define AV_EF_BITSTREAM
detect bitstream specification deviations
discard all non intra frames
#define AV_CODEC_FLAG2_CHUNKS
Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries...
#define FF_DEBUG_VIS_MV_B_FOR
#define FF_PROFILE_AAC_HE_V2
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
functionally identical to above
#define CODEC_FLAG_INPUT_PRESERVED
#define FF_BUG_MS
Work around various bugs in Microsoft's broken decoders.
int log_level_offset
logging level offset
#define FF_PROFILE_MPEG4_CORE
#define FF_PROFILE_MPEG4_MAIN
#define FF_DEBUG_PICT_INFO
#define AV_CODEC_FLAG_UNALIGNED
Allow decoders to produce frames with data planes that are not aligned to CPU requirements (e...
#define FF_DEBUG_VIS_MV_B_BACK
#define AV_CODEC_FLAG_LOW_DELAY
Force low delay.
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
#define FF_PROFILE_AAC_LTP
#define FF_BUG_QPEL_CHROMA2
#define FF_PROFILE_AAC_LD
#define AV_CODEC_FLAG2_RO_FLUSH_NOOP
Do not reset ASS ReadOrder field on flush (subtitles decoding)
#define AV_CODEC_FLAG_GRAY
Only decode/encode grayscale.
#define FF_IDCT_SIMPLEARM
#define FF_COMPLIANCE_UNOFFICIAL
Allow unofficial extensions.
#define FF_IDCT_SIMPLEAUTO
Libavcodec version macros.
#define FF_BUG_DIRECT_BLOCKSIZE
#define FF_CMP_MEDIAN_SAD
no search, that is use 0,0 vector whenever one is needed
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
#define AV_CODEC_FLAG2_IGNORE_CROP
Discard cropping information from SPS.
ITU-R BT1361 Extended Colour Gamut.
#define AV_CODEC_FLAG_4MV
4 MV per MB allowed / advanced prediction for H.263.
discard all bidirectional frames
#define FF_PROFILE_MPEG2_AAC_LOW
double cutoff
resampling cutoff frequency (swr: 6dB point; soxr: 0dB point).
#define FF_CODER_TYPE_DEFLATE
#define FF_PROFILE_DTS_ES
#define FF_SUB_TEXT_FMT_ASS
#define FF_BUG_NO_PADDING
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
#define FF_BUG_OLD_MSMPEG4
transformed exhaustive search algorithm
#define FF_PROFILE_AAC_ELD
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
#define AV_CODEC_FLAG_QSCALE
Use fixed qscale.
#define FF_THREAD_FRAME
Decode more than one frame at once.
#define AV_CODEC_FLAG_AC_PRED
H.263 advanced intra coding / MPEG-4 AC prediction.
colour filters using Illuminant C
#define FF_IDCT_SIMPLEARMV6
#define FF_PROFILE_AAC_LOW
#define FF_PROFILE_UNKNOWN
ITU-R BT2020 non-constant luminance system.
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
#define AV_CODEC_FLAG_PSNR
error[?] variables will be set during encoding.
#define AV_CODEC_FLAG_PASS1
Use internal 2pass ratecontrol in first pass mode.
#define FF_MB_DECISION_SIMPLE
uses mb_cmp
#define FF_THREAD_SLICE
Decode more than one part of a single frame at once.
#define FF_BUG_AC_VLC
Will be removed, libavcodec can now handle these non-compliant files by default.
#define AV_EF_EXPLODE
abort decoding on minor error detection
#define FF_BUG_QPEL_CHROMA
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
the normal 2^n-1 "JPEG" YUV ranges
#define AV_CODEC_DEFAULT_BITRATE
#define FF_PROFILE_DTS_96_24
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
#define CODEC_FLAG_NORMALIZE_AQP
Libavcodec external API header.
functionally identical to above
#define FF_IDCT_SIMPLENEON
#define AV_CODEC_FLAG2_FAST
Allow non spec compliant speedup tricks.
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE
#define AV_CODEC_FLAG2_LOCAL_HEADER
Place global headers at every keyframe instead of in extradata.
#define FF_DEFAULT_QUANT_BIAS
#define FF_PROFILE_AAC_SSR
#define AV_EF_CAREFUL
consider things that violate the spec, are fast to calculate and have not been seen in the wild as er...
#define FF_CODER_TYPE_VLC
#define FF_COMPLIANCE_NORMAL
#define FF_DEBUG_DCT_COEFF
#define FF_MB_DECISION_RD
rate distortion
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
#define AV_EF_IGNORE_ERR
ignore errors and continue
#define AV_EF_CRCCHECK
Verify checksums embedded in the bitstream (could be of either encoded or decoded data...
discard useless packets like 0 size packets in avi
#define FF_DEBUG_GREEN_MD
#define FF_COMPLIANCE_STRICT
Strictly conform to all the things in the spec no matter what consequences.
offset must point to two consecutive integers
#define FF_BUG_AUTODETECT
autodetection
#define AV_CODEC_FLAG_QPEL
Use qpel MC.
#define AV_CODEC_FLAG_GLOBAL_HEADER
Place global headers in extradata instead of every keyframe.
the normal 219*2^(n-8) "MPEG" YUV ranges
ITU-R BT2020 constant luminance system.
discard all non reference
#define FF_EC_FAVOR_INTER
#define CODEC_FLAG_EMU_EDGE
IEC 61966-2-1 (sRGB or sYCC)
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
#define AV_CODEC_FLAG2_NO_OUTPUT
Skip bitstream encoding.
#define FF_CODER_TYPE_RAW
#define FF_DEBUG_VIS_MV_P_FOR
#define FF_IDCT_SIMPLEMMX
ARIB STD-B67, known as "Hybrid log-gamma".
#define AV_CODEC_FLAG_PASS2
Use internal 2pass ratecontrol in second pass mode.
#define FF_DEBUG_STARTCODE
#define AV_CODEC_FLAG_OUTPUT_CORRUPT
Output even those frames that might be corrupted.
uneven multi-hexagon search
#define FF_CODER_TYPE_RLE
#define FF_QP2LAMBDA
factor to convert from H.263 QP to lambda
#define FF_PROFILE_AAC_HE
ITU-R BT2020 for 10-bit system.
#define AV_CODEC_FLAG2_EXPORT_MVS
Export motion vectors through frame side data.
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
#define AV_CODEC_FLAG_TRUNCATED
Input bitstream might be truncated at a random location instead of only at frame boundaries.
#define AV_CODEC_FLAG2_SHOW_ALL
Show all frames before the first keyframe.
#define FF_DEBUG_VIS_QP
only access through AVOptions from outside libavcodec
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
#define AV_CODEC_FLAG_CLOSED_GOP
#define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS
#define FF_PROFILE_DTS_HD_MA
"Logarithmic transfer characteristic (100:1 range)"