FFmpeg
Data Structures | Macros | Functions
dxva2_hevc.c File Reference
#include "config_components.h"
#include "libavutil/avassert.h"
#include "dxva2_internal.h"
#include "hevc_data.h"
#include "hevcdec.h"
#include "hwaccel_internal.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)
 
void ff_dxva2_hevc_fill_picture_parameters (const AVCodecContext *avctx, AVDXVAContext *ctx, DXVA_PicParams_HEVC *pp)
 
void ff_dxva2_hevc_fill_scaling_lists (const AVCodecContext *avctx, AVDXVAContext *ctx, 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, DECODER_BUFFER_DESC *bs, DECODER_BUFFER_DESC *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)
 

Macro Definition Documentation

◆ MAX_SLICES

#define MAX_SLICES   256

Definition at line 32 of file dxva2_hevc.c.

◆ DO_REF_LIST

#define DO_REF_LIST (   ref_idx,
  ref_list 
)
Value:
{ \
const RefPicList *rpl = &h->rps[ref_idx]; \
for (i = 0, j = 0; i < FF_ARRAY_ELEMS(pp->ref_list); i++) { \
const HEVCFrame *frame = NULL; \
while (!frame && j < rpl->nb_refs) \
frame = rpl->ref[j++]; \
pp->ref_list[i] = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, frame->frame, 0)); \
else \
pp->ref_list[i] = 0xff; \
} \
}

Function Documentation

◆ fill_picture_entry()

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

Definition at line 43 of file dxva2_hevc.c.

Referenced by ff_dxva2_hevc_fill_picture_parameters().

◆ get_refpic_index()

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

Definition at line 50 of file dxva2_hevc.c.

◆ ff_dxva2_hevc_fill_picture_parameters()

void ff_dxva2_hevc_fill_picture_parameters ( const AVCodecContext avctx,
AVDXVAContext ctx,
DXVA_PicParams_HEVC *  pp 
)

Definition at line 60 of file dxva2_hevc.c.

Referenced by d3d12va_hevc_start_frame(), and dxva2_hevc_start_frame().

◆ ff_dxva2_hevc_fill_scaling_lists()

void ff_dxva2_hevc_fill_scaling_lists ( const AVCodecContext avctx,
AVDXVAContext ctx,
DXVA_Qmatrix_HEVC *  qm 
)

Definition at line 204 of file dxva2_hevc.c.

Referenced by d3d12va_hevc_start_frame(), and dxva2_hevc_start_frame().

◆ fill_slice_short()

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

Definition at line 233 of file dxva2_hevc.c.

Referenced by dxva2_hevc_decode_slice().

◆ commit_bitstream_and_slice_buffer()

static int commit_bitstream_and_slice_buffer ( AVCodecContext avctx,
DECODER_BUFFER_DESC bs,
DECODER_BUFFER_DESC sc 
)
static

Definition at line 242 of file dxva2_hevc.c.

Referenced by dxva2_hevc_end_frame().

◆ dxva2_hevc_start_frame()

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

Definition at line 361 of file dxva2_hevc.c.

◆ dxva2_hevc_decode_slice()

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

Definition at line 385 of file dxva2_hevc.c.

◆ dxva2_hevc_end_frame()

static int dxva2_hevc_end_frame ( AVCodecContext avctx)
static

Definition at line 408 of file dxva2_hevc.c.

AVFrame::flags
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
Definition: frame.h:616
RefPicList
Definition: hevcdec.h:189
HEVC_FRAME_FLAG_LONG_REF
#define HEVC_FRAME_FLAG_LONG_REF
Definition: hevcdec.h:348
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
ctx
AVFormatContext * ctx
Definition: movenc.c:48
HEVC_FRAME_FLAG_SHORT_REF
#define HEVC_FRAME_FLAG_SHORT_REF
Definition: hevcdec.h:347
frame
static AVFrame * frame
Definition: demux_decode.c:54
NULL
#define NULL
Definition: coverity.c:32
ff_dxva2_get_surface_index
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, AVDXVAContext *ctx, const AVFrame *frame, int curr)
Definition: dxva2.c:770
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
HEVCFrame
Definition: hevcdec.h:354
h
h
Definition: vp9dsp_template.c:2038
get_refpic_index
static int get_refpic_index(const DXVA_PicParams_HEVC *pp, int surface_index)
Definition: dxva2_hevc.c:50