libgpac
Documentation of the core library of GPAC
reframe_av1.c File Reference
#include <gpac/avparse.h>
#include <gpac/constants.h>
#include <gpac/filters.h>
#include <gpac/internal/media_dev.h>
+ Include dependency graph for reframe_av1.c:

Data Structures

struct  AV1Idx
 
struct  GF_AV1DmxCtx
 

Macros

#define OFFS(_n)   #_n, offsetof(GF_AV1DmxCtx, _n)
 

Enumerations

enum  AV1BitstreamSyntax {
  NOT_SET , OBUs , AnnexB , IVF ,
  RAW_VPX , UNSUPPORTED
}
 

Functions

GF_Err av1dmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
GF_Err av1dmx_check_format (GF_Filter *filter, GF_AV1DmxCtx *ctx, GF_BitStream *bs, u32 *last_obu_end)
 
GF_Err gf_bs_set_logger (GF_BitStream *bs, void(*on_bs_log)(void *udta, const char *field_name, u32 nb_bits, u64 field_val, s32 idx1, s32 idx2, s32 idx3), void *udta)
 
static void av1dmx_bs_log (void *udta, const char *field_name, u32 nb_bits, u64 field_val, s32 idx1, s32 idx2, s32 idx3)
 
static void av1dmx_check_dur (GF_Filter *filter, GF_AV1DmxCtx *ctx)
 
static Bool av1dmx_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GFINLINE void av1dmx_update_cts (GF_AV1DmxCtx *ctx)
 
static void av1dmx_set_mdcv (GF_AV1DmxCtx *ctx, GF_FilterPid *pid, GF_FilterPacket *pck)
 
static void av1dmx_check_pid (GF_Filter *filter, GF_AV1DmxCtx *ctx)
 
GF_Err av1dmx_parse_ivf (GF_Filter *filter, GF_AV1DmxCtx *ctx)
 
GF_Err av1dmx_parse_vp9 (GF_Filter *filter, GF_AV1DmxCtx *ctx)
 
static GF_Err av1dmx_parse_flush_sample (GF_Filter *filter, GF_AV1DmxCtx *ctx)
 
GF_Err av1dmx_parse_av1 (GF_Filter *filter, GF_AV1DmxCtx *ctx)
 
GF_Err av1dmx_process_buffer (GF_Filter *filter, GF_AV1DmxCtx *ctx, const char *data, u32 data_size, Bool is_copy)
 
GF_Err av1dmx_process (GF_Filter *filter)
 
static GF_Err av1dmx_initialize (GF_Filter *filter)
 
static void av1dmx_finalize (GF_Filter *filter)
 
static const char * av1dmx_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * rfav1_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability AV1DmxCaps []
 
static const GF_FilterArgs AV1DmxArgs []
 
GF_FilterRegister AV1DmxRegister
 

Data Structure Documentation

◆ AV1Idx

struct AV1Idx
Data Fields
u64 pos
Double duration

◆ GF_AV1DmxCtx

struct GF_AV1DmxCtx
+ Collaboration diagram for GF_AV1DmxCtx:
Data Fields
GF_Fraction fps
Double index
Bool importer
Bool deps
Bool notime
Bool temporal_delim
u32 bsdbg
GF_FilterPid * ipid
GF_FilterPid * opid
AV1BitstreamSyntax bsmode
GF_BitStream * bs
u64 cts
u32 width
u32 height
GF_Fraction64 duration
Double start_range
Bool in_seek
u32 timescale
GF_Fraction cur_fps
u32 resume_from
char * buffer
u32 buf_size
u32 alloc_size
u32 file_hdr_size
Bool is_av1
Bool is_vp9
u32 codecid
u32 num_frames
GF_VPConfig * vp_cfg
Bool is_playing
Bool is_file
Bool file_loaded
Bool initial_play_done
GF_FilterPacket * src_pck
AV1Idx * indexes
u32 index_alloc_size
u32 index_size
AV1State state
u32 dsi_crc
Bool pts_from_file
u64 cumulated_dur
u64 last_pts
u32 bitrate
u32 clli_crc
u32 mdcv_crc
Bool copy_props

Macro Definition Documentation

◆ OFFS

#define OFFS (   _n)    #_n, offsetof(GF_AV1DmxCtx, _n)

Enumeration Type Documentation

◆ AV1BitstreamSyntax

Enumerator
NOT_SET 
OBUs 
AnnexB 
IVF 
RAW_VPX 
UNSUPPORTED 

Function Documentation

◆ av1dmx_configure_pid()

GF_Err av1dmx_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
+ Here is the call graph for this function:

◆ av1dmx_check_format()

