dxva2_mpeg2.c File Reference
#include "dxva2_internal.h"
Include dependency graph for dxva2_mpeg2.c:

Go to the source code of this file.

Data Structures

struct  dxva2_picture_context
 

Macros

#define MAX_SLICES   (SLICE_MAX_START_CODE - SLICE_MIN_START_CODE + 1)
 

Functions

static void fill_picture_parameters (AVCodecContext *avctx, struct dxva_context *ctx, const struct MpegEncContext *s, DXVA_PictureParameters *pp)
 
static void fill_quantization_matrices (AVCodecContext *avctx, struct dxva_context *ctx, const struct MpegEncContext *s, DXVA_QmatrixData *qm)
 
static void fill_slice (AVCodecContext *avctx, const struct MpegEncContext *s, DXVA_SliceInfo *slice, unsigned position, const uint8_t *buffer, unsigned size)
 
static int commit_bitstream_and_slice_buffer (AVCodecContext *avctx, DXVA2_DecodeBufferDesc *bs, DXVA2_DecodeBufferDesc *sc)
 
static int dxva2_mpeg2_start_frame (AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int dxva2_mpeg2_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static int dxva2_mpeg2_end_frame (AVCodecContext *avctx)
 

Variables

AVHWAccel ff_mpeg2_dxva2_hwaccel
 

Macro Definition Documentation

Function Documentation

static int commit_bitstream_and_slice_buffer ( AVCodecContext avctx,
DXVA2_DecodeBufferDesc *  bs,
DXVA2_DecodeBufferDesc *  sc 
)
static

Definition at line 147 of file dxva2_mpeg2.c.

Referenced by dxva2_mpeg2_end_frame().

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

Definition at line 228 of file dxva2_mpeg2.c.

static int dxva2_mpeg2_end_frame ( AVCodecContext avctx)
static

Definition at line 249 of file dxva2_mpeg2.c.

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

Definition at line 206 of file dxva2_mpeg2.c.

static void fill_picture_parameters ( AVCodecContext avctx,
struct dxva_context ctx,
const struct MpegEncContext s,
DXVA_PictureParameters *  pp 
)
static

Definition at line 36 of file dxva2_mpeg2.c.

Referenced by dxva2_mpeg2_start_frame().

static void fill_quantization_matrices ( AVCodecContext avctx,
struct dxva_context ctx,
const struct MpegEncContext s,
DXVA_QmatrixData *  qm 
)
static

Definition at line 102 of file dxva2_mpeg2.c.

Referenced by dxva2_mpeg2_start_frame().

static void fill_slice ( AVCodecContext avctx,
const struct MpegEncContext s,
DXVA_SliceInfo *  slice,
unsigned  position,
const uint8_t buffer,
unsigned  size 
)
static

Definition at line 119 of file dxva2_mpeg2.c.

Referenced by dxva2_mpeg2_decode_slice().

Variable Documentation

AVHWAccel ff_mpeg2_dxva2_hwaccel
Initial value:
= {
.name = "mpeg2_dxva2",
.start_frame = dxva2_mpeg2_start_frame,
.decode_slice = dxva2_mpeg2_decode_slice,
.end_frame = dxva2_mpeg2_end_frame,
.priv_data_size = sizeof(struct dxva2_picture_context),
}
static int dxva2_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: dxva2_mpeg2.c:206
static int dxva2_mpeg2_end_frame(AVCodecContext *avctx)
Definition: dxva2_mpeg2.c:249
static int dxva2_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: dxva2_mpeg2.c:228
preferred ID for MPEG-1/2 video decoding
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer. ...
Definition: pixfmt.h:135

Definition at line 267 of file dxva2_mpeg2.c.