FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
vaapi_vc1.c File Reference
#include "hwaccel.h"
#include "internal.h"
#include "vaapi_decode.h"
#include "vc1.h"
#include "vc1data.h"

Go to the source code of this file.

Functions

static int get_VAMvModeVC1 (enum MVModes mv_mode)
 Translate FFmpeg MV modes to VA API. More...
 
static int vc1_has_MVTYPEMB_bitplane (const VC1Context *v)
 Check whether the MVTYPEMB bitplane is present. More...
 
static int vc1_has_SKIPMB_bitplane (const VC1Context *v)
 Check whether the SKIPMB bitplane is present. More...
 
static int vc1_has_DIRECTMB_bitplane (const VC1Context *v)
 Check whether the DIRECTMB bitplane is present. More...
 
static int vc1_has_ACPRED_bitplane (const VC1Context *v)
 Check whether the ACPRED bitplane is present. More...
 
static int vc1_has_OVERFLAGS_bitplane (const VC1Context *v)
 Check whether the OVERFLAGS bitplane is present. More...
 
static int vc1_has_FIELDTX_bitplane (const VC1Context *v)
 Check whether the FIELDTX bitplane is present. More...
 
static int vc1_has_FORWARDMB_bitplane (const VC1Context *v)
 Check whether the FORWARDMB bitplane is present. More...
 
static int vc1_get_PTYPE (const VC1Context *v)
 Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35) More...
 
static int vc1_get_FPTYPE (const VC1Context *v)
 Reconstruct bitstream FPTYPE (9.1.1.42, index into Table-105) More...
 
static VAMvModeVC1 vc1_get_MVMODE (const VC1Context *v)
 Reconstruct bitstream MVMODE (7.1.1.32) More...
 
static VAMvModeVC1 vc1_get_MVMODE2 (const VC1Context *v)
 Reconstruct bitstream MVMODE2 (7.1.1.33) More...
 
static av_unused int vc1_get_INTCOMPFIELD (const VC1Context *v)
 
static int vc1_get_LUMSCALE (const VC1Context *v)
 
static int vc1_get_LUMSHIFT (const VC1Context *v)
 
static av_unused int vc1_get_LUMSCALE2 (const VC1Context *v)
 
static av_unused int vc1_get_LUMSHIFT2 (const VC1Context *v)
 
static int vc1_get_TTFRM (const VC1Context *v)
 Reconstruct bitstream TTFRM (7.1.1.41, Table-53) More...
 
static void vc1_pack_bitplanes (uint8_t *bitplane, int n, const uint8_t *ff_bp[3], int x, int y, int stride)
 Pack FFmpeg bitplanes into a VABitPlaneBuffer element. More...
 
static int vaapi_vc1_start_frame (AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int vaapi_vc1_end_frame (AVCodecContext *avctx)
 
static int vaapi_vc1_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 

Variables

const AVHWAccel ff_vc1_vaapi_hwaccel
 

Function Documentation

static int get_VAMvModeVC1 ( enum MVModes  mv_mode)
static

Translate FFmpeg MV modes to VA API.

Definition at line 30 of file vaapi_vc1.c.

Referenced by vc1_get_MVMODE(), and vc1_get_MVMODE2().

static int vc1_has_MVTYPEMB_bitplane ( const VC1Context v)
inlinestatic

Check whether the MVTYPEMB bitplane is present.

Definition at line 43 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_has_SKIPMB_bitplane ( const VC1Context v)
inlinestatic

Check whether the SKIPMB bitplane is present.

Definition at line 55 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_has_DIRECTMB_bitplane ( const VC1Context v)
inlinestatic

Check whether the DIRECTMB bitplane is present.

Definition at line 65 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_has_ACPRED_bitplane ( const VC1Context v)
inlinestatic

Check whether the ACPRED bitplane is present.

Definition at line 74 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_has_OVERFLAGS_bitplane ( const VC1Context v)
inlinestatic

Check whether the OVERFLAGS bitplane is present.

Definition at line 84 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_has_FIELDTX_bitplane ( const VC1Context v)
inlinestatic

Check whether the FIELDTX bitplane is present.

Definition at line 96 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_has_FORWARDMB_bitplane ( const VC1Context v)
inlinestatic

Check whether the FORWARDMB bitplane is present.

Definition at line 106 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_get_PTYPE ( const VC1Context v)
static

Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35)

Definition at line 115 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_get_FPTYPE ( const VC1Context v)
static

Reconstruct bitstream FPTYPE (9.1.1.42, index into Table-105)

Definition at line 127 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static VAMvModeVC1 vc1_get_MVMODE ( const VC1Context v)
inlinestatic

Reconstruct bitstream MVMODE (7.1.1.32)

Definition at line 139 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static VAMvModeVC1 vc1_get_MVMODE2 ( const VC1Context v)
inlinestatic

Reconstruct bitstream MVMODE2 (7.1.1.33)

Definition at line 149 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static av_unused int vc1_get_INTCOMPFIELD ( const VC1Context v)
inlinestatic

Definition at line 158 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_get_LUMSCALE ( const VC1Context v)
inlinestatic

Definition at line 171 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_get_LUMSHIFT ( const VC1Context v)
inlinestatic

Definition at line 187 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static av_unused int vc1_get_LUMSCALE2 ( const VC1Context v)
inlinestatic

Definition at line 203 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static av_unused int vc1_get_LUMSHIFT2 ( const VC1Context v)
inlinestatic

Definition at line 213 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static int vc1_get_TTFRM ( const VC1Context v)
inlinestatic

Reconstruct bitstream TTFRM (7.1.1.41, Table-53)

Definition at line 224 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

static void vc1_pack_bitplanes ( uint8_t bitplane,
int  n,
const uint8_t ff_bp[3],
int  x,
int  y,
int  stride 
)
inlinestatic

Pack FFmpeg bitplanes into a VABitPlaneBuffer element.

Definition at line 236 of file vaapi_vc1.c.

static int vaapi_vc1_start_frame ( AVCodecContext avctx,
av_unused const uint8_t buffer,
av_unused uint32_t  size 
)
static

Definition at line 250 of file vaapi_vc1.c.

static int vaapi_vc1_end_frame ( AVCodecContext avctx)
static

Definition at line 447 of file vaapi_vc1.c.

static int vaapi_vc1_decode_slice ( AVCodecContext avctx,
const uint8_t buffer,
uint32_t  size 
)
static

Definition at line 464 of file vaapi_vc1.c.

Variable Documentation

const AVHWAccel ff_vc1_vaapi_hwaccel
Initial value:
= {
.name = "vc1_vaapi",
.pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = &vaapi_vc1_start_frame,
.end_frame = &vaapi_vc1_end_frame,
.decode_slice = &vaapi_vc1_decode_slice,
.frame_priv_data_size = sizeof(VAAPIDecodePicture),
.frame_params = &ff_vaapi_common_frame_params,
.priv_data_size = sizeof(VAAPIDecodeContext),
.caps_internal = HWACCEL_CAP_ASYNC_SAFE,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
int ff_vaapi_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Definition: vaapi_decode.c:586
int ff_vaapi_decode_uninit(AVCodecContext *avctx)
Definition: vaapi_decode.c:699
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
static int vaapi_vc1_end_frame(AVCodecContext *avctx)
Definition: vaapi_vc1.c:447
static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: vaapi_vc1.c:464
int ff_vaapi_decode_init(AVCodecContext *avctx)
Definition: vaapi_decode.c:610
#define HWACCEL_CAP_ASYNC_SAFE
Definition: hwaccel.h:26
static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: vaapi_vc1.c:250

Definition at line 521 of file vaapi_vc1.c.