FFmpeg
Data Structures | Macros | Functions
dxva2_hevc.c File Reference
#include "libavutil/avassert.h"
#include "dxva2_internal.h"
#include "hevc_data.h"
#include "hevcdec.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 (const AVCodecContext *avctx, AVDXVAContext *ctx, const HEVCContext *h, DXVA_PicParams_HEVC *pp)
 
static void fill_scaling_lists (AVDXVAContext *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, 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 29 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++]; \
if (frame) \
pp->ref_list[i] = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, frame->frame)); \
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 40 of file dxva2_hevc.c.

Referenced by fill_picture_parameters().

◆ get_refpic_index()

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

Definition at line 47 of file dxva2_hevc.c.

◆ fill_picture_parameters()

static void fill_picture_parameters ( const AVCodecContext avctx,
AVDXVAContext ctx,
const HEVCContext h,
DXVA_PicParams_HEVC *  pp 
)
static

Definition at line 57 of file dxva2_hevc.c.

Referenced by dxva2_hevc_start_frame().

◆ fill_scaling_lists()

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

Definition at line 200 of file dxva2_hevc.c.

Referenced by 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 228 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 237 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 356 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 380 of file dxva2_hevc.c.

◆ dxva2_hevc_end_frame()

static int dxva2_hevc_end_frame ( AVCodecContext avctx)
static

Definition at line 403 of file dxva2_hevc.c.

RefPicList
Definition: hevcdec.h:238
ctx
AVFormatContext * ctx
Definition: movenc.c:48
NULL
#define NULL
Definition: coverity.c:32
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
HEVCFrame
Definition: hevcdec.h:395
ff_dxva2_get_surface_index
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, const AVDXVAContext *ctx, const AVFrame *frame)
Definition: dxva2.c:764
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen_template.c:38
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:47