Commit bb619f41 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'bf52f773'

* commit 'bf52f773':
  lavc: add Intel libmfx-based MPEG2 decoder.

Conflicts:
	configure
	libavcodec/qsvdec_mpeg2.c

Some cosmetics merged, rest is related to the removed parser code and
thus not merged
Merged-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parents 9f4bff83 bf52f773
......@@ -2429,14 +2429,14 @@ mpeg2_d3d11va_hwaccel_deps="d3d11va"
mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
mpeg2_dxva2_hwaccel_deps="dxva2"
mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
mpeg2_qsv_hwaccel_deps="libmfx"
mpeg2_qsv_hwaccel_select="qsvdec_mpeg2"
mpeg2_vaapi_hwaccel_deps="vaapi"
mpeg2_vaapi_hwaccel_select="mpeg2video_decoder"
mpeg2_vdpau_hwaccel_deps="vdpau"
mpeg2_vdpau_hwaccel_select="mpeg2video_decoder"
mpeg2_xvmc_hwaccel_deps="xvmc"
mpeg2_xvmc_hwaccel_select="mpeg2video_decoder"
mpeg2_qsv_hwaccel_deps="libmfx"
mpeg2_qsv_hwaccel_select="qsvdec_mpeg2"
mpeg4_crystalhd_decoder_select="crystalhd"
mpeg4_vaapi_hwaccel_deps="vaapi"
mpeg4_vaapi_hwaccel_select="mpeg4_decoder"
......
......@@ -363,8 +363,8 @@ OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12dec.o mpeg12.o mpeg12data.o
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12.o
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12dec.o mpeg12.o mpeg12data.o
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpeg12.o
OBJS-$(CONFIG_MPEG2_QSV_ENCODER) += qsvenc_mpeg2.o
OBJS-$(CONFIG_MPEG2_QSV_DECODER) += qsvdec_mpeg2.o
OBJS-$(CONFIG_MPEG2_QSV_ENCODER) += qsvenc_mpeg2.o
OBJS-$(CONFIG_MPEG4_DECODER) += xvididct.o
OBJS-$(CONFIG_MPL2_DECODER) += mpl2dec.o ass.o
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o
......
......@@ -92,9 +92,9 @@ void avcodec_register_all(void)
REGISTER_HWACCEL(MPEG2_XVMC, mpeg2_xvmc);
REGISTER_HWACCEL(MPEG2_D3D11VA, mpeg2_d3d11va);
REGISTER_HWACCEL(MPEG2_DXVA2, mpeg2_dxva2);
REGISTER_HWACCEL(MPEG2_QSV, mpeg2_qsv);
REGISTER_HWACCEL(MPEG2_VAAPI, mpeg2_vaapi);
REGISTER_HWACCEL(MPEG2_VDPAU, mpeg2_vdpau);
REGISTER_HWACCEL(MPEG2_QSV, mpeg2_qsv);
REGISTER_HWACCEL(MPEG4_VAAPI, mpeg4_vaapi);
REGISTER_HWACCEL(MPEG4_VDPAU, mpeg4_vdpau);
REGISTER_HWACCEL(VC1_D3D11VA, vc1_d3d11va);
......
......@@ -27,14 +27,14 @@
#include "avcodec.h"
#include "qsvdec.h"
typedef struct QSVMPVContext {
typedef struct QSVMPEG2Context {
AVClass *class;
QSVContext qsv;
} QSVMPVContext;
} QSVMPEG2Context;
static av_cold int qsv_decode_close(AVCodecContext *avctx)
{
QSVMPVContext *s = avctx->priv_data;
QSVMPEG2Context *s = avctx->priv_data;
ff_qsv_decode_close(&s->qsv);
......@@ -49,7 +49,7 @@ static av_cold int qsv_decode_init(AVCodecContext *avctx)
static int qsv_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
QSVMPVContext *s = avctx->priv_data;
QSVMPEG2Context *s = avctx->priv_data;
AVFrame *frame = data;
return ff_qsv_decode(avctx, &s->qsv, frame, got_frame, avpkt);
......@@ -66,7 +66,7 @@ AVHWAccel ff_mpeg2_qsv_hwaccel = {
.pix_fmt = AV_PIX_FMT_QSV,
};
#define OFFSET(x) offsetof(QSVMPVContext, x)
#define OFFSET(x) offsetof(QSVMPEG2Context, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static const AVOption options[] = {
{ "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VD },
......@@ -83,7 +83,7 @@ static const AVClass class = {
AVCodec ff_mpeg2_qsv_decoder = {
.name = "mpeg2_qsv",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video (Intel Quick Sync Video acceleration)"),
.priv_data_size = sizeof(QSVMPVContext),
.priv_data_size = sizeof(QSVMPEG2Context),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MPEG2VIDEO,
.init = qsv_decode_init,
......
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