FFmpeg
Data Structures | Macros | Functions
vvc_refs.c File Reference
#include <stdatomic.h>
#include "libavutil/thread.h"
#include "libavcodec/refstruct.h"
#include "libavcodec/thread.h"
#include "vvc_refs.h"

Go to the source code of this file.

Data Structures

struct  FrameProgress
 

Macros

#define VVC_FRAME_FLAG_OUTPUT   (1 << 0)
 
#define VVC_FRAME_FLAG_SHORT_REF   (1 << 1)
 
#define VVC_FRAME_FLAG_LONG_REF   (1 << 2)
 
#define VVC_FRAME_FLAG_BUMPING   (1 << 3)
 

Functions

void ff_vvc_unref_frame (VVCFrameContext *fc, VVCFrame *frame, int flags)
 
const RefPicListff_vvc_get_ref_list (const VVCFrameContext *fc, const VVCFrame *ref, int x0, int y0)
 
void ff_vvc_clear_refs (VVCFrameContext *fc)
 
void ff_vvc_flush_dpb (VVCFrameContext *fc)
 
static void free_progress (FFRefStructOpaque unused, void *obj)
 
static FrameProgressalloc_progress (void)
 
static VVCFramealloc_frame (VVCContext *s, VVCFrameContext *fc)
 
int ff_vvc_set_new_ref (VVCContext *s, VVCFrameContext *fc, AVFrame **frame)
 
int ff_vvc_output_frame (VVCContext *s, VVCFrameContext *fc, AVFrame *out, const int no_output_of_prior_pics_flag, int flush)
 
void ff_vvc_bump_frame (VVCContext *s, VVCFrameContext *fc)
 
static VVCFramefind_ref_idx (VVCContext *s, VVCFrameContext *fc, int poc, uint8_t use_msb)
 
static void mark_ref (VVCFrame *frame, int flag)
 
static VVCFramegenerate_missing_ref (VVCContext *s, VVCFrameContext *fc, int poc)
 
static int add_candidate_ref (VVCContext *s, VVCFrameContext *fc, RefPicList *list, int poc, int ref_flag, uint8_t use_msb)
 
static int init_slice_rpl (const VVCFrameContext *fc, SliceContext *sc)
 
static int delta_poc_st (const H266RefPicListStruct *rpls, const int lx, const int i, const VVCSPS *sps)
 
static int poc_lt (int *prev_delta_poc_msb, const int poc, const H266RefPicLists *ref_lists, const int lx, const int j, const int max_poc_lsb)
 
int ff_vvc_slice_rpl (VVCContext *s, VVCFrameContext *fc, SliceContext *sc)
 
int ff_vvc_frame_rpl (VVCContext *s, VVCFrameContext *fc, SliceContext *sc)
 
void ff_vvc_report_frame_finished (VVCFrame *frame)
 
static int is_progress_done (const FrameProgress *p, const VVCProgressListener *l)
 
static void add_listener (VVCProgressListener **prev, VVCProgressListener *l)
 
static VVCProgressListenerremove_listener (VVCProgressListener **prev, VVCProgressListener *l)
 
static VVCProgressListenerget_done_listener (FrameProgress *p, const VVCProgress vp)
 
void ff_vvc_report_progress (VVCFrame *frame, const VVCProgress vp, const int y)
 
void ff_vvc_add_progress_listener (VVCFrame *frame, VVCProgressListener *l)
 

Macro Definition Documentation

◆ VVC_FRAME_FLAG_OUTPUT

#define VVC_FRAME_FLAG_OUTPUT   (1 << 0)

Definition at line 31 of file vvc_refs.c.

◆ VVC_FRAME_FLAG_SHORT_REF

#define VVC_FRAME_FLAG_SHORT_REF   (1 << 1)

Definition at line 32 of file vvc_refs.c.

◆ VVC_FRAME_FLAG_LONG_REF

#define VVC_FRAME_FLAG_LONG_REF   (1 << 2)

Definition at line 33 of file vvc_refs.c.

◆ VVC_FRAME_FLAG_BUMPING

#define VVC_FRAME_FLAG_BUMPING   (1 << 3)

Definition at line 34 of file vvc_refs.c.

Function Documentation

◆ ff_vvc_unref_frame()

void ff_vvc_unref_frame ( VVCFrameContext fc,
VVCFrame frame,
int  flags 
)

◆ ff_vvc_get_ref_list()

const RefPicList* ff_vvc_get_ref_list ( const VVCFrameContext fc,
const VVCFrame ref,
int  x0,
int  y0 
)

Definition at line 66 of file vvc_refs.c.

Referenced by vvc_deblock_bs_luma_horizontal(), and vvc_deblock_bs_luma_vertical().

◆ ff_vvc_clear_refs()

void ff_vvc_clear_refs ( VVCFrameContext fc)

Definition at line 76 of file vvc_refs.c.

Referenced by frame_context_setup().

◆ ff_vvc_flush_dpb()

void ff_vvc_flush_dpb ( VVCFrameContext fc)

Definition at line 83 of file vvc_refs.c.

Referenced by vvc_decode_flush().

◆ free_progress()

static void free_progress ( FFRefStructOpaque  unused,
void *  obj 
)
static

Definition at line 89 of file vvc_refs.c.

Referenced by alloc_progress().

◆ alloc_progress()

