FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dxva2_hevc.c File Reference
#include "libavutil/avassert.h"
#include "hevc.h"
#include "dxva2_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)
 
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

#define MAX_SLICES   256
#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; \
} \
}
#define NULL
Definition: coverity.c:32
AVFormatContext * ctx
Definition: movenc-test.c:48
static int get_refpic_index(const DXVA_PicParams_HEVC *pp, int surface_index)
Definition: dxva2_hevc.c:50
static AVFrame * frame
#define FF_ARRAY_ELEMS(a)
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, const AVDXVAContext *ctx, const AVFrame *frame)
Definition: dxva2.c:37
if(ret< 0)
Definition: vf_mcdeint.c:282
for(j=16;j >0;--j)

Referenced by fill_picture_parameters().

Function Documentation

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 fill_picture_parameters().

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

Definition at line 50 of file dxva2_hevc.c.

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

Definition at line 60 of file dxva2_hevc.c.

Referenced by dxva2_hevc_start_frame().

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

Definition at line 203 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 231 of file dxva2_hevc.c.

Referenced by dxva2_hevc_decode_slice().

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

Definition at line 240 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 359 of file dxva2_hevc.c.

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.

static int dxva2_hevc_end_frame ( AVCodecContext avctx)
static

Definition at line 408 of file dxva2_hevc.c.