FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
qsvdec.c File Reference

Intel QSV-accelerated H.264 decoding example. More...

#include "config.h"
#include <stdio.h>
#include <mfx/mfxvideo.h>
#include <va/va.h>
#include <va/va_x11.h>
#include <X11/Xlib.h>
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/qsv.h"
#include "libavutil/error.h"
#include "libavutil/mem.h"

Go to the source code of this file.

Data Structures

struct  DecodeContext
 

Functions

static mfxStatus frame_alloc (mfxHDL pthis, mfxFrameAllocRequest *req, mfxFrameAllocResponse *resp)
 
static mfxStatus frame_free (mfxHDL pthis, mfxFrameAllocResponse *resp)
 
static mfxStatus frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
 
static mfxStatus frame_unlock (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
 
static mfxStatus frame_get_hdl (mfxHDL pthis, mfxMemId mid, mfxHDL *hdl)
 
static void free_surfaces (DecodeContext *decode)
 
static void free_buffer (void *opaque, uint8_t *data)
 
static int get_buffer (AVCodecContext *avctx, AVFrame *frame, int flags)
 
static int get_format (AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts)
 
static int decode_packet (DecodeContext *decode, AVCodecContext *decoder_ctx, AVFrame *frame, AVPacket *pkt, AVIOContext *output_ctx)
 
int main (int argc, char **argv)
 

Detailed Description

Intel QSV-accelerated H.264 decoding example.

Definition in file qsvdec.c.

Function Documentation

static mfxStatus frame_alloc ( mfxHDL  pthis,
mfxFrameAllocRequest *  req,
mfxFrameAllocResponse *  resp 
)
static
Examples:
qsvdec.c.

Definition at line 63 of file qsvdec.c.

Referenced by main().

static mfxStatus frame_free ( mfxHDL  pthis,
mfxFrameAllocResponse *  resp 
)
static
Examples:
qsvdec.c.

Definition at line 117 of file qsvdec.c.

Referenced by main().

static mfxStatus frame_lock ( mfxHDL  pthis,
mfxMemId  mid,
mfxFrameData *  ptr 
)
static
Examples:
qsvdec.c.

Definition at line 122 of file qsvdec.c.

Referenced by main().

static mfxStatus frame_unlock ( mfxHDL  pthis,
mfxMemId  mid,
mfxFrameData *  ptr 
)
static
Examples:
qsvdec.c.

Definition at line 127 of file qsvdec.c.

Referenced by main().

static mfxStatus frame_get_hdl ( mfxHDL  pthis,
mfxMemId  mid,
mfxHDL *  hdl 
)
static
Examples:
qsvdec.c.

Definition at line 132 of file qsvdec.c.

Referenced by main().

static void free_surfaces ( DecodeContext decode)
static
Examples:
qsvdec.c.

Definition at line 138 of file qsvdec.c.

Referenced by main().

static void free_buffer ( void opaque,
uint8_t data 
)
static
Examples:
qsvdec.c.

Definition at line 148 of file qsvdec.c.

Referenced by get_buffer().

static int get_buffer ( AVCodecContext avctx,
AVFrame frame,
int  flags 
)
static
Examples:
qsvdec.c.

Definition at line 155 of file qsvdec.c.

Referenced by main().

static int get_format ( AVCodecContext avctx,
const enum AVPixelFormat pix_fmts 
)
static
Examples:
qsvdec.c.

Definition at line 193 of file qsvdec.c.

Referenced by main().

static int decode_packet ( DecodeContext decode,
AVCodecContext decoder_ctx,
AVFrame frame,
AVPacket pkt,
AVIOContext output_ctx 
)
static
Examples:
qsvdec.c.

Definition at line 220 of file qsvdec.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)
Examples:
qsvdec.c.

Definition at line 306 of file qsvdec.c.