FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
qsv.c File Reference
#include <string.h>
#include <sys/types.h>
#include <mfx/mfxvideo.h>
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
#include "libavutil/time.h"
#include "avcodec.h"
#include "internal.h"
#include "qsv_internal.h"

Go to the source code of this file.

Functions

int ff_qsv_error (int mfx_err)
 Convert a libmfx error code into a ffmpeg error code.
 
int ff_qsv_map_pixfmt (enum AVPixelFormat format)
 
static int codec_id_to_mfx (enum AVCodecID codec_id)
 
static int qsv_init_session (AVCodecContext *avctx, QSVContext *q, mfxSession session)
 
int ff_qsv_init (AVCodecContext *avctx, QSVContext *q, mfxSession session)
 
static int alloc_frame (AVCodecContext *avctx, QSVFrame *frame)
 
static void qsv_clear_unused_frames (QSVContext *q)
 
static int get_surface (AVCodecContext *avctx, QSVContext *q, mfxFrameSurface1 **surf)
 
static AVFramefind_frame (QSVContext *q, mfxFrameSurface1 *surf)
 
int ff_qsv_decode (AVCodecContext *avctx, QSVContext *q, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
int ff_qsv_close (QSVContext *q)
 

Function Documentation

int ff_qsv_error ( int  mfx_err)

Convert a libmfx error code into a ffmpeg error code.

Definition at line 39 of file qsv.c.

Referenced by ff_qsv_decode(), ff_qsv_init(), and qsv_init_session().

int ff_qsv_map_pixfmt ( enum AVPixelFormat  format)

Definition at line 74 of file qsv.c.

Referenced by qsv_process_data().

static int codec_id_to_mfx ( enum AVCodecID  codec_id)
static

Definition at line 85 of file qsv.c.

Referenced by ff_qsv_init().

static int qsv_init_session ( AVCodecContext avctx,
QSVContext q,
mfxSession  session 
)
static

Definition at line 102 of file qsv.c.

Referenced by ff_qsv_init().

int ff_qsv_init ( AVCodecContext avctx,
QSVContext q,
mfxSession  session 
)

Definition at line 143 of file qsv.c.

Referenced by qsv_process_data().

static int alloc_frame ( AVCodecContext avctx,
QSVFrame frame 
)
static

Definition at line 185 of file qsv.c.

Referenced by get_surface().

static void qsv_clear_unused_frames ( QSVContext q)
static

Definition at line 213 of file qsv.c.

Referenced by get_surface().

static int get_surface ( AVCodecContext avctx,
QSVContext q,
mfxFrameSurface1 **  surf 
)
static

Definition at line 225 of file qsv.c.

Referenced by ff_qsv_decode().

static AVFrame* find_frame ( QSVContext q,
mfxFrameSurface1 *  surf 
)
static

Definition at line 266 of file qsv.c.

Referenced by ff_qsv_decode().

int ff_qsv_decode ( AVCodecContext avctx,
QSVContext q,
AVFrame frame,
int *  got_frame,
AVPacket avpkt 
)

Definition at line 277 of file qsv.c.

Referenced by qsv_decode_frame(), and qsv_process_data().

int ff_qsv_close ( QSVContext q)

Definition at line 347 of file qsv.c.

Referenced by qsv_decode_close().