FFmpeg
Loading...
Searching...
No Matches
refs.c File Reference
#include "libavutil/container_fifo.h"
#include "libavutil/mem.h"
#include "libavutil/stereo3d.h"
#include "libavcodec/decode.h"
#include "hevc.h"
#include "hevcdec.h"
#include "libavcodec/progressframe.h"
#include "libavcodec/thread.h"
#include "libavutil/refstruct.h"

Go to the source code of this file.

Functions

void ff_hevc_unref_frame (HEVCFrame *frame, int flags)
 
const RefPicListff_hevc_get_ref_list (const HEVCFrame *ref, int x0, int y0)
 
void ff_hevc_clear_refs (HEVCLayerContext *l)
 Mark all frames in DPB as unused for reference.
 
void ff_hevc_flush_dpb (HEVCContext *s)
 Drop all frames currently in DPB.
 
static int replace_alpha_plane (AVFrame *alpha, AVFrame *base)
 
static HEVCFramealloc_frame (HEVCContext *s, HEVCLayerContext *l)
 
int ff_hevc_set_new_ref (HEVCContext *s, HEVCLayerContext *l, int poc)
 
static void unref_missing_refs (HEVCLayerContext *l)
 
int ff_hevc_output_frames (HEVCContext *s, unsigned layers_active_decode, unsigned layers_active_output, unsigned max_output, unsigned max_dpb, int discard)
 Find frames in the DPB that are ready for output and either write them to the output FIFO or drop their output flag, depending on the value of discard.
 
static int init_slice_rpl (HEVCContext *s)
 
int ff_hevc_slice_rpl (HEVCContext *s)
 Construct the reference picture list(s) for the current slice.
 
static HEVCFramefind_ref_idx (HEVCContext *s, HEVCLayerContext *l, int poc, uint8_t use_msb)
 
static void mark_ref (HEVCFrame *frame, int flag)
 
static HEVCFramegenerate_missing_ref (HEVCContext *s, HEVCLayerContext *l, int poc)
 
static int add_candidate_ref (HEVCContext *s, HEVCLayerContext *l, RefPicList *rps, int list_idx, int poc, int ref_flag, uint8_t use_msb)
 
int ff_hevc_frame_rps (HEVCContext *s, HEVCLayerContext *l)
 Construct the reference picture sets for the current frame.
 
int ff_hevc_frame_nb_refs (const SliceHeader *sh, const HEVCPPS *pps, unsigned layer_idx)
 Get the number of candidate references for the current frame.
 

Function Documentation

◆ ff_hevc_unref_frame()

◆ ff_hevc_get_ref_list()

const RefPicList * ff_hevc_get_ref_list ( const HEVCFrame * ref,
int x0,
int y0 )

Definition at line 57 of file refs.c.

Referenced by ff_hevc_deblocking_boundary_strengths().

◆ ff_hevc_clear_refs()

void ff_hevc_clear_refs ( HEVCLayerContext * l)

Mark all frames in DPB as unused for reference.

Definition at line 67 of file refs.c.

Referenced by hevc_frame_start().

◆ ff_hevc_flush_dpb()

void ff_hevc_flush_dpb ( HEVCContext * s)

Drop all frames currently in DPB.

Definition at line 76 of file refs.c.

Referenced by hevc_decode_flush().

◆ replace_alpha_plane()

static int replace_alpha_plane ( AVFrame * alpha,
AVFrame * base )
static

Definition at line 85 of file refs.c.

Referenced by alloc_frame().

◆ alloc_frame()

static HEVCFrame * alloc_frame ( HEVCContext * s,
HEVCLayerContext * l )
static

◆ ff_hevc_set_new_ref()

int ff_hevc_set_new_ref ( HEVCContext * s,
HEVCLayerContext * l,
int poc )

Definition at line 211 of file refs.c.

Referenced by hevc_frame_start().

◆ unref_missing_refs()

static void unref_missing_refs ( HEVCLayerContext * l)
static

Definition at line 257 of file refs.c.

Referenced by ff_hevc_frame_rps().

◆ ff_hevc_output_frames()

int ff_hevc_output_frames ( HEVCContext * s,
unsigned layers_active_decode,
unsigned layers_active_output,
unsigned max_output,
unsigned max_dpb,
int discard )

Find frames in the DPB that are ready for output and either write them to the output FIFO or drop their output flag, depending on the value of discard.

Parameters
max_outputmaximum number of AUs with an output-pending frame in at least one layer that can be present in the DPB before output is triggered
max_dpbmaximum number of any frames that can be present in the DPB for any layer before output is triggered

Definition at line 267 of file refs.c.

Referenced by hevc_frame_start(), and hevc_receive_frame().

◆ init_slice_rpl()

static int init_slice_rpl ( HEVCContext * s)
static

Definition at line 327 of file refs.c.

Referenced by ff_hevc_slice_rpl(), and ff_vvc_slice_rpl().

◆ ff_hevc_slice_rpl()

int ff_hevc_slice_rpl ( HEVCContext * s)

Construct the reference picture list(s) for the current slice.

Definition at line 345 of file refs.c.

Referenced by decode_slice_data().

◆ find_ref_idx()

static HEVCFrame * find_ref_idx ( HEVCContext * s,
HEVCLayerContext * l,
int poc,
uint8_t use_msb )
static

Definition at line 439 of file refs.c.

Referenced by add_candidate_ref(), and add_candidate_ref().

◆ mark_ref()

static void mark_ref ( HEVCFrame * frame,
int flag )
static

Definition at line 459 of file refs.c.

Referenced by add_candidate_ref(), add_candidate_ref(), ff_hevc_frame_rps(), and ff_vvc_frame_rpl().

◆ generate_missing_ref()

static HEVCFrame * generate_missing_ref ( HEVCContext * s,
HEVCLayerContext * l,
int poc )
static

Definition at line 465 of file refs.c.

Referenced by add_candidate_ref(), and add_candidate_ref().

◆ add_candidate_ref()

static int add_candidate_ref ( HEVCContext * s,
HEVCLayerContext * l,
RefPicList * rps,
int list_idx,
int poc,
int ref_flag,
uint8_t use_msb )
static

Definition at line 499 of file refs.c.

Referenced by ff_hevc_frame_rps(), and ff_vvc_slice_rpl().

◆ ff_hevc_frame_rps()

int ff_hevc_frame_rps ( HEVCContext * s,
HEVCLayerContext * l )

Construct the reference picture sets for the current frame.

Definition at line 537 of file refs.c.

Referenced by hevc_frame_start().

◆ ff_hevc_frame_nb_refs()

int ff_hevc_frame_nb_refs ( const SliceHeader * sh,
const HEVCPPS * pps,
unsigned layer_idx )

Get the number of candidate references for the current frame.

Definition at line 617 of file refs.c.

Referenced by hls_slice_header(), nvdec_hevc_start_frame(), and vdpau_hevc_start_frame().