ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Mon Oct 23 15:11:42 2017 -0300| [b46613dd9b8b4adc68312a283486c33c109aab19] | committer: James Almer
Merge commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198' * commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198': lavc: Remove deprecated XvMC support hacks Merged-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b46613dd9b8b4adc68312a283486c33c109aab19 --- configure | 2 -- doc/codecs.texi | 2 -- libavcodec/allcodecs.c | 3 --- libavcodec/avcodec.h | 23 ----------------------- libavcodec/codec_desc.c | 9 --------- libavcodec/mpeg12dec.c | 43 ------------------------------------------- libavcodec/options_table.h | 3 --- libavcodec/version.h | 3 --- libavutil/pixdesc.c | 12 ------------ libavutil/pixfmt.h | 9 ++------- libavutil/version.h | 3 --- 11 files changed, 2 insertions(+), 110 deletions(-) diff --git a/configure b/configure index e487610c1a..2443986d21 100755 --- a/configure +++ b/configure @@ -2542,8 +2542,6 @@ mp3on4_decoder_select="mpegaudio" mp3on4float_decoder_select="mpegaudio" mpc7_decoder_select="bswapdsp mpegaudiodsp" mpc8_decoder_select="mpegaudiodsp" -mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" -mpeg_xvmc_decoder_select="mpeg2video_decoder" mpegvideo_decoder_select="mpegvideo" mpeg1video_decoder_select="mpegvideo" mpeg1video_encoder_select="aandcttables mpegvideoenc h263dsp" diff --git a/doc/codecs.texi b/doc/codecs.texi index 40f64fe4c8..6ab02c35de 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -757,8 +757,6 @@ Set context model. @item slice_flags @var{integer} -@item xvmc_acceleration @var{integer} - @item mbd @var{integer} (@emph{encoding,video}) Set macroblock decision algorithm (high quality mode). diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 60b66d46b9..dea1b1d13b 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -250,9 +250,6 @@ static void register_all(void) REGISTER_DECODER(MJPEGB, mjpegb); REGISTER_DECODER(MMVIDEO, mmvideo); REGISTER_DECODER(MOTIONPIXELS, motionpixels); -#if FF_API_XVMC - REGISTER_DECODER(MPEG_XVMC, mpeg_xvmc); -#endif /* FF_API_XVMC */ REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video); REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); REGISTER_ENCDEC (MPEG4, mpeg4); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c1090456f5..9d2127b21d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -217,9 +217,6 @@ enum AVCodecID { /* video codecs */ AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding -#if FF_API_XVMC - AV_CODEC_ID_MPEG2VIDEO_XVMC, -#endif /* FF_API_XVMC */ AV_CODEC_ID_H261, AV_CODEC_ID_H263, AV_CODEC_ID_RV10, @@ -1170,16 +1167,6 @@ typedef struct RcOverride{ */ #define CODEC_CAP_DR1 AV_CODEC_CAP_DR1 #define CODEC_CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED -#if FF_API_XVMC -/* Codec can export data for HW decoding. This flag indicates that - * the codec would call get_format() with list that might contain HW accelerated - * pixel formats (XvMC, VDPAU, VAAPI, etc). The application can pick any of them - * including raw image format. - * The application can use the passed context to determine bitstream version, - * chroma format, resolution etc. - */ -#define CODEC_CAP_HWACCEL 0x0010 -#endif /* FF_API_XVMC */ /** * Encoder or decoder requires flushing with NULL input at the end in order to * give the complete and correct output. @@ -2284,16 +2271,6 @@ typedef struct AVCodecContext { #define SLICE_FLAG_ALLOW_FIELD 0x0002 ///< allow draw_horiz_band() with field slices (MPEG-2 field pics) #define SLICE_FLAG_ALLOW_PLANE 0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1) -#if FF_API_XVMC - /** - * XVideo Motion Acceleration - * - encoding: forbidden - * - decoding: set by decoder - * @deprecated XvMC doesn't need it anymore. - */ - attribute_deprecated int xvmc_acceleration; -#endif /* FF_API_XVMC */ - /** * macroblock decision mode * - encoding: Set by user. diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 669d2458c9..92bf1d2681 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -46,15 +46,6 @@ static const AVCodecDescriptor codec_descriptors[] = { .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), }, -#if FF_API_XVMC - { - .id = AV_CODEC_ID_MPEG2VIDEO_XVMC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mpegvideo_xvmc", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video XvMC (X-Video Motion Compensation)"), - .props = AV_CODEC_PROP_LOSSY, - }, -#endif /* FF_API_XVMC */ { .id = AV_CODEC_ID_H261, .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 4e68be27f1..97885c0be8 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1224,11 +1224,6 @@ static void setup_hwaccel_for_pixfmt(AVCodecContext *avctx) MpegEncContext *s = &s1->mpeg_enc_ctx; s->pack_pblocks = 1; -#if FF_API_XVMC -FF_DISABLE_DEPRECATION_WARNINGS - avctx->xvmc_acceleration = 2; -FF_ENABLE_DEPRECATION_WARNINGS -#endif /* FF_API_XVMC */ } } @@ -2915,44 +2910,6 @@ AVCodec ff_mpegvideo_decoder = { .max_lowres = 3, }; -#if FF_API_XVMC -#if CONFIG_MPEG_XVMC_DECODER -FF_DISABLE_DEPRECATION_WARNINGS -static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) -{ - if (avctx->active_thread_type & FF_THREAD_SLICE) - return -1; - if (!(avctx->slice_flags & SLICE_FLAG_CODED_ORDER)) - return -1; - if (!(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { - ff_dlog(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n"); - } - mpeg_decode_init(avctx); - - avctx->pix_fmt = AV_PIX_FMT_XVMC_MPEG2_IDCT; - avctx->xvmc_acceleration = 2; // 2 - the blocks are packed! - - return 0; -} - -AVCodec ff_mpeg_xvmc_decoder = { - .name = "mpegvideo_xvmc", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video XvMC (X-Video Motion Compensation)"), - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_MPEG2VIDEO_XVMC, - .priv_data_size = sizeof(Mpeg1Context), - .init = mpeg_mc_decode_init, - .close = mpeg_decode_end, - .decode = mpeg_decode_frame, - .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL | - AV_CODEC_CAP_DELAY, - .flush = flush, -}; -FF_ENABLE_DEPRECATION_WARNINGS -#endif -#endif /* FF_API_XVMC */ - #if CONFIG_MPEG_VDPAU_DECODER && FF_API_VDPAU AVCodec ff_mpeg_vdpau_decoder = { .name = "mpegvideo_vdpau", diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index c40b3e61b4..6e90c0d77c 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -329,9 +329,6 @@ static const AVOption avcodec_options[] = { {"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, #endif {"slice_flags", NULL, OFFSET(slice_flags), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -#if FF_API_XVMC -{"xvmc_acceleration", NULL, OFFSET(xvmc_acceleration), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, -#endif /* FF_API_XVMC */ {"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 2, V|E, "mbd"}, {"simple", "use mbcmp", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"}, {"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"}, diff --git a/libavcodec/version.h b/libavcodec/version.h index 2d85e25a26..3c9356d8ce 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -57,9 +57,6 @@ #ifndef FF_API_DEBUG_MV #define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58) #endif -#ifndef FF_API_XVMC -#define FF_API_XVMC (LIBAVCODEC_VERSION_MAJOR < 58) -#endif #ifndef FF_API_ERROR_RATE #define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58) #endif diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index a428d63066..81b763b961 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -326,22 +326,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, -#if FF_API_XVMC - [AV_PIX_FMT_XVMC_MPEG2_MC] = { - .name = "xvmcmc", - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, - [AV_PIX_FMT_XVMC_MPEG2_IDCT] = { - .name = "xvmcidct", - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, -#endif /* FF_API_XVMC */ -#if !FF_API_XVMC [AV_PIX_FMT_XVMC] = { .name = "xvmc", .flags = AV_PIX_FMT_FLAG_HWACCEL, }, -#endif /* !FF_API_XVMC */ [AV_PIX_FMT_UYVY422] = { .name = "uyvy422", .nb_components = 3, diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index f54f5549b6..6b6b4ae0fb 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -74,11 +74,6 @@ enum AVPixelFormat { AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range AV_PIX_FMT_YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range AV_PIX_FMT_YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range -#if FF_API_XVMC - AV_PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing - AV_PIX_FMT_XVMC_MPEG2_IDCT, - AV_PIX_FMT_XVMC = AV_PIX_FMT_XVMC_MPEG2_IDCT, -#endif /* FF_API_XVMC */ AV_PIX_FMT_UYVY422, ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1 AV_PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3 AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) @@ -280,9 +275,9 @@ enum AVPixelFormat { AV_PIX_FMT_BAYER_GBRG16BE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian */ AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian */ AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian */ -#if !FF_API_XVMC + AV_PIX_FMT_XVMC,///< XVideo Motion Acceleration via common packet passing -#endif /* !FF_API_XVMC */ + AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian diff --git a/libavutil/version.h b/libavutil/version.h index aa56ad2fbd..f5b4f1548d 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -109,9 +109,6 @@ #ifndef FF_API_VDPAU #define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 56) #endif -#ifndef FF_API_XVMC -#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 56) -#endif #ifndef FF_API_OPT_TYPE_METADATA #define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 56) #endif ====================================================================== diff --cc configure index e487610c1a,366520cf96..2443986d21 --- a/configure +++ b/configure @@@ -2542,13 -2073,10 +2542,11 @@@ mp3on4_decoder_select="mpegaudio mp3on4float_decoder_select="mpegaudio" mpc7_decoder_select="bswapdsp mpegaudiodsp" mpc8_decoder_select="mpegaudiodsp" - mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" - mpeg_xvmc_decoder_select="mpeg2video_decoder" -mpeg1video_decoder_select="error_resilience mpeg_er mpegvideo" -mpeg1video_encoder_select="aandcttables mpegvideoenc" -mpeg2video_decoder_select="error_resilience mpeg_er mpegvideo" -mpeg2video_encoder_select="aandcttables mpegvideoenc" +mpegvideo_decoder_select="mpegvideo" +mpeg1video_decoder_select="mpegvideo" +mpeg1video_encoder_select="aandcttables mpegvideoenc h263dsp" +mpeg2video_decoder_select="mpegvideo" +mpeg2video_encoder_select="aandcttables mpegvideoenc h263dsp" mpeg4_decoder_select="h263_decoder mpeg4video_parser" mpeg4_encoder_select="h263_encoder" msa1_decoder_select="mss34dsp" diff --cc doc/codecs.texi index 40f64fe4c8,0000000000..6ab02c35de mode 100644,000000..100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@@ -1,1301 -1,0 +1,1299 @@@ +@anchor{codec-options} +@chapter Codec Options +@c man begin CODEC OPTIONS + +libavcodec provides some generic global options, which can be set on +all the encoders and decoders. In addition each codec may support +so-called private options, which are specific for a given codec. + +Sometimes, a global option may only affect a specific kind of codec, +and may be nonsensical or ignored by another, so you need to be aware +of the meaning of the specified options. Also some options are +meant only for decoding or encoding. + +Options may be set by specifying -@var{option} @var{value} in the +FFmpeg tools, or by setting the value explicitly in the +@code{AVCodecContext} options or using the @file{libavutil/opt.h} API +for programmatic use. + +The list of supported options follow: + +@table @option +@item b @var{integer} (@emph{encoding,audio,video}) +Set bitrate in bits/s. Default value is 200K. + +@item ab @var{integer} (@emph{encoding,audio}) +Set audio bitrate (in bits/s). Default value is 128K. + +@item bt @var{integer} (@emph{encoding,video}) +Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate +tolerance specifies how far ratecontrol is willing to deviate from the +target average bitrate value. This is not related to min/max +bitrate. Lowering tolerance too much has an adverse effect on quality. + +@item flags @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) +Set generic flags. + +Possible values: +@table @samp +@item mv4 +Use four motion vector by macroblock (mpeg4). +@item qpel +Use 1/4 pel motion compensation. +@item loop +Use loop filter. +@item qscale +Use fixed qscale. +@item gmc +Use gmc. +@item mv0 +Always try a mb with mv=<0,0>. +@item input_preserved + +@item pass1 +Use internal 2pass ratecontrol in first pass mode. +@item pass2 +Use internal 2pass ratecontrol in second pass mode. +@item gray +Only decode/encode grayscale. +@item emu_edge +Do not draw edges. +@item psnr +Set error[?] variables during encoding. +@item truncated + +@item naq +Normalize adaptive quantization. +@item ildct +Use interlaced DCT. +@item low_delay +Force low delay. +@item global_header +Place global headers in extradata instead of every keyframe. +@item bitexact +Only write platform-, build- and time-independent data. (except (I)DCT). +This ensures that file and data checksums are reproducible and match between +platforms. Its primary use is for regression testing. +@item aic +Apply H263 advanced intra coding / mpeg4 ac prediction. +@item cbp +Deprecated, use mpegvideo private options instead. +@item qprd +Deprecated, use mpegvideo private options instead. +@item ilme +Apply interlaced motion estimation. +@item cgop +Use closed gop. +@end table + +@item me_method @var{integer} (@emph{encoding,video}) +Set motion estimation method. + +Possible values: +@table @samp +@item zero +zero motion estimation (fastest) +@item full +full motion estimation (slowest) +@item epzs +EPZS motion estimation (default) +@item esa +esa motion estimation (alias for full) +@item tesa +tesa motion estimation +@item dia +dia motion estimation (alias for epzs) +@item log +log motion estimation +@item phods +phods motion estimation +@item x1 +X1 motion estimation +@item hex +hex motion estimation +@item umh +umh motion estimation +@item iter +iter motion estimation +@end table + +@item extradata_size @var{integer} +Set extradata size. + +@item time_base @var{rational number} +Set codec time base. + +It is the fundamental unit of time (in seconds) in terms of which +frame timestamps are represented. For fixed-fps content, timebase +should be @code{1 / frame_rate} and timestamp increments should be +identically 1. + +@item g @var{integer} (@emph{encoding,video}) +Set the group of picture (GOP) size. Default value is 12. + +@item ar @var{integer} (@emph{decoding/encoding,audio}) +Set audio sampling rate (in Hz). + +@item ac @var{integer} (@emph{decoding/encoding,audio}) +Set number of audio channels. + +@item cutoff @var{integer} (@emph{encoding,audio}) +Set cutoff bandwidth. (Supported only by selected encoders, see +their respective documentation sections.) + +@item frame_size @var{integer} (@emph{encoding,audio}) +Set audio frame size. + +Each submitted frame except the last must contain exactly frame_size +samples per channel. May be 0 when the codec has +CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not +restricted. It is set by some decoders to indicate constant frame +size. + +@item frame_number @var{integer} +Set the frame number. + +@item delay @var{integer} + +@item qcomp @var{float} (@emph{encoding,video}) +Set video quantizer scale compression (VBR). It is used as a constant +in the ratecontrol equation. Recommended range for default rc_eq: +0.0-1.0. + +@item qblur @var{float} (@emph{encoding,video}) +Set video quantizer scale blur (VBR). + +@item qmin @var{integer} (@emph{encoding,video}) +Set min video quantizer scale (VBR). Must be included between -1 and +69, default value is 2. + +@item qmax @var{integer} (@emph{encoding,video}) +Set max video quantizer scale (VBR). Must be included between -1 and +1024, default value is 31. + +@item qdiff @var{integer} (@emph{encoding,video}) +Set max difference between the quantizer scale (VBR). + +@item bf @var{integer} (@emph{encoding,video}) +Set max number of B frames between non-B-frames. + +Must be an integer between -1 and 16. 0 means that B-frames are +disabled. If a value of -1 is used, it will choose an automatic value +depending on the encoder. + +Default value is 0. + +@item b_qfactor @var{float} (@emph{encoding,video}) +Set qp factor between P and B frames. + +@item rc_strategy @var{integer} (@emph{encoding,video}) +Set ratecontrol method. + +@item b_strategy @var{integer} (@emph{encoding,video}) +Set strategy to choose between I/P/B-frames. + +@item ps @var{integer} (@emph{encoding,video}) +Set RTP payload size in bytes. + +@item mv_bits @var{integer} +@item header_bits @var{integer} +@item i_tex_bits @var{integer} +@item p_tex_bits @var{integer} +@item i_count @var{integer} +@item p_count @var{integer} +@item skip_count @var{integer} +@item misc_bits @var{integer} +@item frame_bits @var{integer} +@item codec_tag @var{integer} +@item bug @var{flags} (@emph{decoding,video}) +Workaround not auto detected encoder bugs. + +Possible values: +@table @samp +@item autodetect + +@item old_msmpeg4 +some old lavc generated msmpeg4v3 files (no autodetection) +@item xvid_ilace +Xvid interlacing bug (autodetected if fourcc==XVIX) +@item ump4 +(autodetected if fourcc==UMP4) +@item no_padding +padding bug (autodetected) +@item amv + +@item ac_vlc +illegal vlc bug (autodetected per fourcc) +@item qpel_chroma + +@item std_qpel +old standard qpel (autodetected per fourcc/version) +@item qpel_chroma2 + +@item direct_blocksize +direct-qpel-blocksize bug (autodetected per fourcc/version) +@item edge +edge padding bug (autodetected per fourcc/version) +@item hpel_chroma + +@item dc_clip + +@item ms +Workaround various bugs in microsoft broken decoders. +@item trunc +trancated frames +@end table + +@item lelim @var{integer} (@emph{encoding,video}) +Set single coefficient elimination threshold for luminance (negative +values also consider DC coefficient). + +@item celim @var{integer} (@emph{encoding,video}) +Set single coefficient elimination threshold for chrominance (negative +values also consider dc coefficient) + +@item strict @var{integer} (@emph{decoding/encoding,audio,video}) +Specify how strictly to follow the standards. + +Possible values: +@table @samp +@item very +strictly conform to an older more strict version of the spec or reference software +@item strict +strictly conform to all the things in the spec no matter what consequences +@item normal + +@item unofficial +allow unofficial extensions +@item experimental +allow non standardized experimental things, experimental +(unfinished/work in progress/not well tested) decoders and encoders. +Note: experimental decoders can pose a security risk, do not use this for +decoding untrusted input. +@end table + +@item b_qoffset @var{float} (@emph{encoding,video}) +Set QP offset between P and B frames. + +@item err_detect @var{flags} (@emph{decoding,audio,video}) +Set error detection flags. + +Possible values: +@table @samp +@item crccheck +verify embedded CRCs +@item bitstream +detect bitstream specification deviations +@item buffer +detect improper bitstream length +@item explode +abort decoding on minor error detection +@item ignore_err +ignore decoding errors, and continue decoding. +This is useful if you want to analyze the content of a video and thus want +everything to be decoded no matter what. This option will not result in a video +that is pleasing to watch in case of errors. +@item careful +consider things that violate the spec and have not been seen in the wild as errors +@item compliant +consider all spec non compliancies as errors +@item aggressive +consider things that a sane encoder should not do as an error +@end table + +@item has_b_frames @var{integer} + +@item block_align @var{integer} + +@item mpeg_quant @var{integer} (@emph{encoding,video}) +Use MPEG quantizers instead of H.263. + +@item qsquish @var{float} (@emph{encoding,video}) +How to keep quantizer between qmin and qmax (0 = clip, 1 = use +differentiable function). + +@item rc_qmod_amp @var{float} (@emph{encoding,video}) +Set experimental quantizer modulation. + +@item rc_qmod_freq @var{integer} (@emph{encoding,video}) +Set experimental quantizer modulation. + +@item rc_override_count @var{integer} + +@item rc_eq @var{string} (@emph{encoding,video}) +Set rate control equation. When computing the expression, besides the +standard functions defined in the section 'Expression Evaluation', the +following functions are available: bits2qp(bits), qp2bits(qp). Also +the following constants are available: iTex pTex tex mv fCode iCount +mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex +avgTex. + +@item maxrate @var{integer} (@emph{encoding,audio,video}) +Set max bitrate tolerance (in bits/s). Requires bufsize to be set. + +@item minrate @var{integer} (@emph{encoding,audio,video}) +Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR +encode. It is of little use elsewise. + +@item bufsize @var{integer} (@emph{encoding,audio,video}) +Set ratecontrol buffer size (in bits). + +@item rc_buf_aggressivity @var{float} (@emph{encoding,video}) +Currently useless. + +@item i_qfactor @var{float} (@emph{encoding,video}) +Set QP factor between P and I frames. + +@item i_qoffset @var{float} (@emph{encoding,video}) +Set QP offset between P and I frames. + +@item rc_init_cplx @var{float} (@emph{encoding,video}) +Set initial complexity for 1-pass encoding. + +@item dct @var{integer} (@emph{encoding,video}) +Set DCT algorithm. + +Possible values: +@table @samp +@item auto +autoselect a good one (default) +@item fastint +fast integer +@item int +accurate integer +@item mmx + +@item altivec + +@item faan +floating point AAN DCT +@end table + +@item lumi_mask @var{float} (@emph{encoding,video}) +Compress bright areas stronger than medium ones. + +@item tcplx_mask @var{float} (@emph{encoding,video}) +Set temporal complexity masking. + +@item scplx_mask @var{float} (@emph{encoding,video}) +Set spatial complexity masking. + +@item p_mask @var{float} (@emph{encoding,video}) +Set inter masking. + +@item dark_mask @var{float} (@emph{encoding,video}) +Compress dark areas stronger than medium ones. + +@item idct @var{integer} (@emph{decoding/encoding,video}) +Select IDCT implementation. + +Possible values: +@table @samp +@item auto + +@item int + +@item simple + +@item simplemmx + +@item simpleauto +Automatically pick a IDCT compatible with the simple one + +@item arm + +@item altivec + +@item sh4 + +@item simplearm + +@item simplearmv5te + +@item simplearmv6 + +@item simpleneon + +@item simplealpha + +@item ipp + +@item xvidmmx + +@item faani +floating point AAN IDCT +@end table + +@item slice_count @var{integer} + +@item ec @var{flags} (@emph{decoding,video}) +Set error concealment strategy. + +Possible values: +@table @samp +@item guess_mvs +iterative motion vector (MV) search (slow) +@item deblock +use strong deblock filter for damaged MBs +@item favor_inter +favor predicting from the previous frame instead of the current +@end table + +@item bits_per_coded_sample @var{integer} + +@item pred @var{integer} (@emph{encoding,video}) +Set prediction method. + +Possible values: +@table @samp +@item left + +@item plane + +@item median + +@end table + +@item aspect @var{rational number} (@emph{encoding,video}) +Set sample aspect ratio. + +@item sar @var{rational number} (@emph{encoding,video}) +Set sample aspect ratio. Alias to @var{aspect}. + +@item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) +Print specific debug info. + +Possible values: +@table @samp +@item pict +picture info +@item rc +rate control +@item bitstream + +@item mb_type +macroblock (MB) type +@item qp +per-block quantization parameter (QP) +@item mv +motion vector +@item dct_coeff + +@item green_metadata +display complexity metadata for the upcoming frame, GoP or for a given duration. + +@item skip + +@item startcode + +@item pts + +@item er +error recognition +@item mmco +memory management control operations (H.264) +@item bugs + +@item vis_qp +visualize quantization parameter (QP), lower QP are tinted greener +@item vis_mb_type +visualize block types +@item buffers +picture buffer allocations +@item thread_ops +threading operations +@item nomc +skip motion compensation +@end table + +@item vismv @var{integer} (@emph{decoding,video}) +Visualize motion vectors (MVs). + +This option is deprecated, see the codecview filter instead. + +Possible values: +@table @samp +@item pf +forward predicted MVs of P-frames +@item bf +forward predicted MVs of B-frames +@item bb +backward predicted MVs of B-frames +@end table + +@item cmp @var{integer} (@emph{encoding,video}) +Set full pel me compare function. + +Possible values: +@table @samp +@item sad +sum of absolute differences, fast (default) +@item sse +sum of squared errors +@item satd +sum of absolute Hadamard transformed differences +@item dct +sum of absolute DCT transformed differences +@item psnr +sum of squared quantization errors (avoid, low quality) +@item bit +number of bits needed for the block +@item rd +rate distortion optimal, slow +@item zero +0 +@item vsad +sum of absolute vertical differences +@item vsse +sum of squared vertical differences +@item nsse +noise preserving sum of squared differences +@item w53 +5/3 wavelet, only used in snow +@item w97 +9/7 wavelet, only used in snow +@item dctmax + +@item chroma + +@end table + +@item subcmp @var{integer} (@emph{encoding,video}) +Set sub pel me compare function. + +Possible values: +@table @samp +@item sad +sum of absolute differences, fast (default) +@item sse +sum of squared errors +@item satd +sum of absolute Hadamard transformed differences +@item dct +sum of absolute DCT transformed differences +@item psnr +sum of squared quantization errors (avoid, low quality) +@item bit +number of bits needed for the block +@item rd +rate distortion optimal, slow +@item zero +0 +@item vsad +sum of absolute vertical differences +@item vsse +sum of squared vertical differences +@item nsse +noise preserving sum of squared differences +@item w53 +5/3 wavelet, only used in snow +@item w97 +9/7 wavelet, only used in snow +@item dctmax + +@item chroma + +@end table + +@item mbcmp @var{integer} (@emph{encoding,video}) +Set macroblock compare function. + +Possible values: +@table @samp +@item sad +sum of absolute differences, fast (default) +@item sse +sum of squared errors +@item satd +sum of absolute Hadamard transformed differences +@item dct +sum of absolute DCT transformed differences +@item psnr +sum of squared quantization errors (avoid, low quality) +@item bit +number of bits needed for the block +@item rd +rate distortion optimal, slow +@item zero +0 +@item vsad +sum of absolute vertical differences +@item vsse +sum of squared vertical differences +@item nsse +noise preserving sum of squared differences +@item w53 +5/3 wavelet, only used in snow +@item w97 +9/7 wavelet, only used in snow +@item dctmax + +@item chroma + +@end table + +@item ildctcmp @var{integer} (@emph{encoding,video}) +Set interlaced dct compare function. + +Possible values: +@table @samp +@item sad +sum of absolute differences, fast (default) +@item sse +sum of squared errors +@item satd +sum of absolute Hadamard transformed differences +@item dct +sum of absolute DCT transformed differences +@item psnr +sum of squared quantization errors (avoid, low quality) +@item bit +number of bits needed for the block +@item rd +rate distortion optimal, slow +@item zero +0 +@item vsad +sum of absolute vertical differences +@item vsse +sum of squared vertical differences +@item nsse +noise preserving sum of squared differences +@item w53 +5/3 wavelet, only used in snow +@item w97 +9/7 wavelet, only used in snow +@item dctmax + +@item chroma + +@end table + +@item dia_size @var{integer} (@emph{encoding,video}) +Set diamond type & size for motion estimation. + +@item last_pred @var{integer} (@emph{encoding,video}) +Set amount of motion predictors from the previous frame. + +@item preme @var{integer} (@emph{encoding,video}) +Set pre motion estimation. + +@item precmp @var{integer} (@emph{encoding,video}) +Set pre motion estimation compare function. + +Possible values: +@table @samp +@item sad +sum of absolute differences, fast (default) +@item sse +sum of squared errors +@item satd +sum of absolute Hadamard transformed differences +@item dct +sum of absolute DCT transformed differences +@item psnr +sum of squared quantization errors (avoid, low quality) +@item bit +number of bits needed for the block +@item rd +rate distortion optimal, slow +@item zero +0 +@item vsad +sum of absolute vertical differences +@item vsse +sum of squared vertical differences +@item nsse +noise preserving sum of squared differences +@item w53 +5/3 wavelet, only used in snow +@item w97 +9/7 wavelet, only used in snow +@item dctmax + +@item chroma + +@end table + +@item pre_dia_size @var{integer} (@emph{encoding,video}) +Set diamond type & size for motion estimation pre-pass. + +@item subq @var{integer} (@emph{encoding,video}) +Set sub pel motion estimation quality. + +@item dtg_active_format @var{integer} + +@item me_range @var{integer} (@emph{encoding,video}) +Set limit motion vectors range (1023 for DivX player). + +@item ibias @var{integer} (@emph{encoding,video}) +Set intra quant bias. + +@item pbias @var{integer} (@emph{encoding,video}) +Set inter quant bias. + +@item color_table_id @var{integer} + +@item global_quality @var{integer} (@emph{encoding,audio,video}) + +@item coder @var{integer} (@emph{encoding,video}) + +Possible values: +@table @samp +@item vlc +variable length coder / huffman coder +@item ac +arithmetic coder +@item raw +raw (no encoding) +@item rle +run-length coder +@item deflate +deflate-based coder +@end table + +@item context @var{integer} (@emph{encoding,video}) +Set context model. + +@item slice_flags @var{integer} + - @item xvmc_acceleration @var{integer} - +@item mbd @var{integer} (@emph{encoding,video}) +Set macroblock decision algorithm (high quality mode). + +Possible values: +@table @samp +@item simple +use mbcmp (default) +@item bits +use fewest bits +@item rd +use best rate distortion +@end table + +@item stream_codec_tag @var{integer} + +@item sc_threshold @var{integer} (@emph{encoding,video}) +Set scene change threshold. + +@item lmin @var{integer} (@emph{encoding,video}) +Set min lagrange factor (VBR). + +@item lmax @var{integer} (@emph{encoding,video}) +Set max lagrange factor (VBR). + +@item nr @var{integer} (@emph{encoding,video}) +Set noise reduction. + +@item rc_init_occupancy @var{integer} (@emph{encoding,video}) +Set number of bits which should be loaded into the rc buffer before +decoding starts. + +@item flags2 @var{flags} (@emph{decoding/encoding,audio,video}) + +Possible values: +@table @samp +@item fast +Allow non spec compliant speedup tricks. +@item sgop +Deprecated, use mpegvideo private options instead. +@item noout +Skip bitstream encoding. +@item ignorecrop +Ignore cropping information from sps. +@item local_header +Place global headers at every keyframe instead of in extradata. +@item chunks +Frame data might be split into multiple chunks. +@item showall +Show all frames before the first keyframe. +@item skiprd +Deprecated, use mpegvideo private options instead. +@item export_mvs +Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS}) +for codecs that support it. See also @file{doc/examples/export_mvs.c}. +@end table + +@item error @var{integer} (@emph{encoding,video}) + +@item qns @var{integer} (@emph{encoding,video}) +Deprecated, use mpegvideo private options instead. + +@item threads @var{integer} (@emph{decoding/encoding,video}) +Set the number of threads to be used, in case the selected codec +implementation supports multi-threading. + +Possible values: +@table @samp +@item auto, 0 +automatically select the number of threads to set +@end table + +Default value is @samp{auto}. + +@item me_threshold @var{integer} (@emph{encoding,video}) +Set motion estimation threshold. + +@item mb_threshold @var{integer} (@emph{encoding,video}) +Set macroblock threshold. + +@item dc @var{integer} (@emph{encoding,video}) +Set intra_dc_precision. + +@item nssew @var{integer} (@emph{encoding,video}) +Set nsse weight. + +@item skip_top @var{integer} (@emph{decoding,video}) +Set number of macroblock rows at the top which are skipped. + +@item skip_bottom @var{integer} (@emph{decoding,video}) +Set number of macroblock rows at the bottom which are skipped. + +@item profile @var{integer} (@emph{encoding,audio,video}) + +Possible values: +@table @samp +@item unknown + +@item aac_main + +@item aac_low + +@item aac_ssr + +@item aac_ltp + +@item aac_he + +@item aac_he_v2 + +@item aac_ld + +@item aac_eld + +@item mpeg2_aac_low + +@item mpeg2_aac_he + +@item mpeg4_sp + +@item mpeg4_core + +@item mpeg4_main + +@item mpeg4_asp + +@item dts + +@item dts_es + +@item dts_96_24 + +@item dts_hd_hra + +@item dts_hd_ma + +@end table + +@item level @var{integer} (@emph{encoding,audio,video}) + +Possible values: +@table @samp +@item unknown + +@end table + +@item lowres @var{integer} (@emph{decoding,audio,video}) +Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions. + +@item skip_threshold @var{integer} (@emph{encoding,video}) +Set frame skip threshold. + +@item skip_factor @var{integer} (@emph{encoding,video}) +Set frame skip factor. + +@item skip_exp @var{integer} (@emph{encoding,video}) +Set frame skip exponent. +Negative values behave identical to the corresponding positive ones, except +that the score is normalized. +Positive values exist primarily for compatibility reasons and are not so useful. + +@item skipcmp @var{integer} (@emph{encoding,video}) +Set frame skip compare function. + +Possible values: +@table @samp +@item sad +sum of absolute differences, fast (default) +@item sse +sum of squared errors +@item satd +sum of absolute Hadamard transformed differences +@item dct +sum of absolute DCT transformed differences +@item psnr +sum of squared quantization errors (avoid, low quality) +@item bit +number of bits needed for the block +@item rd +rate distortion optimal, slow +@item zero +0 +@item vsad +sum of absolute vertical differences +@item vsse +sum of squared vertical differences +@item nsse +noise preserving sum of squared differences +@item w53 +5/3 wavelet, only used in snow +@item w97 +9/7 wavelet, only used in snow +@item dctmax + +@item chroma + +@end table + +@item border_mask @var{float} (@emph{encoding,video}) +Increase the quantizer for macroblocks close to borders. + +@item mblmin @var{integer} (@emph{encoding,video}) +Set min macroblock lagrange factor (VBR). + +@item mblmax @var{integer} (@emph{encoding,video}) +Set max macroblock lagrange factor (VBR). + +@item mepc @var{integer} (@emph{encoding,video}) +Set motion estimation bitrate penalty compensation (1.0 = 256). + +@item skip_loop_filter @var{integer} (@emph{decoding,video}) +@item skip_idct @var{integer} (@emph{decoding,video}) +@item skip_frame @var{integer} (@emph{decoding,video}) + +Make decoder discard processing depending on the frame type selected +by the option value. + +@option{skip_loop_filter} skips frame loop filtering, @option{skip_idct} +skips frame IDCT/dequantization, @option{skip_frame} skips decoding. + +Possible values: +@table @samp +@item none +Discard no frame. + +@item default +Discard useless frames like 0-sized frames. + +@item noref +Discard all non-reference frames. + +@item bidir +Discard all bidirectional frames. + +@item nokey +Discard all frames excepts keyframes. + +@item all +Discard all frames. +@end table + +Default value is @samp{default}. + +@item bidir_refine @var{integer} (@emph{encoding,video}) +Refine the two motion vectors used in bidirectional macroblocks. + +@item brd_scale @var{integer} (@emph{encoding,video}) +Downscale frames for dynamic B-frame decision. + +@item keyint_min @var{integer} (@emph{encoding,video}) +Set minimum interval between IDR-frames. + +@item refs @var{integer} (@emph{encoding,video}) +Set reference frames to consider for motion compensation. + +@item chromaoffset @var{integer} (@emph{encoding,video}) +Set chroma qp offset from luma. + +@item trellis @var{integer} (@emph{encoding,audio,video}) +Set rate-distortion optimal quantization. + +@item sc_factor @var{integer} (@emph{encoding,video}) +Set value multiplied by qscale for each frame and added to +scene_change_score. + +@item mv0_threshold @var{integer} (@emph{encoding,video}) +@item b_sensitivity @var{integer} (@emph{encoding,video}) +Adjust sensitivity of b_frame_strategy 1. + +@item compression_level @var{integer} (@emph{encoding,audio,video}) +@item min_prediction_order @var{integer} (@emph{encoding,audio}) +@item max_prediction_order @var{integer} (@emph{encoding,audio}) +@item timecode_frame_start @var{integer} (@emph{encoding,video}) +Set GOP timecode frame start number, in non drop frame format. + +@item request_channels @var{integer} (@emph{decoding,audio}) +Set desired number of audio channels. + +@item bits_per_raw_sample @var{integer} +@item channel_layout @var{integer} (@emph{decoding/encoding,audio}) + +Possible values: +@table @samp +@end table +@item request_channel_layout @var{integer} (@emph{decoding,audio}) + +Possible values: +@table @samp +@end table +@item rc_max_vbv_use @var{float} (@emph{encoding,video}) +@item rc_min_vbv_use @var{float} (@emph{encoding,video}) +@item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video}) + +@item color_primaries @var{integer} (@emph{decoding/encoding,video}) +Possible values: +@table @samp +@item bt709 +BT.709 +@item bt470m +BT.470 M +@item bt470bg +BT.470 BG +@item smpte170m +SMPTE 170 M +@item smpte240m +SMPTE 240 M +@item film +Film +@item bt2020 +BT.2020 +@item smpte428 +@item smpte428_1 +SMPTE ST 428-1 +@item smpte431 +SMPTE 431-2 +@item smpte432 +SMPTE 432-1 +@item jedec-p22 +JEDEC P22 +@end table + +@item color_trc @var{integer} (@emph{decoding/encoding,video}) +Possible values: +@table @samp +@item bt709 +BT.709 +@item gamma22 +BT.470 M +@item gamma28 +BT.470 BG +@item smpte170m +SMPTE 170 M +@item smpte240m +SMPTE 240 M +@item linear +Linear +@item log +@item log100 +Log +@item log_sqrt +@item log316 +Log square root +@item iec61966_2_4 +@item iec61966-2-4 +IEC 61966-2-4 +@item bt1361 +@item bt1361e +BT.1361 +@item iec61966_2_1 +@item iec61966-2-1 +IEC 61966-2-1 +@item bt2020_10 +@item bt2020_10bit +BT.2020 - 10 bit +@item bt2020_12 +@item bt2020_12bit +BT.2020 - 12 bit +@item smpte2084 +SMPTE ST 2084 +@item smpte428 +@item smpte428_1 +SMPTE ST 428-1 +@item arib-std-b67 +ARIB STD-B67 +@end table + +@item colorspace @var{integer} (@emph{decoding/encoding,video}) +Possible values: +@table @samp +@item rgb +RGB +@item bt709 +BT.709 +@item fcc +FCC +@item bt470bg +BT.470 BG +@item smpte170m +SMPTE 170 M +@item smpte240m +SMPTE 240 M +@item ycocg +YCOCG +@item bt2020nc +@item bt2020_ncl +BT.2020 NCL +@item bt2020c +@item bt2020_cl +BT.2020 CL +@item smpte2085 +SMPTE 2085 +@end table + +@item color_range @var{integer} (@emph{decoding/encoding,video}) +If used as input parameter, it serves as a hint to the decoder, which +color_range the input has. +Possible values: +@table @samp +@item tv +@item mpeg +MPEG (219*2^(n-8)) +@item pc +@item jpeg +JPEG (2^n-1) +@end table + +@item chroma_sample_location @var{integer} (@emph{decoding/encoding,video}) +Possible values: +@table @samp +@item left + +@item center + +@item topleft + +@item top + +@item bottomleft + +@item bottom + +@end table + +@item log_level_offset @var{integer} +Set the log level offset. + +@item slices @var{integer} (@emph{encoding,video}) +Number of slices, used in parallelized encoding. + +@item thread_type @var{flags} (@emph{decoding/encoding,video}) +Select which multithreading methods to use. + +Use of @samp{frame} will increase decoding delay by one frame per +thread, so clients which cannot provide future frames should not use +it. + +Possible values: +@table @samp +@item slice +Decode more than one part of a single frame at once. + +Multithreading using slices works only when the video was encoded with +slices. + +@item frame +Decode more than one frame at once. +@end table + +Default value is @samp{slice+frame}. + +@item audio_service_type @var{integer} (@emph{encoding,audio}) +Set audio service type. + +Possible values: +@table @samp +@item ma +Main Audio Service +@item ef +Effects +@item vi +Visually Impaired +@item hi +Hearing Impaired +@item di +Dialogue +@item co +Commentary +@item em +Emergency +@item vo +Voice Over +@item ka +Karaoke +@end table + +@item request_sample_fmt @var{sample_fmt} (@emph{decoding,audio}) +Set sample format audio decoders should prefer. Default value is +@code{none}. + +@item pkt_timebase @var{rational number} + +@item sub_charenc @var{encoding} (@emph{decoding,subtitles}) +Set the input subtitles character encoding. + +@item field_order @var{field_order} (@emph{video}) +Set/override the field order of the video. +Possible values: +@table @samp +@item progressive +Progressive video +@item tt +Interlaced video, top field coded and displayed first +@item bb +Interlaced video, bottom field coded and displayed first +@item tb +Interlaced video, top coded first, bottom displayed first +@item bt +Interlaced video, bottom coded first, top displayed first +@end table + +@item skip_alpha @var{bool} (@emph{decoding,video}) +Set to 1 to disable processing alpha (transparency). This works like the +@samp{gray} flag in the @option{flags} option which skips chroma information +instead of alpha. Default is 0. + +@item codec_whitelist @var{list} (@emph{input}) +"," separated list of allowed decoders. By default all are allowed. + +@item dump_separator @var{string} (@emph{input}) +Separator used to separate the fields printed on the command line about the +Stream parameters. +For example to separate the fields with newlines and indention: +@example +ffprobe -dump_separator " + " -i ~/videos/matrixbench_mpeg2.mpg +@end example + +@item max_pixels @var{integer} (@emph{decoding/encoding,video}) +Maximum number of pixels per image. This value can be used to avoid out of +memory failures due to large images. + +@item apply_cropping @var{bool} (@emph{decoding,video}) +Enable cropping if cropping parameters are multiples of the required +alignment for the left and top parameters. If the alignment is not met the +cropping will be partially applied to maintain alignment. +Default is 1 (enabled). +Note: The required alignment depends on if @code{AV_CODEC_FLAG_UNALIGNED} is set and the +CPU. @code{AV_CODEC_FLAG_UNALIGNED} cannot be changed from the command line. Also hardware +decoders will not apply left/top Cropping. + + +@end table + +@c man end CODEC OPTIONS + +@ifclear config-writeonly +@include decoders.texi +@end ifclear +@ifclear config-readonly +@include encoders.texi +@end ifclear diff --cc libavcodec/allcodecs.c index 60b66d46b9,556bdb43f3..dea1b1d13b --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@@ -250,31 -203,12 +250,28 @@@ static void register_all(void REGISTER_DECODER(MJPEGB, mjpegb); REGISTER_DECODER(MMVIDEO, mmvideo); REGISTER_DECODER(MOTIONPIXELS, motionpixels); - #if FF_API_XVMC - REGISTER_DECODER(MPEG_XVMC, mpeg_xvmc); - #endif /* FF_API_XVMC */ REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video); REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); + REGISTER_ENCDEC (MPEG4, mpeg4); + REGISTER_DECODER(MPEG4_CRYSTALHD, mpeg4_crystalhd); + REGISTER_DECODER(MPEG4_V4L2M2M, mpeg4_v4l2m2m); + REGISTER_DECODER(MPEG4_MMAL, mpeg4_mmal); +#if FF_API_VDPAU + REGISTER_DECODER(MPEG4_VDPAU, mpeg4_vdpau); +#endif + REGISTER_DECODER(MPEGVIDEO, mpegvideo); +#if FF_API_VDPAU + REGISTER_DECODER(MPEG_VDPAU, mpeg_vdpau); + REGISTER_DECODER(MPEG1_VDPAU, mpeg1_vdpau); +#endif + REGISTER_DECODER(MPEG1_V4L2M2M, mpeg1_v4l2m2m); REGISTER_DECODER(MPEG2_MMAL, mpeg2_mmal); + REGISTER_DECODER(MPEG2_CRYSTALHD, mpeg2_crystalhd); + REGISTER_DECODER(MPEG2_V4L2M2M, mpeg2_v4l2m2m); REGISTER_DECODER(MPEG2_QSV, mpeg2_qsv); - REGISTER_ENCDEC (MPEG4, mpeg4); + REGISTER_DECODER(MPEG2_MEDIACODEC, mpeg2_mediacodec); REGISTER_DECODER(MSA1, msa1); + REGISTER_DECODER(MSCC, mscc); REGISTER_DECODER(MSMPEG4V1, msmpeg4v1); REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2); REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3); diff --cc libavcodec/avcodec.h index c1090456f5,8567c8b28f..9d2127b21d --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@@ -1168,18 -1005,8 +1165,8 @@@ typedef struct RcOverride * If not set, it might not use get_buffer() at all or use operations that * assume the buffer was allocated by avcodec_default_get_buffer. */ -#define CODEC_CAP_DR1 0x0002 -#define CODEC_CAP_TRUNCATED 0x0008 +#define CODEC_CAP_DR1 AV_CODEC_CAP_DR1 +#define CODEC_CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED - #if FF_API_XVMC - /* Codec can export data for HW decoding. This flag indicates that - * the codec would call get_format() with list that might contain HW accelerated - * pixel formats (XvMC, VDPAU, VAAPI, etc). The application can pick any of them - * including raw image format. - * The application can use the passed context to determine bitstream version, - * chroma format, resolution etc. - */ - #define CODEC_CAP_HWACCEL 0x0010 - #endif /* FF_API_XVMC */ /** * Encoder or decoder requires flushing with NULL input at the end in order to * give the complete and correct output. diff --cc libavcodec/mpeg12dec.c index 4e68be27f1,528a4ed16d..97885c0be8 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@@ -1205,31 -1145,7 +1205,26 @@@ static enum AVPixelFormat mpeg_get_pixe else pix_fmts = mpeg12_pixfmt_list_444; - return ff_get_format(avctx, pix_fmts); + return ff_thread_get_format(avctx, pix_fmts); +} + +static void setup_hwaccel_for_pixfmt(AVCodecContext *avctx) +{ + // until then pix_fmt may be changed right after codec init + if (avctx->hwaccel +#if FF_API_VDPAU + || uses_vdpau(avctx) +#endif + ) + if (avctx->idct_algo == FF_IDCT_AUTO) + avctx->idct_algo = FF_IDCT_NONE; + + if (avctx->hwaccel && avctx->pix_fmt == AV_PIX_FMT_XVMC) { + Mpeg1Context *s1 = avctx->priv_data; + MpegEncContext *s = &s1->mpeg_enc_ctx; + + s->pack_pblocks = 1; - #if FF_API_XVMC - FF_DISABLE_DEPRECATION_WARNINGS - avctx->xvmc_acceleration = 2; - FF_ENABLE_DEPRECATION_WARNINGS - #endif /* FF_API_XVMC */ + } } /* Call this function when we know all parameters. @@@ -2893,94 -2613,6 +2888,56 @@@ AVCodec ff_mpeg2video_decoder = .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .flush = flush, + .max_lowres = 3, .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), }; + +//legacy decoder +AVCodec ff_mpegvideo_decoder = { + .name = "mpegvideo", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), + .type = AVMEDIA_TYPE_VIDEO, + .id = AV_CODEC_ID_MPEG2VIDEO, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .flush = flush, + .max_lowres = 3, +}; + - #if FF_API_XVMC - #if CONFIG_MPEG_XVMC_DECODER - FF_DISABLE_DEPRECATION_WARNINGS - static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) - { - if (avctx->active_thread_type & FF_THREAD_SLICE) - return -1; - if (!(avctx->slice_flags & SLICE_FLAG_CODED_ORDER)) - return -1; - if (!(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { - ff_dlog(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n"); - } - mpeg_decode_init(avctx); - - avctx->pix_fmt = AV_PIX_FMT_XVMC_MPEG2_IDCT; - avctx->xvmc_acceleration = 2; // 2 - the blocks are packed! - - return 0; - } - - AVCodec ff_mpeg_xvmc_decoder = { - .name = "mpegvideo_xvmc", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video XvMC (X-Video Motion Compensation)"), - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_MPEG2VIDEO_XVMC, - .priv_data_size = sizeof(Mpeg1Context), - .init = mpeg_mc_decode_init, - .close = mpeg_decode_end, - .decode = mpeg_decode_frame, - .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | - AV_CODEC_CAP_TRUNCATED | CODEC_CAP_HWACCEL | - AV_CODEC_CAP_DELAY, - .flush = flush, - }; - FF_ENABLE_DEPRECATION_WARNINGS - #endif - #endif /* FF_API_XVMC */ - +#if CONFIG_MPEG_VDPAU_DECODER && FF_API_VDPAU +AVCodec ff_mpeg_vdpau_decoder = { + .name = "mpegvideo_vdpau", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video (VDPAU acceleration)"), + .type = AVMEDIA_TYPE_VIDEO, + .id = AV_CODEC_ID_MPEG2VIDEO, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | + AV_CODEC_CAP_HWACCEL_VDPAU | AV_CODEC_CAP_DELAY, + .flush = flush, +}; +#endif + +#if CONFIG_MPEG1_VDPAU_DECODER && FF_API_VDPAU +AVCodec ff_mpeg1_vdpau_decoder = { + .name = "mpeg1video_vdpau", + .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"), + .type = AVMEDIA_TYPE_VIDEO, + .id = AV_CODEC_ID_MPEG1VIDEO, + .priv_data_size = sizeof(Mpeg1Context), + .init = mpeg_decode_init, + .close = mpeg_decode_end, + .decode = mpeg_decode_frame, + .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | + AV_CODEC_CAP_HWACCEL_VDPAU | AV_CODEC_CAP_DELAY, + .flush = flush, +}; +#endif diff --cc libavcodec/options_table.h index c40b3e61b4,5e3540d2dd..6e90c0d77c --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@@ -329,11 -294,8 +329,8 @@@ static const AVOption avcodec_options[ {"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, #endif {"slice_flags", NULL, OFFSET(slice_flags), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, - #if FF_API_XVMC - {"xvmc_acceleration", NULL, OFFSET(xvmc_acceleration), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, - #endif /* FF_API_XVMC */ -{"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "mbd"}, -{"simple", "use mbcmp (default)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"}, +{"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 2, V|E, "mbd"}, +{"simple", "use mbcmp", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"}, {"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"}, {"rd", "use best rate distortion", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"}, #if FF_API_STREAM_CODEC_TAG diff --cc libavcodec/version.h index 2d85e25a26,986e697bc9..3c9356d8ce --- a/libavcodec/version.h +++ b/libavcodec/version.h @@@ -45,21 -45,8 +45,18 @@@ * FF_API_* defines may be placed below to indicate public API that will be * dropped at a future version bump. The defines themselves are not part of * the public API and may change, break or disappear at any time. + * + * @note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. */ +#ifndef FF_API_LOWRES +#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_DEBUG_MV +#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58) +#endif - #ifndef FF_API_XVMC - #define FF_API_XVMC (LIBAVCODEC_VERSION_MAJOR < 58) - #endif #ifndef FF_API_ERROR_RATE #define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58) #endif diff --cc libavutil/pixdesc.c index a428d63066,e4e5674a66..81b763b961 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@@ -326,22 -313,6 +326,10 @@@ static const AVPixFmtDescriptor av_pix_ }, .flags = AV_PIX_FMT_FLAG_PLANAR, }, - #if FF_API_XVMC - [AV_PIX_FMT_XVMC_MPEG2_MC] = { - .name = "xvmcmc", - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, - [AV_PIX_FMT_XVMC_MPEG2_IDCT] = { - .name = "xvmcidct", - .flags = AV_PIX_FMT_FLAG_HWACCEL, - }, - #endif /* FF_API_XVMC */ - #if !FF_API_XVMC + [AV_PIX_FMT_XVMC] = { + .name = "xvmc", + .flags = AV_PIX_FMT_FLAG_HWACCEL, + }, - #endif /* !FF_API_XVMC */ [AV_PIX_FMT_UYVY422] = { .name = "uyvy422", .nb_components = 3, diff --cc libavutil/pixfmt.h index f54f5549b6,0b7582576b..6b6b4ae0fb --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@@ -245,53 -223,6 +240,53 @@@ enum AVPixelFormat */ AV_PIX_FMT_CUDA, + AV_PIX_FMT_0RGB=0x123+4,///< packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined + AV_PIX_FMT_RGB0, ///< packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined + AV_PIX_FMT_0BGR, ///< packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined + AV_PIX_FMT_BGR0, ///< packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined + + AV_PIX_FMT_YUV420P12BE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + AV_PIX_FMT_YUV420P12LE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + AV_PIX_FMT_YUV420P14BE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + AV_PIX_FMT_YUV420P14LE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + AV_PIX_FMT_YUV422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + AV_PIX_FMT_YUV422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_YUV422P14BE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + AV_PIX_FMT_YUV422P14LE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + AV_PIX_FMT_YUV444P14BE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + AV_PIX_FMT_YUV444P14LE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + AV_PIX_FMT_GBRP12BE, ///< planar GBR 4:4:4 36bpp, big-endian + AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, little-endian + AV_PIX_FMT_GBRP14BE, ///< planar GBR 4:4:4 42bpp, big-endian + AV_PIX_FMT_GBRP14LE, ///< planar GBR 4:4:4 42bpp, little-endian + AV_PIX_FMT_YUVJ411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV411P and setting color_range + + AV_PIX_FMT_BAYER_BGGR8, ///< bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples */ + AV_PIX_FMT_BAYER_RGGB8, ///< bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples */ + AV_PIX_FMT_BAYER_GBRG8, ///< bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples */ + AV_PIX_FMT_BAYER_GRBG8, ///< bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples */ + AV_PIX_FMT_BAYER_BGGR16LE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian */ + AV_PIX_FMT_BAYER_BGGR16BE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian */ + AV_PIX_FMT_BAYER_RGGB16LE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian */ + AV_PIX_FMT_BAYER_RGGB16BE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian */ + AV_PIX_FMT_BAYER_GBRG16LE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian */ + AV_PIX_FMT_BAYER_GBRG16BE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian */ + AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian */ + AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian */ - #if !FF_API_XVMC ++ + AV_PIX_FMT_XVMC,///< XVideo Motion Acceleration via common packet passing - #endif /* !FF_API_XVMC */ ++ + AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian + AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian + AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian + AV_PIX_FMT_YUV440P12BE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian + AV_PIX_FMT_AYUV64LE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian + AV_PIX_FMT_AYUV64BE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian + + AV_PIX_FMT_VIDEOTOOLBOX, ///< hardware decoding through Videotoolbox + AV_PIX_FMT_P010LE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian AV_PIX_FMT_P010BE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog