summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-23 18:15:49 -0300
committerJames Almer <jamrial@gmail.com>2017-10-23 18:15:49 -0300
commitb773a8d8c1dfe4cfc6eabf509e26ab011270b9ed (patch)
tree5055beedccbbf7f81f523598117a09755dc6b083 /libavcodec/mpeg12dec.c
parentf192f2f061d979e3d2716b9892ca276b5d5cd418 (diff)
parentdd343fd986459f467a2d1d70c26101dff1d47d68 (diff)
Merge commit 'dd343fd986459f467a2d1d70c26101dff1d47d68'
* commit 'dd343fd986459f467a2d1d70c26101dff1d47d68': lavu: Drop deprecated VDPAU pixel formats Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index f102246f52..82bb1286ff 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -47,7 +47,6 @@
#include "profiles.h"
#include "thread.h"
#include "version.h"
-#include "vdpau_compat.h"
#include "xvmc_internal.h"
typedef struct Mpeg1Context {
@@ -1134,9 +1133,6 @@ static const enum AVPixelFormat mpeg1_hwaccel_pixfmt_list_420[] = {
#if CONFIG_MPEG1_XVMC_HWACCEL
AV_PIX_FMT_XVMC,
#endif
-#if CONFIG_MPEG1_VDPAU_DECODER && FF_API_VDPAU
- AV_PIX_FMT_VDPAU_MPEG1,
-#endif
#if CONFIG_MPEG1_VDPAU_HWACCEL
AV_PIX_FMT_VDPAU,
#endif
@@ -1148,9 +1144,6 @@ static const enum AVPixelFormat mpeg2_hwaccel_pixfmt_list_420[] = {
#if CONFIG_MPEG2_XVMC_HWACCEL
AV_PIX_FMT_XVMC,
#endif
-#if CONFIG_MPEG_VDPAU_DECODER && FF_API_VDPAU
- AV_PIX_FMT_VDPAU_MPEG2,
-#endif
#if CONFIG_MPEG2_VDPAU_HWACCEL
AV_PIX_FMT_VDPAU,
#endif
@@ -1181,12 +1174,6 @@ static const enum AVPixelFormat mpeg12_pixfmt_list_444[] = {
AV_PIX_FMT_NONE
};
-#if FF_API_VDPAU
-static inline int uses_vdpau(AVCodecContext *avctx) {
- return avctx->pix_fmt == AV_PIX_FMT_VDPAU_MPEG1 || avctx->pix_fmt == AV_PIX_FMT_VDPAU_MPEG2;
-}
-#endif
-
static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
{
Mpeg1Context *s1 = avctx->priv_data;
@@ -1211,11 +1198,7 @@ static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
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->hwaccel)
if (avctx->idct_algo == FF_IDCT_AUTO)
avctx->idct_algo = FF_IDCT_NONE;
@@ -2450,12 +2433,6 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
s2->er.error_count += s2->thread_context[i]->er.error_count;
}
-#if FF_API_VDPAU
- if ((CONFIG_MPEG_VDPAU_DECODER || CONFIG_MPEG1_VDPAU_DECODER)
- && uses_vdpau(avctx))
- ff_vdpau_mpeg_picture_complete(s2, buf, buf_size, s->slice_count);
-#endif
-
ret = slice_end(avctx, picture);
if (ret < 0)
return ret;
@@ -2707,13 +2684,6 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
return AVERROR_INVALIDDATA;
}
-#if FF_API_VDPAU
- if (uses_vdpau(avctx)) {
- s->slice_count++;
- break;
- }
-#endif
-
if (HAVE_THREADS &&
(avctx->active_thread_type & FF_THREAD_SLICE) &&
!avctx->hwaccel) {
@@ -2904,35 +2874,3 @@ AVCodec ff_mpegvideo_decoder = {
.flush = flush,
.max_lowres = 3,
};
-
-#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