static FrameProgress* alloc_progress ( void  )
static

Definition at line 99 of file vvc_refs.c.

Referenced by alloc_frame().

◆ alloc_frame()

static VVCFrame* alloc_frame ( VVCContext s,
VVCFrameContext fc 
)
static

Definition at line 112 of file vvc_refs.c.

Referenced by ff_vvc_set_new_ref(), and generate_missing_ref().

◆ ff_vvc_set_new_ref()

int ff_vvc_set_new_ref ( VVCContext s,
VVCFrameContext fc,
AVFrame **  frame 
)

Definition at line 154 of file vvc_refs.c.

Referenced by frame_start().

◆ ff_vvc_output_frame()

int ff_vvc_output_frame ( VVCContext s,
VVCFrameContext fc,
AVFrame out,
const int  no_output_of_prior_pics_flag,
int  flush 
)

Definition at line 196 of file vvc_refs.c.

Referenced by frame_start(), and get_decoded_frame().

◆ ff_vvc_bump_frame()

void ff_vvc_bump_frame ( VVCContext s,
VVCFrameContext fc 
)

Definition at line 255 of file vvc_refs.c.

Referenced by frame_start().

◆ find_ref_idx()

static VVCFrame* find_ref_idx ( VVCContext s,
VVCFrameContext fc,
int  poc,
uint8_t  use_msb 
)
static

Definition at line 296 of file vvc_refs.c.

Referenced by add_candidate_ref().

◆ mark_ref()

static void mark_ref ( VVCFrame frame,
int  flag 
)
static

Definition at line 310 of file vvc_refs.c.

Referenced by add_candidate_ref(), and ff_vvc_frame_rpl().

◆ generate_missing_ref()

static VVCFrame* generate_missing_ref ( VVCContext s,
VVCFrameContext fc,
int  poc 
)
static

Definition at line 316 of file vvc_refs.c.

Referenced by add_candidate_ref().

◆ add_candidate_ref()

static int add_candidate_ref ( VVCContext s,
VVCFrameContext fc,
RefPicList list,
int  poc,
int  ref_flag,
uint8_t  use_msb 
)
static

Definition at line 351 of file vvc_refs.c.

Referenced by ff_vvc_slice_rpl().

◆ init_slice_rpl()

static int init_slice_rpl ( const VVCFrameContext fc,
SliceContext sc 
)
static

Definition at line 374 of file vvc_refs.c.

Referenced by ff_vvc_slice_rpl().

◆ delta_poc_st()

static int delta_poc_st ( const H266RefPicListStruct rpls,
const int  lx,
const int  i,
const VVCSPS sps 
)
static

Definition at line 392 of file vvc_refs.c.

Referenced by ff_vvc_slice_rpl(), and ref_pic_list_struct().

◆ poc_lt()

static int poc_lt ( int prev_delta_poc_msb,
const int  poc,
const H266RefPicLists ref_lists,
const int  lx,
const int  j,
const int  max_poc_lsb 
)
static

Definition at line 402 of file vvc_refs.c.

Referenced by ff_vvc_slice_rpl().

◆ ff_vvc_slice_rpl()

int ff_vvc_slice_rpl ( VVCContext s,
VVCFrameContext fc,
SliceContext sc 
)

Definition at line 416 of file vvc_refs.c.

Referenced by ff_vvc_frame_rpl(), and slice_start().

◆ ff_vvc_frame_rpl()

int ff_vvc_frame_rpl ( VVCContext s,
VVCFrameContext fc,
SliceContext sc 
)

Definition at line 470 of file vvc_refs.c.

Referenced by frame_start().

◆ ff_vvc_report_frame_finished()

void ff_vvc_report_frame_finished ( VVCFrame frame)

Definition at line 494 of file vvc_refs.c.

Referenced by decode_nal_units(), ff_vvc_frame_wait(), and generate_missing_ref().

◆ is_progress_done()

static int is_progress_done ( const FrameProgress p,
const VVCProgressListener l 
)
static

Definition at line 500 of file vvc_refs.c.

Referenced by ff_vvc_add_progress_listener(), and get_done_listener().

◆ add_listener()

static void add_listener ( VVCProgressListener **  prev,
VVCProgressListener l 
)
static

Definition at line 505 of file vvc_refs.c.

Referenced by ff_vvc_add_progress_listener(), and get_done_listener().

◆ remove_listener()

static VVCProgressListener* remove_listener ( VVCProgressListener **  prev,
VVCProgressListener l 
)
static

Definition at line 511 of file vvc_refs.c.

Referenced by get_done_listener().

◆ get_done_listener()

static VVCProgressListener* get_done_listener ( FrameProgress p,
const VVCProgress  vp 
)
static

Definition at line 518 of file vvc_refs.c.

Referenced by ff_vvc_report_progress().

◆ ff_vvc_report_progress()

void ff_vvc_report_progress ( VVCFrame frame,
const VVCProgress  vp,
const int  y 
)

Definition at line 534 of file vvc_refs.c.

Referenced by ff_vvc_report_frame_finished(), and report_frame_progress().

◆ ff_vvc_add_progress_listener()

void ff_vvc_add_progress_listener ( VVCFrame frame,
VVCProgressListener l 
)

Definition at line 554 of file vvc_refs.c.

Referenced by add_progress_listener().