Commit ca6ae3b7 authored by Mark Thompson's avatar Mark Thompson Committed by Mark Thompson

vaapi_encode: Add MPEG-2 support

parent 3c2717e4
......@@ -7,6 +7,7 @@ version <next>:
- VAAPI-accelerated VP8 and HEVC decoding
- VAAPI-accelerated deinterlacing
- config.log and other configuration files moved into avbuild/ directory
- VAAPI-accelerated MPEG-2 encoding
version 12:
......
......@@ -2235,6 +2235,8 @@ mpeg2_qsv_decoder_deps="libmfx"
mpeg2_qsv_decoder_select="qsvdec mpeg2_qsv_hwaccel mpegvideo_parser"
mpeg2_qsv_encoder_deps="libmfx"
mpeg2_qsv_encoder_select="qsvenc"
mpeg2_vaapi_encoder_deps="VAEncPictureParameterBufferMPEG2"
mpeg2_vaapi_encoder_select="vaapi_encode"
mpeg4_omx_encoder_deps="omx"
vc1_mmal_decoder_deps="mmal"
vc1_qsv_decoder_deps="libmfx"
......@@ -4586,6 +4588,7 @@ check_type "va/va.h va/va_vpp.h" "VAProcPipelineParameterBuffer"
check_type "va/va.h va/va_enc_h264.h" "VAEncPictureParameterBufferH264"
check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
check_type "va/va.h va/va_enc_mpeg2.h" "VAEncPictureParameterBufferMPEG2"
check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
......
......@@ -337,6 +337,7 @@ OBJS-$(CONFIG_MPEG2_QSV_ENCODER) += qsvenc_mpeg2.o
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12dec.o mpeg12.o mpeg12data.o
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpeg12.o
OBJS-$(CONFIG_MPEG2_MMAL_DECODER) += mmaldec.o
OBJS-$(CONFIG_MPEG2_VAAPI_ENCODER) += vaapi_encode_mpeg2.o
OBJS-$(CONFIG_MPEG4_DECODER) += xvididct.o
OBJS-$(CONFIG_MPEG4_OMX_ENCODER) += omx.o
OBJS-$(CONFIG_MSA1_DECODER) += mss3.o
......
......@@ -505,6 +505,7 @@ void avcodec_register_all(void)
REGISTER_ENCODER(HEVC_VAAPI, hevc_vaapi);
REGISTER_ENCODER(MJPEG_VAAPI, mjpeg_vaapi);
REGISTER_ENCODER(MPEG2_QSV, mpeg2_qsv);
REGISTER_ENCODER(MPEG2_VAAPI, mpeg2_vaapi);
REGISTER_ENCODER(MPEG4_OMX, mpeg4_omx);
#if FF_API_NVENC_OLD_NAME
REGISTER_ENCODER(NVENC_H264, nvenc_h264);
......
......@@ -320,6 +320,7 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
err = AVERROR(ENOMEM);
goto fail;
}
slice->index = i;
pic->slices[i] = slice;
if (ctx->codec->slice_params_size > 0) {
......
......@@ -35,8 +35,8 @@ enum {
MAX_CONFIG_ATTRIBUTES = 4,
MAX_GLOBAL_PARAMS = 4,
MAX_PICTURE_REFERENCES = 2,
MAX_PICTURE_SLICES = 1,
MAX_PARAM_BUFFERS = 16,
MAX_PICTURE_SLICES = 112,
MAX_PARAM_BUFFERS = 128,
MAX_REORDER_DELAY = 16,
MAX_PARAM_BUFFER_SIZE = 1024,
};
......@@ -49,6 +49,7 @@ enum {
};
typedef struct VAAPIEncodeSlice {
int index;
void *priv_data;
void *codec_slice_params;
} VAAPIEncodeSlice;
......
This diff is collapsed.
......@@ -28,7 +28,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 31
#define LIBAVCODEC_VERSION_MINOR 32
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
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