27 #include <mfx/mfxvideo.h>
63 #if CONFIG_VP8_QSV_DECODER
82 #if CONFIG_VP8_QSV_DECODER
84 static const char *uid_vp8dec_hw =
"f622394d8d87452f878c51f2fc9b4131";
130 while (!*got_frame) {
164 #define OFFSET(x) offsetof(QSVOtherContext, x)
165 #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
171 #if CONFIG_MPEG2_QSV_DECODER
172 static const AVClass mpeg2_qsv_class = {
190 .priv_class = &mpeg2_qsv_class,
195 .wrapper_name =
"qsv",
199 #if CONFIG_VC1_QSV_DECODER
200 static const AVClass vc1_qsv_class = {
218 .priv_class = &vc1_qsv_class,
223 .wrapper_name =
"qsv",
227 #if CONFIG_VP8_QSV_DECODER
228 static const AVClass vp8_qsv_class = {
246 .priv_class = &vp8_qsv_class,
251 .wrapper_name =
"qsv",
static void qsv_decode_flush(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
static av_cold int qsv_decode_close(AVCodecContext *avctx)
ptrdiff_t const GLvoid * data
static void flush(AVCodecContext *avctx)
AVCodec ff_vc1_qsv_decoder
#define LIBAVUTIL_VERSION_INT
static av_cold int init(AVCodecContext *avctx)
const char * av_default_item_name(void *ptr)
Return the context name.
AVCodec ff_vp8_qsv_decoder
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
Feed data from a user-supplied callback to an AVFifoBuffer.
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...
int ff_qsv_decode_close(QSVContext *q)
AVFifoBuffer * packet_fifo
int av_fifo_space(const AVFifoBuffer *f)
Return the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write int...
void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
static const AVOption options[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
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.
void ff_qsv_decode_flush(AVCodecContext *avctx, QSVContext *q)
#define ASYNC_DEPTH_DEFAULT
preferred ID for MPEG-1/2 video decoding
char * av_strdup(const char *s)
Duplicate a string.
Libavcodec external API header.
AVCodec ff_mpeg2_qsv_decoder
static void qsv_clear_buffers(QSVOtherContext *s)
int av_fifo_size(const AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size)
Resize an AVFifoBuffer.
main external API structure.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
a very simple circular buffer FIFO implementation
#define AV_CODEC_CAP_HYBRID
Codec is potentially backed by a hardware implementation, but not necessarily.
Describe the class of an AVClass context structure.
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
static enum AVPixelFormat pix_fmts[]
common internal api header.
common internal and external API header
static av_cold int qsv_decode_init(AVCodecContext *avctx)
static int qsv_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
#define AV_CODEC_CAP_AVOID_PROBING
Decoder is not a preferred choice for probing.
const AVCodecHWConfigInternal * ff_qsv_hw_configs[]
int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q, AVFrame *frame, int *got_frame, AVPacket *pkt)
AVPixelFormat
Pixel format.
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.