FFmpeg
Data Fields
AVQSVContext Struct Reference

This struct is used for communicating QSV parameters between libavcodec and the caller. More...

#include <qsv.h>

Data Fields

mfxSession session
 If non-NULL, the session to use for encoding or decoding. More...
 
int iopattern
 The IO pattern to use. More...
 
mfxExtBuffer ** ext_buffers
 Extra buffers to pass to encoder or decoder initialization. More...
 
int nb_ext_buffers
 
int opaque_alloc
 Encoding only. More...
 
int nb_opaque_surfaces
 Encoding only, and only if opaque_alloc is set to non-zero. More...
 
AVBufferRefopaque_surfaces
 Encoding only, and only if opaque_alloc is set to non-zero. More...
 
int opaque_alloc_type
 Encoding only, and only if opaque_alloc is set to non-zero. More...
 

Detailed Description

This struct is used for communicating QSV parameters between libavcodec and the caller.

It is managed by the caller and must be assigned to AVCodecContext.hwaccel_context.

Definition at line 36 of file qsv.h.

Field Documentation

◆ session

mfxSession AVQSVContext::session

If non-NULL, the session to use for encoding or decoding.

Otherwise, libavcodec will try to create an internal session.

Definition at line 41 of file qsv.h.

Referenced by qsv_decode_init(), and qsvenc_init_session().

◆ iopattern

int AVQSVContext::iopattern

The IO pattern to use.

Definition at line 46 of file qsv.h.

Referenced by ff_qsv_enc_init(), and qsv_decode_init().

◆ ext_buffers

mfxExtBuffer** AVQSVContext::ext_buffers

Extra buffers to pass to encoder or decoder initialization.

Definition at line 51 of file qsv.h.

Referenced by ff_qsv_enc_init(), and qsv_decode_init().

◆ nb_ext_buffers

int AVQSVContext::nb_ext_buffers

Definition at line 52 of file qsv.h.

Referenced by ff_qsv_enc_init(), and qsv_decode_init().

◆ opaque_alloc

int AVQSVContext::opaque_alloc

Encoding only.

If this field is set to non-zero by the caller, libavcodec will create an mfxExtOpaqueSurfaceAlloc extended buffer and pass it to the encoder initialization. This only makes sense if iopattern is also set to MFX_IOPATTERN_IN_OPAQUE_MEMORY.

The number of allocated opaque surfaces will be the sum of the number required by the encoder and the user-provided value nb_opaque_surfaces. The array of the opaque surfaces will be exported to the caller through the opaque_surfaces field.

Definition at line 65 of file qsv.h.

Referenced by ff_qsv_enc_init().

◆ nb_opaque_surfaces

int AVQSVContext::nb_opaque_surfaces

Encoding only, and only if opaque_alloc is set to non-zero.

Before calling avcodec_open2(), the caller should set this field to the number of extra opaque surfaces to allocate beyond what is required by the encoder.

On return from avcodec_open2(), this field will be set by libavcodec to the total number of allocated opaque surfaces.

Definition at line 76 of file qsv.h.

Referenced by qsv_init_opaque_alloc().

◆ opaque_surfaces

AVBufferRef* AVQSVContext::opaque_surfaces

Encoding only, and only if opaque_alloc is set to non-zero.

On return from avcodec_open2(), this field will be used by libavcodec to export the array of the allocated opaque surfaces to the caller, so they can be passed to other parts of the pipeline.

The buffer reference exported here is owned and managed by libavcodec, the callers should make their own reference with av_buffer_ref() and free it with av_buffer_unref() when it is no longer needed.

The buffer data is an nb_opaque_surfaces-sized array of mfxFrameSurface1.

Definition at line 90 of file qsv.h.

Referenced by qsv_init_opaque_alloc().

◆ opaque_alloc_type

int AVQSVContext::opaque_alloc_type

Encoding only, and only if opaque_alloc is set to non-zero.

On return from avcodec_open2(), this field will be set to the surface type used in the opaque allocation request.

Definition at line 97 of file qsv.h.

Referenced by qsv_init_opaque_alloc().


The documentation for this struct was generated from the following file: