FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
dxva2_hevc.c File Reference
#include "libavutil/avassert.h"
#include "dxva2_internal.h"
#include "hevc.h"

Go to the source code of this file.

Data Structures

struct  hevc_dxva2_picture_context
 

Macros

#define MAX_SLICES   256
 
#define DO_REF_LIST(ref_idx, ref_list)
 

Functions

static void fill_picture_entry (DXVA_PicEntry_HEVC *pic, unsigned index, unsigned flag)
 
static int get_refpic_index (const DXVA_PicParams_HEVC *pp, int surface_index)
 
static void fill_picture_parameters (struct dxva_context *ctx, const HEVCContext *h, DXVA_PicParams_HEVC *pp)
 
static void fill_scaling_lists (struct dxva_context *ctx, const HEVCContext *h, DXVA_Qmatrix_HEVC *qm)
 
static void fill_slice_short (DXVA_Slice_HEVC_Short *slice, unsigned position, unsigned size)
 
static int commit_bitstream_and_slice_buffer (AVCodecContext *avctx, DXVA2_DecodeBufferDesc *bs, DXVA2_DecodeBufferDesc *sc)
 
static int dxva2_hevc_start_frame (AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int dxva2_hevc_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static int dxva2_hevc_end_frame (AVCodecContext *avctx)
 

Variables

AVHWAccel ff_hevc_dxva2_hwaccel
 

Macro Definition Documentation

#define MAX_SLICES   256
#define DO_REF_LIST (   ref_idx,
  ref_list 
)
Value:
{ \
const RefPicList *rpl = &h->rps[ref_idx]; \
av_assert0(rpl->nb_refs <= FF_ARRAY_ELEMS(pp->ref_list)); \
for (j = 0, k = 0; j < rpl->nb_refs; j++) { \
if (rpl->ref[j]) { \
pp->ref_list[k] = get_refpic_index(pp, ff_dxva2_get_surface_index(ctx, rpl->ref[j]->frame)); \
k++; \
} \
} \
}

Referenced by fill_picture_parameters().

Function Documentation

static void fill_picture_entry ( DXVA_PicEntry_HEVC *  pic,
unsigned  index,
unsigned  flag 
)
static

Definition at line 39 of file dxva2_hevc.c.

Referenced by fill_picture_parameters().

static int get_refpic_index ( const DXVA_PicParams_HEVC *  pp,
int  surface_index 
)
static

Definition at line 46 of file dxva2_hevc.c.

static void fill_picture_parameters ( struct dxva_context ctx,
const HEVCContext h,
DXVA_PicParams_HEVC *  pp 
)
static

Definition at line 56 of file dxva2_hevc.c.

Referenced by dxva2_hevc_start_frame().

static void fill_scaling_lists ( struct dxva_context ctx,
const HEVCContext h,
DXVA_Qmatrix_HEVC *  qm 
)
static

Definition at line 193 of file dxva2_hevc.c.

Referenced by dxva2_hevc_start_frame().

static void fill_slice_short ( DXVA_Slice_HEVC_Short *  slice,
unsigned  position,
unsigned  size 
)
static

Definition at line 221 of file dxva2_hevc.c.

Referenced by dxva2_hevc_decode_slice().

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

Definition at line 230 of file dxva2_hevc.c.

Referenced by dxva2_hevc_end_frame().

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

Definition at line 308 of file dxva2_hevc.c.

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

Definition at line 332 of file dxva2_hevc.c.

static int dxva2_hevc_end_frame ( AVCodecContext avctx)
static

Definition at line 355 of file dxva2_hevc.c.

Variable Documentation

AVHWAccel ff_hevc_dxva2_hwaccel
Initial value:
= {
.name = "hevc_dxva2",
.start_frame = dxva2_hevc_start_frame,
.decode_slice = dxva2_hevc_decode_slice,
.end_frame = dxva2_hevc_end_frame,
.frame_priv_data_size = sizeof(struct hevc_dxva2_picture_context),
}

Definition at line 372 of file dxva2_hevc.c.