Go to the documentation of this file.
35 #define IS_VIDEO_MEMORY(mode) (mode & (MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET | \
36 MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET))
37 #define IS_OPAQUE_MEMORY(mode) (mode & MFX_MEMTYPE_OPAQUE_FRAME)
38 #define IS_SYSTEM_MEMORY(mode) (mode & MFX_MEMTYPE_SYSTEM_MEMORY)
39 #define MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl))
52 {MFX_IOPATTERN_IN_VIDEO_MEMORY,
"input is video memory surface" },
53 {MFX_IOPATTERN_IN_SYSTEM_MEMORY,
"input is system memory surface" },
54 {MFX_IOPATTERN_IN_OPAQUE_MEMORY,
"input is opaque memory surface" },
55 {MFX_IOPATTERN_OUT_VIDEO_MEMORY,
"output is video memory surface" },
56 {MFX_IOPATTERN_OUT_SYSTEM_MEMORY,
"output is system memory surface" },
57 {MFX_IOPATTERN_OUT_OPAQUE_MEMORY,
"output is opaque memory surface" },
61 const char *extra_string)
71 desc =
"unknown iopattern";
82 { MFX_ERR_NONE, 0,
"success" },
84 { MFX_ERR_NULL_PTR,
AVERROR(EINVAL),
"NULL pointer" },
85 { MFX_ERR_UNSUPPORTED,
AVERROR(ENOSYS),
"unsupported" },
86 { MFX_ERR_MEMORY_ALLOC,
AVERROR(ENOMEM),
"failed to allocate memory" },
87 { MFX_ERR_NOT_ENOUGH_BUFFER,
AVERROR(ENOMEM),
"insufficient input/output buffer" },
88 { MFX_ERR_INVALID_HANDLE,
AVERROR(EINVAL),
"invalid handle" },
89 { MFX_ERR_LOCK_MEMORY,
AVERROR(EIO),
"failed to lock the memory block" },
90 { MFX_ERR_NOT_INITIALIZED,
AVERROR_BUG,
"not initialized" },
91 { MFX_ERR_NOT_FOUND,
AVERROR(ENOSYS),
"specified object was not found" },
95 { MFX_ERR_MORE_SURFACE,
AVERROR_UNKNOWN,
"expect more surface at output" },
96 { MFX_ERR_MORE_BITSTREAM,
AVERROR_UNKNOWN,
"expect more bitstream at output" },
98 { MFX_ERR_DEVICE_LOST,
AVERROR(EIO),
"device lost" },
99 { MFX_ERR_INCOMPATIBLE_VIDEO_PARAM,
AVERROR(EINVAL),
"incompatible video parameters" },
100 { MFX_ERR_INVALID_VIDEO_PARAM,
AVERROR(EINVAL),
"invalid video parameters" },
101 { MFX_ERR_UNDEFINED_BEHAVIOR,
AVERROR_BUG,
"undefined behavior" },
102 { MFX_ERR_DEVICE_FAILED,
AVERROR(EIO),
"device failed" },
103 { MFX_ERR_INCOMPATIBLE_AUDIO_PARAM,
AVERROR(EINVAL),
"incompatible audio parameters" },
104 { MFX_ERR_INVALID_AUDIO_PARAM,
AVERROR(EINVAL),
"invalid audio parameters" },
106 { MFX_WRN_IN_EXECUTION, 0,
"operation in execution" },
107 { MFX_WRN_DEVICE_BUSY, 0,
"device busy" },
108 { MFX_WRN_VIDEO_PARAM_CHANGED, 0,
"video parameters changed" },
109 { MFX_WRN_PARTIAL_ACCELERATION, 0,
"partial acceleration" },
110 { MFX_WRN_INCOMPATIBLE_VIDEO_PARAM, 0,
"incompatible video parameters" },
111 { MFX_WRN_VALUE_NOT_CHANGED, 0,
"value is saturated" },
112 { MFX_WRN_OUT_OF_RANGE, 0,
"value out of range" },
113 { MFX_WRN_FILTER_SKIPPED, 0,
"filter skipped" },
114 { MFX_WRN_INCOMPATIBLE_AUDIO_PARAM, 0,
"incompatible audio parameters" },
128 *
desc =
"unknown error";
133 const char *error_string)
143 const char *warning_string)
153 static mfxStatus
frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req,
154 mfxFrameAllocResponse *resp)
159 if (!(req->Type & MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET) ||
160 !(req->Type & (MFX_MEMTYPE_FROM_VPPIN | MFX_MEMTYPE_FROM_VPPOUT)) ||
161 !(req->Type & MFX_MEMTYPE_EXTERNAL_FRAME))
162 return MFX_ERR_UNSUPPORTED;
164 if (req->Type & MFX_MEMTYPE_FROM_VPPIN) {
165 resp->mids =
av_mallocz(
s->nb_surface_ptrs_in *
sizeof(*resp->mids));
169 for (
i = 0;
i <
s->nb_surface_ptrs_in;
i++)
170 resp->mids[
i] =
s->surface_ptrs_in[
i]->Data.MemId;
172 resp->NumFrameActual =
s->nb_surface_ptrs_in;
174 resp->mids =
av_mallocz(
s->nb_surface_ptrs_out *
sizeof(*resp->mids));
178 for (
i = 0;
i <
s->nb_surface_ptrs_out;
i++)
179 resp->mids[
i] =
s->surface_ptrs_out[
i]->Data.MemId;
181 resp->NumFrameActual =
s->nb_surface_ptrs_out;
187 static mfxStatus
frame_free(mfxHDL pthis, mfxFrameAllocResponse *resp)
193 static mfxStatus
frame_lock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
195 return MFX_ERR_UNSUPPORTED;
198 static mfxStatus
frame_unlock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
200 return MFX_ERR_UNSUPPORTED;
205 mfxHDLPair *pair_dst = (mfxHDLPair*)hdl;
206 mfxHDLPair *pair_src = (mfxHDLPair*)mid;
208 pair_dst->first = pair_src->first;
210 if (pair_src->second != (mfxMemId)MFX_INFINITE)
211 pair_dst->second = pair_src->second;
219 return MFX_FOURCC_YV12;
221 return MFX_FOURCC_NV12;
223 return MFX_FOURCC_YUY2;
225 return MFX_FOURCC_RGB4;
228 return MFX_FOURCC_NV12;
233 switch (
frame->format) {
236 surface->Data.Y =
frame->data[0];
237 surface->Data.UV =
frame->data[1];
240 surface->Data.Y =
frame->data[0];
241 surface->Data.U =
frame->data[1];
242 surface->Data.V =
frame->data[2];
245 surface->Data.Y =
frame->data[0];
246 surface->Data.U =
frame->data[0] + 1;
247 surface->Data.V =
frame->data[0] + 3;
250 surface->Data.B =
frame->data[0];
251 surface->Data.G =
frame->data[0] + 1;
252 surface->Data.R =
frame->data[0] + 2;
253 surface->Data.A =
frame->data[0] + 3;
256 return MFX_ERR_UNSUPPORTED;
258 surface->Data.Pitch =
frame->linesize[0];
276 frames_hwctx = frames_ctx->
hwctx;
277 *frameinfo = frames_hwctx->
surfaces[0].Info;
284 frameinfo->CropX = 0;
285 frameinfo->CropY = 0;
288 frameinfo->PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
290 frameinfo->BitDepthLuma =
desc->comp[0].depth;
291 frameinfo->BitDepthChroma =
desc->comp[0].depth;
292 frameinfo->Shift =
desc->comp[0].depth > 8;
293 if (
desc->log2_chroma_w &&
desc->log2_chroma_h)
294 frameinfo->ChromaFormat = MFX_CHROMAFORMAT_YUV420;
295 else if (
desc->log2_chroma_w)
296 frameinfo->ChromaFormat = MFX_CHROMAFORMAT_YUV422;
298 frameinfo->ChromaFormat = MFX_CHROMAFORMAT_YUV444;
301 frameinfo->CropW =
link->w;
302 frameinfo->CropH =
link->h;
303 frameinfo->FrameRateExtN =
link->frame_rate.num;
304 frameinfo->FrameRateExtD =
link->frame_rate.den;
316 if ((
list->queued == 1) && !
list->surface.Data.Locked) {
330 *
list = (*list)->next;
392 if (!qsv_frame->
frame)
418 qsv_frame->
surface.Info.PicStruct =
421 MFX_PICSTRUCT_FIELD_BFF);
423 qsv_frame->
surface.Info.PicStruct |= MFX_PICSTRUCT_FIELD_REPEATED;
425 qsv_frame->
surface.Info.PicStruct |= MFX_PICSTRUCT_FRAME_DOUBLING;
427 qsv_frame->
surface.Info.PicStruct |= MFX_PICSTRUCT_FRAME_TRIPLING;
449 if (!out_frame->
frame)
465 if (!out_frame->
frame)
477 out_frame->
surface.Info =
s->vpp_param.vpp.Out;
494 mfxHandleType handle_type;
499 if (
inlink->hw_frames_ctx) {
503 in_frames_hwctx = frames_ctx->
hwctx;
508 sizeof(*
s->surface_ptrs_in));
509 if (!
s->surface_ptrs_in)
513 s->surface_ptrs_in[
i] = in_frames_hwctx->
surfaces +
i;
518 s->in_mem_mode = MFX_MEMTYPE_SYSTEM_MEMORY;
525 device_hwctx = device_ctx->
hwctx;
534 MFX_MEMTYPE_OPAQUE_FRAME :
535 MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET | MFX_MEMTYPE_FROM_VPPOUT;
538 out_frames_hwctx = out_frames_ctx->
hwctx;
557 sizeof(*
s->surface_ptrs_out));
558 if (!
s->surface_ptrs_out) {
564 s->surface_ptrs_out[
i] = out_frames_hwctx->
surfaces +
i;
570 s->out_mem_mode = MFX_MEMTYPE_SYSTEM_MEMORY;
573 ret = MFXQueryIMPL(device_hwctx->
session, &impl);
574 if (
ret == MFX_ERR_NONE)
575 ret = MFXQueryVersion(device_hwctx->
session, &ver);
576 if (
ret != MFX_ERR_NONE) {
582 handle_type = MFX_HANDLE_VA_DISPLAY;
584 handle_type = MFX_HANDLE_D3D11_DEVICE;
586 handle_type = MFX_HANDLE_D3D9_DEVICE_MANAGER;
592 ret = MFXVideoCORE_GetHandle(device_hwctx->
session, handle_type, &handle);
601 ret = MFXInit(impl, &ver, &
s->session);
610 ret = MFXVideoCORE_SetHandle(
s->session, handle_type, handle);
611 if (
ret != MFX_ERR_NONE)
616 ret = MFXJoinSession(device_hwctx->
session,
s->session);
617 if (
ret != MFX_ERR_NONE)
622 s->opaque_alloc.In.Surfaces =
s->surface_ptrs_in;
623 s->opaque_alloc.In.NumSurface =
s->nb_surface_ptrs_in;
624 s->opaque_alloc.In.Type =
s->in_mem_mode;
626 s->opaque_alloc.Out.Surfaces =
s->surface_ptrs_out;
627 s->opaque_alloc.Out.NumSurface =
s->nb_surface_ptrs_out;
628 s->opaque_alloc.Out.Type =
s->out_mem_mode;
630 s->opaque_alloc.Header.BufferId = MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION;
631 s->opaque_alloc.Header.BufferSz =
sizeof(
s->opaque_alloc);
633 mfxFrameAllocator frame_allocator = {
642 ret = MFXVideoCORE_SetFrameAllocator(
s->session, &frame_allocator);
643 if (
ret != MFX_ERR_NONE)
661 if (!
s->filter_frame)
671 if (!
s->frame_infos) {
690 s->frame_infos[crop->
in_idx].CropX = crop->
x;
691 s->frame_infos[crop->
in_idx].CropY = crop->
y;
692 s->frame_infos[crop->
in_idx].CropW = crop->
w;
693 s->frame_infos[crop->
in_idx].CropH = crop->
h;
696 s->vpp_param.vpp.In =
s->frame_infos[0];
706 s->ext_buffers =
av_calloc(
s->nb_ext_buffers,
sizeof(*
s->ext_buffers));
707 if (!
s->ext_buffers) {
712 s->ext_buffers[0] = (mfxExtBuffer *)&
s->opaque_alloc;
715 s->vpp_param.ExtParam =
s->ext_buffers;
716 s->vpp_param.NumExtParam =
s->nb_ext_buffers;
719 s->vpp_param.ExtParam = param->
ext_buf;
727 if (!
s->async_fifo) {
735 s->vpp_param.IOPattern |= MFX_IOPATTERN_IN_SYSTEM_MEMORY;
737 s->vpp_param.IOPattern |= MFX_IOPATTERN_IN_VIDEO_MEMORY;
739 s->vpp_param.IOPattern |= MFX_IOPATTERN_IN_OPAQUE_MEMORY;
742 s->vpp_param.IOPattern |= MFX_IOPATTERN_OUT_SYSTEM_MEMORY;
744 s->vpp_param.IOPattern |= MFX_IOPATTERN_OUT_VIDEO_MEMORY;
746 s->vpp_param.IOPattern |= MFX_IOPATTERN_OUT_OPAQUE_MEMORY;
752 ret = MFXVideoVPP_Init(
s->session, &
s->vpp_param);
776 MFXVideoVPP_Close(
s->session);
777 MFXClose(
s->session);
803 if (MFXVideoCORE_SyncOperation(
s->session, aframe.
sync, 1000) < 0)
806 filter_ret =
s->filter_frame(outlink, aframe.
frame->
frame);
807 if (filter_ret < 0) {
834 ret = MFXVideoVPP_RunFrameVPPAsync(
s->session, &in_frame->
surface,
836 if (
ret == MFX_WRN_DEVICE_BUSY)
838 }
while (
ret == MFX_WRN_DEVICE_BUSY);
840 if (
ret < 0 &&
ret != MFX_ERR_MORE_SURFACE) {
842 if (
ret == MFX_ERR_MORE_DATA)
857 ret = MFXVideoCORE_SyncOperation(
s->session, aframe.
sync, 1000);
858 }
while (
ret == MFX_WRN_IN_EXECUTION);
860 filter_ret =
s->filter_frame(outlink, aframe.
frame->
frame);
861 if (filter_ret < 0) {
870 }
while(
ret == MFX_ERR_MORE_SURFACE);
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
static mfxStatus frame_get_hdl(mfxHDL pthis, mfxMemId mid, mfxHDL *hdl)
void * hwctx
The format-specific data, allocated and freed by libavutil along with this context.
int frame_type
A combination of MFX_MEMTYPE_* describing the frame pool.
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
static const struct @217 qsv_errors[]
#define IS_OPAQUE_MEMORY(mode)
static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
static mfxStatus frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req, mfxFrameAllocResponse *resp)
enum AVPixelFormat out_sw_format
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
uint8_t * data
The data buffer.
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_hwframe_ctx_init(AVBufferRef *ref)
Finalize the context before use.
This structure describes decoded (raw) audio or video data.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
This struct is allocated as AVHWDeviceContext.hwctx.
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
Allocate an AVHWFramesContext tied to a given device context.
size_t av_fifo_can_read(const AVFifo *f)
int top_field_first
If the content is interlaced, is top field displayed first.
#define AV_LOG_VERBOSE
Detailed information.
AVBufferRef * hw_device_ctx
For filters which will create hardware frames, sets the device the filter should create them in.
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems)
Read data from a FIFO.
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
int width
The allocated dimensions of the frames in this pool.
A link between two filters.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int extra_hw_frames
Sets the number of extra hardware frames which the filter will allocate on its output links for use i...
static void clear_unused_frames(QSVFrame *list)
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
int ff_qsvvpp_print_iopattern(void *log_ctx, int mfx_iopattern, const char *extra_string)
#define MFX_IMPL_VIA_MASK(impl)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *param)
#define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR)
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
static enum AVPixelFormat pix_fmt
static const AVRational default_tb
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
int av_usleep(unsigned usec)
Sleep for a period of time.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a link
static int fill_frameinfo_by_link(mfxFrameInfo *frameinfo, AVFilterLink *link)
mfxFrameSurface1 * surfaces
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Rational number (pair of numerator and denominator).
AVBufferRef * device_ref
A reference to the parent AVHWDeviceContext.
static int pix_fmt_to_mfx_fourcc(int format)
int ff_qsvvpp_print_error(void *log_ctx, mfxStatus err, const char *error_string)
AVFilterLink ** inputs
array of pointers to input links
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining list
@ AV_PIX_FMT_QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
int ff_qsvvpp_free(QSVVPPContext **vpp)
unsigned nb_inputs
number of input pads
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
static const struct @216 qsv_iopatterns[]
int format
agreed upon media format
#define IS_VIDEO_MEMORY(mode)
static mfxStatus frame_unlock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
AVFilterContext * src
source filter
int interlaced_frame
The content of the picture is interlaced.
#define i(width, name, range_min, range_max)
int w
agreed upon image width
AVFifo * av_fifo_alloc2(size_t nb_elems, size_t elem_size, unsigned int flags)
Allocate and initialize an AVFifo with a given element size.
AVBufferRef * hw_frames_ctx
For hwaccel pixel formats, this should be a reference to the AVHWFramesContext describing the frames.
static mfxStatus frame_lock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
void av_fifo_freep2(AVFifo **f)
Free an AVFifo and reset pointer to NULL.
int(* filter_frame)(AVFilterLink *outlink, AVFrame *frame)
void * av_calloc(size_t nmemb, size_t size)
static int map_frame_to_surface(AVFrame *frame, mfxFrameSurface1 *surface)
This struct describes a set or pool of "hardware" frames (i.e.
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
void * hwctx
The format-specific data, allocated and freed automatically along with this context.
int av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems)
Write data into a FIFO.
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
AVBufferRef * hw_frames_ctx
For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame.
int ff_qsvvpp_filter_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *picref)
int h
agreed upon image height
#define FF_INLINK_IDX(link)
Find the index of a link.
static int qsv_map_error(mfxStatus mfx_err, const char **desc)
static void clear_frame_list(QSVFrame **list)
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link.
This struct is allocated as AVHWFramesContext.hwctx.
int initial_pool_size
Initial size of the frame pool.
A reference to a data buffer.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
#define IS_SYSTEM_MEMORY(mode)
static QSVFrame * get_free_frame(QSVFrame **list)
int av_hwframe_get_buffer(AVBufferRef *hwframe_ref, AVFrame *frame, int flags)
Allocate a new frame attached to the given AVHWFramesContext.
static mfxStatus frame_free(mfxHDL pthis, mfxFrameAllocResponse *resp)
int ff_qsvvpp_print_warning(void *log_ctx, mfxStatus err, const char *warning_string)
int repeat_pict
When decoding, this signals how much the picture must be delayed.
static QSVFrame * submit_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *picref)
AVFilterLink ** outputs
array of pointers to output links
static QSVFrame * query_frame(QSVVPPContext *s, AVFilterLink *outlink)