27 #include <mfx/mfxvideo.h> 114 while (!*got_frame) {
150 #define OFFSET(x) offsetof(QSVMPEG2Context, x) 151 #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM 175 .priv_class = &
class,
This structure describes decoded (raw) audio or video data.
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)
void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
static void qsv_decode_flush(AVCodecContext *avctx)
static const AVOption options[]
AVCodec ff_mpeg2_qsv_decoder
#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.
AVHWAccel ff_mpeg2_qsv_hwaccel
void ff_qsv_decode_flush(AVCodecContext *avctx, QSVContext *q)
#define ASYNC_DEPTH_DEFAULT
static av_cold int qsv_decode_init(AVCodecContext *avctx)
const char * name
Name of the hardware accelerated codec.
AVFifoBuffer * packet_fifo
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
static av_cold int qsv_decode_close(AVCodecContext *avctx)
preferred ID for MPEG-1/2 video decoding
int av_fifo_space(AVFifoBuffer *f)
Return the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write int...
Libavcodec external API header.
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
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[]
int av_fifo_size(AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
common internal api header.
common internal and external API header
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
static av_cold int init(AVCodecParserContext *s)
int av_packet_ref(AVPacket *dst, AVPacket *src)
Setup a new reference to the data described by a given packet.
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
static int qsv_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static void qsv_clear_buffers(QSVMPEG2Context *s)
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.