GF_Err av1dmx_check_format ( GF_Filter *  filter,
GF_AV1DmxCtx ctx,
GF_BitStream *  bs,
u32 last_obu_end 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bs_set_logger()

GF_Err gf_bs_set_logger ( GF_BitStream *  bs,
void(*)(void *udta, const char *field_name, u32 nb_bits, u64 field_val, s32 idx1, s32 idx2, s32 idx3)  on_bs_log,
void *  udta 
)
+ Here is the caller graph for this function:

◆ av1dmx_bs_log()

static void av1dmx_bs_log ( void *  udta,
const char *  field_name,
u32  nb_bits,
u64  field_val,
s32  idx1,
s32  idx2,
s32  idx3 
)
static
+ Here is the caller graph for this function:

◆ av1dmx_check_dur()

static void av1dmx_check_dur ( GF_Filter *  filter,
GF_AV1DmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_process_event()

static Bool av1dmx_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  evt 
)
static
+ Here is the call graph for this function:

◆ av1dmx_update_cts()

static GFINLINE void av1dmx_update_cts ( GF_AV1DmxCtx ctx)
static
+ Here is the caller graph for this function:

◆ av1dmx_set_mdcv()

static void av1dmx_set_mdcv ( GF_AV1DmxCtx ctx,
GF_FilterPid *  pid,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_check_pid()

static void av1dmx_check_pid ( GF_Filter *  filter,
GF_AV1DmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_parse_ivf()

GF_Err av1dmx_parse_ivf ( GF_Filter *  filter,
GF_AV1DmxCtx ctx 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_parse_vp9()

GF_Err av1dmx_parse_vp9 ( GF_Filter *  filter,
GF_AV1DmxCtx ctx 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_parse_flush_sample()

static GF_Err av1dmx_parse_flush_sample ( GF_Filter *  filter,
GF_AV1DmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_parse_av1()

GF_Err av1dmx_parse_av1 ( GF_Filter *  filter,
GF_AV1DmxCtx ctx 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_process_buffer()

GF_Err av1dmx_process_buffer ( GF_Filter *  filter,
GF_AV1DmxCtx ctx,
const char *  data,
u32  data_size,
Bool  is_copy 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ av1dmx_process()

GF_Err av1dmx_process ( GF_Filter *  filter)
+ Here is the call graph for this function:

◆ av1dmx_initialize()

static GF_Err av1dmx_initialize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ av1dmx_finalize()

static void av1dmx_finalize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ av1dmx_probe_data()

static const char* av1dmx_probe_data ( const u8 data,
u32  size,
GF_FilterProbeScore score 
)
static
+ Here is the call graph for this function:

◆ rfav1_register()

const GF_FilterRegister* rfav1_register ( GF_FilterSession *  session)

Variable Documentation

◆ AV1DmxCaps

const GF_FilterCapability AV1DmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "video/x-ivf|video/av1"),
{0},
}
@ GF_CODECID_VP8
Definition: constants.h:606
@ GF_CODECID_VP10
Definition: constants.h:608
@ GF_CODECID_AV1
Definition: constants.h:604
@ GF_CODECID_VP9
Definition: constants.h:607
@ GF_STREAM_FILE
Definition: constants.h:104
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
#define GF_CAPS_OUTPUT_STATIC
Definition: filters.h:2238
#define GF_CAPS_OUTPUT_STATIC_EXCLUDED
Definition: filters.h:2240
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_UNFRAMED
Definition: filters.h:1118
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189
@ GF_TRUE
Definition: setup.h:474

◆ AV1DmxArgs

const GF_FilterArgs AV1DmxArgs[]
static
Initial value:
=
{
{ OFFS(fps), "import frame rate (0 default to FPS from bitstream or 25 Hz)", GF_PROP_FRACTION, "0/1000", NULL, 0},
{ OFFS(index), "indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued", GF_PROP_DOUBLE, "-1.0", NULL, 0},
{ OFFS(importer), "compatibility with old importer", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(deps), "import sample dependency information", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(notime), "ignore input timestamps, rebuild from 0", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(temporal_delim), "keep temporal delimiters in reconstructed frames", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(bsdbg), "debug OBU parsing in `media@debug logs\n"
"- off: not enabled\n"
"- on: enabled\n"
"- full: enable with number of bits dumped", GF_PROP_UINT, "off", "off|on|full", GF_FS_ARG_HINT_EXPERT},
{0}
}
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_DOUBLE
Definition: filters.h:866
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_FRACTION
Definition: filters.h:860
#define OFFS(_n)
Definition: reframe_av1.c:1369

◆ AV1DmxRegister

GF_FilterRegister AV1DmxRegister
Initial value:
= {
.name = "rfav1",
.private_size = sizeof(GF_AV1DmxCtx),
.initialize = av1dmx_initialize,
.finalize = av1dmx_finalize,
.configure_pid = av1dmx_configure_pid,
.process = av1dmx_process,
.probe_data = av1dmx_probe_data,
.process_event = av1dmx_process_event,
.hint_class_type = GF_FS_CLASS_FRAMING
}
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_CLASS_FRAMING
Definition: filters.h:2459
attribute Array args
Definition: jsf.idl:24
static const GF_FilterCapability AV1DmxCaps[]
Definition: reframe_av1.c:1349
static const GF_FilterArgs AV1DmxArgs[]
Definition: reframe_av1.c:1370
GF_Err av1dmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: reframe_av1.c:114
static GF_Err av1dmx_initialize(GF_Filter *filter)
Definition: reframe_av1.c:1248
static const char * av1dmx_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: reframe_av1.c:1273
GF_Err av1dmx_process(GF_Filter *filter)
Definition: reframe_av1.c:1127
static void av1dmx_finalize(GF_Filter *filter)
Definition: reframe_av1.c:1258
static Bool av1dmx_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: reframe_av1.c:481
Definition: reframe_av1.c:54