diff options
author | James Almer <jamrial@gmail.com> | 2017-10-23 15:11:42 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-23 15:20:49 -0300 |
commit | b46613dd9b8b4adc68312a283486c33c109aab19 (patch) | |
tree | 8fd31b65306b5781bc8a2a4ae3fafff9e109839e /libavcodec | |
parent | c381f6a483e00ab8bfa4f777284b89acdad6dd94 (diff) | |
parent | dcc39ee10e82833ce24aa57926c00ffeb1948198 (diff) | |
download | ffmpeg-b46613dd9b8b4adc68312a283486c33c109aab19.tar.gz |
Merge commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198'
* commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198':
lavc: Remove deprecated XvMC support hacks
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/allcodecs.c | 3 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 23 | ||||
-rw-r--r-- | libavcodec/codec_desc.c | 9 | ||||
-rw-r--r-- | libavcodec/mpeg12dec.c | 43 | ||||
-rw-r--r-- | libavcodec/options_table.h | 3 | ||||
-rw-r--r-- | libavcodec/version.h | 3 |
6 files changed, 0 insertions, 84 deletions
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 |