Commit b46613dd authored by James Almer's avatar James Almer

Merge commit 'dcc39ee1'

* commit 'dcc39ee1':
  lavc: Remove deprecated XvMC support hacks
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents c381f6a4 dcc39ee1
...@@ -2542,8 +2542,6 @@ mp3on4_decoder_select="mpegaudio" ...@@ -2542,8 +2542,6 @@ mp3on4_decoder_select="mpegaudio"
mp3on4float_decoder_select="mpegaudio" mp3on4float_decoder_select="mpegaudio"
mpc7_decoder_select="bswapdsp mpegaudiodsp" mpc7_decoder_select="bswapdsp mpegaudiodsp"
mpc8_decoder_select="mpegaudiodsp" mpc8_decoder_select="mpegaudiodsp"
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select="mpeg2video_decoder"
mpegvideo_decoder_select="mpegvideo" mpegvideo_decoder_select="mpegvideo"
mpeg1video_decoder_select="mpegvideo" mpeg1video_decoder_select="mpegvideo"
mpeg1video_encoder_select="aandcttables mpegvideoenc h263dsp" mpeg1video_encoder_select="aandcttables mpegvideoenc h263dsp"
......
...@@ -757,8 +757,6 @@ Set context model. ...@@ -757,8 +757,6 @@ Set context model.
@item slice_flags @var{integer} @item slice_flags @var{integer}
@item xvmc_acceleration @var{integer}
@item mbd @var{integer} (@emph{encoding,video}) @item mbd @var{integer} (@emph{encoding,video})
Set macroblock decision algorithm (high quality mode). Set macroblock decision algorithm (high quality mode).
......
...@@ -250,9 +250,6 @@ static void register_all(void) ...@@ -250,9 +250,6 @@ static void register_all(void)
REGISTER_DECODER(MJPEGB, mjpegb); REGISTER_DECODER(MJPEGB, mjpegb);
REGISTER_DECODER(MMVIDEO, mmvideo); REGISTER_DECODER(MMVIDEO, mmvideo);
REGISTER_DECODER(MOTIONPIXELS, motionpixels); REGISTER_DECODER(MOTIONPIXELS, motionpixels);
#if FF_API_XVMC
REGISTER_DECODER(MPEG_XVMC, mpeg_xvmc);
#endif /* FF_API_XVMC */
REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video); REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video);
REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video);
REGISTER_ENCDEC (MPEG4, mpeg4); REGISTER_ENCDEC (MPEG4, mpeg4);
......
...@@ -217,9 +217,6 @@ enum AVCodecID { ...@@ -217,9 +217,6 @@ enum AVCodecID {
/* video codecs */ /* video codecs */
AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG1VIDEO,
AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding 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_H261,
AV_CODEC_ID_H263, AV_CODEC_ID_H263,
AV_CODEC_ID_RV10, AV_CODEC_ID_RV10,
...@@ -1170,16 +1167,6 @@ typedef struct RcOverride{ ...@@ -1170,16 +1167,6 @@ typedef struct RcOverride{
*/ */
#define CODEC_CAP_DR1 AV_CODEC_CAP_DR1 #define CODEC_CAP_DR1 AV_CODEC_CAP_DR1
#define CODEC_CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED #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 * Encoder or decoder requires flushing with NULL input at the end in order to
* give the complete and correct output. * give the complete and correct output.
...@@ -2284,16 +2271,6 @@ typedef struct AVCodecContext { ...@@ -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_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) #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 * macroblock decision mode
* - encoding: Set by user. * - encoding: Set by user.
......
...@@ -46,15 +46,6 @@ static const AVCodecDescriptor codec_descriptors[] = { ...@@ -46,15 +46,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER,
.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), .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, .id = AV_CODEC_ID_H261,
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
......
...@@ -1224,11 +1224,6 @@ static void setup_hwaccel_for_pixfmt(AVCodecContext *avctx) ...@@ -1224,11 +1224,6 @@ static void setup_hwaccel_for_pixfmt(AVCodecContext *avctx)
MpegEncContext *s = &s1->mpeg_enc_ctx; MpegEncContext *s = &s1->mpeg_enc_ctx;
s->pack_pblocks = 1; 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 = { ...@@ -2915,44 +2910,6 @@ AVCodec ff_mpegvideo_decoder = {
.max_lowres = 3, .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 #if CONFIG_MPEG_VDPAU_DECODER && FF_API_VDPAU
AVCodec ff_mpeg_vdpau_decoder = { AVCodec ff_mpeg_vdpau_decoder = {
.name = "mpegvideo_vdpau", .name = "mpegvideo_vdpau",
......
...@@ -329,9 +329,6 @@ static const AVOption avcodec_options[] = { ...@@ -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}, {"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
#endif #endif
{"slice_flags", NULL, OFFSET(slice_flags), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"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"}, {"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"}, {"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"}, {"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"},
......
...@@ -57,9 +57,6 @@ ...@@ -57,9 +57,6 @@
#ifndef FF_API_DEBUG_MV #ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58) #define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif #endif
#ifndef FF_API_XVMC
#define FF_API_XVMC (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_ERROR_RATE #ifndef FF_API_ERROR_RATE
#define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58) #define FF_API_ERROR_RATE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif #endif
......
...@@ -326,22 +326,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { ...@@ -326,22 +326,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
}, },
.flags = AV_PIX_FMT_FLAG_PLANAR, .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] = { [AV_PIX_FMT_XVMC] = {
.name = "xvmc", .name = "xvmc",
.flags = AV_PIX_FMT_FLAG_HWACCEL, .flags = AV_PIX_FMT_FLAG_HWACCEL,
}, },
#endif /* !FF_API_XVMC */
[AV_PIX_FMT_UYVY422] = { [AV_PIX_FMT_UYVY422] = {
.name = "uyvy422", .name = "uyvy422",
.nb_components = 3, .nb_components = 3,
......
...@@ -74,11 +74,6 @@ enum AVPixelFormat { ...@@ -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_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_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 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_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_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) AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
...@@ -280,9 +275,9 @@ enum AVPixelFormat { ...@@ -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_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_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 */ 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 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_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_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_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
......
...@@ -109,9 +109,6 @@ ...@@ -109,9 +109,6 @@
#ifndef FF_API_VDPAU #ifndef FF_API_VDPAU
#define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 56) #define FF_API_VDPAU (LIBAVUTIL_VERSION_MAJOR < 56)
#endif #endif
#ifndef FF_API_XVMC
#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_API_OPT_TYPE_METADATA #ifndef FF_API_OPT_TYPE_METADATA
#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 56) #define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 56)
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment