FFmpeg
Loading...
Searching...
No Matches
vaapi_vc1.c File Reference
#include "config_components.h"
#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "hwaccel_internal.h"
#include "mpegvideodec.h"
#include "vaapi_decode.h"
#include "vc1.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.
 
static int vc1_has_MVTYPEMB_bitplane (const VC1Context *v)
 Check whether the MVTYPEMB bitplane is present.
 
static int vc1_has_SKIPMB_bitplane (const VC1Context *v)
 Check whether the SKIPMB bitplane is present.
 
static int vc1_has_DIRECTMB_bitplane (const VC1Context *v)
 Check whether the DIRECTMB bitplane is present.
 
static int vc1_has_ACPRED_bitplane (const VC1Context *v)
 Check whether the ACPRED bitplane is present.
 
static int vc1_has_OVERFLAGS_bitplane (const VC1Context *v)
 Check whether the OVERFLAGS bitplane is present.
 
static int vc1_has_FIELDTX_bitplane (const VC1Context *v)
 Check whether the FIELDTX bitplane is present.
 
static int vc1_has_FORWARDMB_bitplane (const VC1Context *v)
 Check whether the FORWARDMB bitplane is present.
 
static int vc1_get_PTYPE (const VC1Context *v)
 Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35)
 
static int vc1_get_FPTYPE (const VC1Context *v)
 Reconstruct bitstream FPTYPE (9.1.1.42, index into Table-105)
 
static VAMvModeVC1 vc1_get_MVMODE (const VC1Context *v)
 Reconstruct bitstream MVMODE (7.1.1.32)
 
static VAMvModeVC1 vc1_get_MVMODE2 (const VC1Context *v)
 Reconstruct bitstream MVMODE2 (7.1.1.33)
 
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)
 
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.
 
static int vaapi_vc1_start_frame (AVCodecContext *avctx, av_unused const AVBufferRef *buffer_ref, 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 FFHWAccel ff_vc1_vaapi_hwaccel
 

Function Documentation

◆ get_VAMvModeVC1()

static int get_VAMvModeVC1 ( enum MVModes mv_mode)
static

Translate FFmpeg MV modes to VA API.

Definition at line 33 of file vaapi_vc1.c.

Referenced by vc1_get_MVMODE(), and vc1_get_MVMODE2().

◆ vc1_has_MVTYPEMB_bitplane()

static int vc1_has_MVTYPEMB_bitplane ( const VC1Context * v)
inlinestatic

Check whether the MVTYPEMB bitplane is present.

Definition at line 46 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_has_SKIPMB_bitplane()

static int vc1_has_SKIPMB_bitplane ( const VC1Context * v)
inlinestatic

Check whether the SKIPMB bitplane is present.

Definition at line 58 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_has_DIRECTMB_bitplane()

static int vc1_has_DIRECTMB_bitplane ( const VC1Context * v)
inlinestatic

Check whether the DIRECTMB bitplane is present.

Definition at line 68 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_has_ACPRED_bitplane()

static int vc1_has_ACPRED_bitplane ( const VC1Context * v)
inlinestatic

Check whether the ACPRED bitplane is present.

Definition at line 77 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_has_OVERFLAGS_bitplane()

static int vc1_has_OVERFLAGS_bitplane ( const VC1Context * v)
inlinestatic

Check whether the OVERFLAGS bitplane is present.

Definition at line 87 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_has_FIELDTX_bitplane()

static int vc1_has_FIELDTX_bitplane ( const VC1Context * v)
inlinestatic

Check whether the FIELDTX bitplane is present.

Definition at line 99 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_has_FORWARDMB_bitplane()

static int vc1_has_FORWARDMB_bitplane ( const VC1Context * v)
inlinestatic

Check whether the FORWARDMB bitplane is present.

Definition at line 109 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_PTYPE()

static int vc1_get_PTYPE ( const VC1Context * v)
static

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

Definition at line 118 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_FPTYPE()

static int vc1_get_FPTYPE ( const VC1Context * v)
static

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

Definition at line 130 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_MVMODE()

static VAMvModeVC1 vc1_get_MVMODE ( const VC1Context * v)
inlinestatic

Reconstruct bitstream MVMODE (7.1.1.32)

Definition at line 142 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_MVMODE2()

static VAMvModeVC1 vc1_get_MVMODE2 ( const VC1Context * v)
inlinestatic

Reconstruct bitstream MVMODE2 (7.1.1.33)

Definition at line 152 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_INTCOMPFIELD()

static av_unused int vc1_get_INTCOMPFIELD ( const VC1Context * v)
inlinestatic

Definition at line 161 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_LUMSCALE()

static int vc1_get_LUMSCALE ( const VC1Context * v)
inlinestatic

Definition at line 174 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_LUMSHIFT()

static int vc1_get_LUMSHIFT ( const VC1Context * v)
inlinestatic

Definition at line 190 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_LUMSCALE2()

static av_unused int vc1_get_LUMSCALE2 ( const VC1Context * v)
inlinestatic

Definition at line 206 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_LUMSHIFT2()

static av_unused int vc1_get_LUMSHIFT2 ( const VC1Context * v)
inlinestatic

Definition at line 216 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_get_TTFRM()

static int vc1_get_TTFRM ( const VC1Context * v)
inlinestatic

Reconstruct bitstream TTFRM (7.1.1.41, Table-53)

Definition at line 227 of file vaapi_vc1.c.

Referenced by vaapi_vc1_start_frame().

◆ vc1_pack_bitplanes()

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 239 of file vaapi_vc1.c.

◆ vaapi_vc1_start_frame()

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

Definition at line 253 of file vaapi_vc1.c.

◆ vaapi_vc1_end_frame()

static int vaapi_vc1_end_frame ( AVCodecContext * avctx)
static

Definition at line 455 of file vaapi_vc1.c.

◆ vaapi_vc1_decode_slice()

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

Definition at line 470 of file vaapi_vc1.c.

Variable Documentation

◆ ff_vc1_vaapi_hwaccel

const FFHWAccel ff_vc1_vaapi_hwaccel
Initial value:
= {
.p.name = "vc1_vaapi",
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_VC1,
.p.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,
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
@ AV_CODEC_ID_VC1
Definition codec_id.h:120
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
#define HWACCEL_CAP_ASYNC_SAFE
Header providing the internals of AVHWAccel.
static av_cold void uninit(AVBitStreamFilterContext *ctx)
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition pixfmt.h:126
int ff_vaapi_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
int ff_vaapi_decode_init(AVCodecContext *avctx)
int ff_vaapi_decode_uninit(AVCodecContext *avctx)
static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const AVBufferRef *buffer_ref, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition vaapi_vc1.c:253
static int vaapi_vc1_end_frame(AVCodecContext *avctx)
Definition vaapi_vc1.c:455
static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition vaapi_vc1.c:470

Definition at line 527 of file vaapi_vc1.c.