FFmpeg
Functions | Variables
vaapi_mpeg2.c File Reference
#include "hwaccel_internal.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "mpegvideodec.h"
#include "vaapi_decode.h"

Go to the source code of this file.

Functions

static int mpeg2_get_f_code (const MpegEncContext *s)
 Reconstruct bitstream f_code. More...
 
static int mpeg2_get_is_frame_start (const MpegEncContext *s)
 Determine frame start: first field for field picture or frame picture. More...
 
static int vaapi_mpeg2_start_frame (AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int vaapi_mpeg2_end_frame (AVCodecContext *avctx)
 
static int vaapi_mpeg2_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 

Variables

const FFHWAccel ff_mpeg2_vaapi_hwaccel
 

Function Documentation

◆ mpeg2_get_f_code()

static int mpeg2_get_f_code ( const MpegEncContext s)
inlinestatic

Reconstruct bitstream f_code.

Definition at line 30 of file vaapi_mpeg2.c.

Referenced by vaapi_mpeg2_start_frame().

◆ mpeg2_get_is_frame_start()

static int mpeg2_get_is_frame_start ( const MpegEncContext s)
inlinestatic

Determine frame start: first field for field picture or frame picture.

Definition at line 37 of file vaapi_mpeg2.c.

Referenced by vaapi_mpeg2_start_frame().

◆ vaapi_mpeg2_start_frame()

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

Definition at line 42 of file vaapi_mpeg2.c.

◆ vaapi_mpeg2_end_frame()

static int vaapi_mpeg2_end_frame ( AVCodecContext avctx)
static

Definition at line 115 of file vaapi_mpeg2.c.

◆ vaapi_mpeg2_decode_slice()

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

Definition at line 131 of file vaapi_mpeg2.c.

Variable Documentation

◆ ff_mpeg2_vaapi_hwaccel

const FFHWAccel ff_mpeg2_vaapi_hwaccel
Initial value:
= {
.p.name = "mpeg2_vaapi",
.p.type = AVMEDIA_TYPE_VIDEO,
.p.pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = &vaapi_mpeg2_start_frame,
.end_frame = &vaapi_mpeg2_end_frame,
.decode_slice = &vaapi_mpeg2_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,
}

Definition at line 175 of file vaapi_mpeg2.c.

VAAPIDecodeContext
Definition: vaapi_decode.h:47
VAAPIDecodePicture
Definition: vaapi_decode.h:35
ff_vaapi_decode_init
int ff_vaapi_decode_init(AVCodecContext *avctx)
Definition: vaapi_decode.c:692
ff_vaapi_common_frame_params
int ff_vaapi_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Definition: vaapi_decode.c:668
ff_vaapi_decode_uninit
int ff_vaapi_decode_uninit(AVCodecContext *avctx)
Definition: vaapi_decode.c:738
HWACCEL_CAP_ASYNC_SAFE
#define HWACCEL_CAP_ASYNC_SAFE
Header providing the internals of AVHWAccel.
Definition: hwaccel_internal.h:31
vaapi_mpeg2_start_frame
static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: vaapi_mpeg2.c:42
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AV_PIX_FMT_VAAPI
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition: pixfmt.h:126
vaapi_mpeg2_decode_slice
static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: vaapi_mpeg2.c:131
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
vaapi_mpeg2_end_frame
static int vaapi_mpeg2_end_frame(AVCodecContext *avctx)
Definition: vaapi_mpeg2.c:115
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_MPEG2VIDEO
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:54