28 #include <mfx/mfxvideo.h>
71 static const char *uid_hevcenc_sw =
"15dd936825ad475ea34e35f3f54217a6";
75 "load_plugins is not empty, but load_plugin is not set to 'none'."
76 "The load_plugin value will be ignored.\n");
109 int n_filtered =
NULL;
113 if (avpkt->
size > 3 && !avpkt->
data[0] &&
114 !avpkt->
data[1] && !avpkt->
data[2] && 1==avpkt->
data[3]) {
121 &p_filtered, &n_filtered,
124 pkt_filtered.
pts = avpkt->
pts;
125 pkt_filtered.
data = p_filtered;
126 pkt_filtered.
size = n_filtered;
130 if (p_filtered != avpkt->
data)
132 return ret > 0 ? avpkt->
size : ret;
146 #define OFFSET(x) offsetof(QSVH2645Context, x)
147 #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
149 #if CONFIG_HEVC_QSV_DECODER
157 static const AVOption hevc_options[] = {
164 {
"load_plugins",
"A :-separate list of hexadecimal plugin UIDs to load in an internal session",
169 static const AVClass hevc_class = {
172 .option = hevc_options,
176 AVCodec ff_hevc_qsv_decoder = {
187 .priv_class = &hevc_class,
194 #if CONFIG_H264_QSV_DECODER
214 AVCodec ff_h264_qsv_decoder = {
216 .long_name =
NULL_IF_CONFIG_SMALL(
"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)"),
225 .priv_class = &
class,
AVBitStreamFilterContext * bsf
int ff_qsv_decode(AVCodecContext *avctx, QSVContext *q, AVFrame *frame, int *got_frame, AVPacket *avpkt)
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
static void flush(AVCodecContext *avctx)
#define AV_LOG_WARNING
Something somehow does not look correct.
#define LIBAVUTIL_VERSION_INT
static av_cold int init(AVCodecContext *avctx)
attribute_deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
Filter bitstream.
static av_cold int qsv_decode_close(AVCodecContext *avctx)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
void ff_qsv_decode_reset(AVCodecContext *avctx, QSVContext *q)
int ff_qsv_decode_close(QSVContext *q)
const OptionDef options[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
attribute_deprecated AVBitStreamFilterContext * av_bitstream_filter_init(const char *name)
Create and initialize a bitstream filter context given a bitstream filter name.
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
const char * name
Name of the codec implementation.
#define ASYNC_DEPTH_DEFAULT
const char * name
Name of the hardware accelerated codec.
static void qsv_decode_flush(AVCodecContext *avctx)
attribute_deprecated void av_bitstream_filter_close(AVBitStreamFilterContext *bsf)
Release bitstream filter context.
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
Libavcodec external API header.
char * av_strdup(const char *s)
Duplicate the string s.
main external API structure.
a very simple circular buffer FIFO implementation
Describe the class of an AVClass context structure.
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
static int qsv_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static enum AVPixelFormat pix_fmts[]
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
static av_cold int qsv_decode_init(AVCodecContext *avctx)
common internal api header.
common internal and external API header
AVPixelFormat
Pixel format.
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...