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

Data Structures

struct  TileSplitPid
 
struct  GF_TileSplitCtx
 

Macros

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

Functions

static void tilesplit_update_pid_props (GF_TileSplitCtx *ctx, TileSplitPid *tinfo)
 
static GF_Err tilesplit_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err tilesplit_set_eos (GF_Filter *filter, GF_TileSplitCtx *ctx)
 
u32 hevc_get_tile_id (HEVCState *hevc, u32 *tile_x, u32 *tile_y, u32 *tile_width, u32 *tile_height)
 
static GF_Err tilesplit_process (GF_Filter *filter)
 
static GF_Err tilesplit_initialize (GF_Filter *filter)
 
static void tilesplit_finalize (GF_Filter *filter)
 
const GF_FilterRegister * tilesplit_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability TileSplitCaps []
 
static const GF_FilterArgs TileSplitArgs []
 
GF_FilterRegister TileSplitRegister
 

Data Structure Documentation

◆ TileSplitPid

struct TileSplitPid
Data Fields
GF_FilterPid * opid
u32 x
u32 y
u32 w
u32 h
GF_BitStream * pck_bs
u8 * pck_buf
u32 pck_buf_alloc
Bool all_intra

◆ GF_TileSplitCtx

struct GF_TileSplitCtx
+ Collaboration diagram for GF_TileSplitCtx:
Data Fields
GF_PropUIntList tiledrop
GF_FilterPid * ipid
GF_FilterPid * base_opid
u32 base_id
u32 nb_tiles
u32 nb_alloc_tiles
TileSplitPid * opids
HEVCState hevc
u32 nalu_size_length
Bool filter_disabled
Bool passthrough
s32 cur_pps_idx
u32 width
u32 height
GF_BitStream * pck_bs
u8 * pck_buf
u32 pck_buf_alloc

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ tilesplit_update_pid_props()

static void tilesplit_update_pid_props ( GF_TileSplitCtx ctx,
TileSplitPid tinfo 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tilesplit_configure_pid()

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

◆ tilesplit_set_eos()

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

◆ hevc_get_tile_id()

u32 hevc_get_tile_id ( HEVCState hevc,
u32 tile_x,
u32 tile_y,
u32 tile_width,
u32 tile_height 
)
+ Here is the caller graph for this function:

◆ tilesplit_process()

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

◆ tilesplit_initialize()

static GF_Err tilesplit_initialize ( GF_Filter *  filter)
static

◆ tilesplit_finalize()

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

◆ tilesplit_register()

const GF_FilterRegister* tilesplit_register ( GF_FilterSession *  session)

Variable Documentation

◆ TileSplitCaps

const GF_FilterCapability TileSplitCaps[]
static
Initial value:
=
{
{0},
}
@ GF_CODECID_HEVC
Definition: constants.h:416
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define GF_CAPS_INPUT_EXCLUDED
Definition: filters.h:2228
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
@ 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_TILE_BASE
Definition: filters.h:1107
@ GF_TRUE
Definition: setup.h:474

◆ TileSplitArgs

const GF_FilterArgs TileSplitArgs[]
static
Initial value:
=
{
{ OFFS(tiledrop), "specify indexes of tiles to drop (0-based, in tile raster scan order)", GF_PROP_UINT_LIST, NULL, NULL, GF_FS_ARG_UPDATE},
{0}
}
@ GF_FS_ARG_UPDATE
Definition: filters.h:2108
@ GF_PROP_UINT_LIST
Definition: filters.h:897
#define OFFS(_n)
Definition: tilesplit.c:554

◆ TileSplitRegister

GF_FilterRegister TileSplitRegister
Initial value:
= {
.name = "tilesplit",
GF_FS_SET_HELP("This filter splits an HEVC tiled stream into tiled HEVC streams (`hvt1` or `hvt2` in ISOBMFF)."
"\n"
"The filter will move to passthrough mode if the bitstream is not tiled.\n"
"If the `Bitrate` property is set on the input PID, the output tile PIDs will have a bitrate set to `(Bitrate - 10k)/nb_opids`, 10 kbps being reserved for the base.\n"
"\n"
"Each tile PID will be assigned the following properties:\n"
"- `ID`: equal to the base PID ID (same as input) plus the 1-based index of the tile in raster scan order.\n"
"- `TileID`: equal to the 1-based index of the tile in raster scan order.\n"
"\n"
"Warning: The filter does not check if tiles are independently-coded (MCTS) !\n"
"\n"
"Warning: Support for dynamic changes of tiling grid has not been tested !\n"
)
.private_size = sizeof(GF_TileSplitCtx),
.initialize = tilesplit_initialize,
.finalize = tilesplit_finalize,
.args = TileSplitArgs,
.configure_pid = tilesplit_configure_pid,
.process = tilesplit_process,
.hint_class_type = GF_FS_CLASS_STREAM
}
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_EXPLICIT_ONLY
Definition: filters.h:2393
@ GF_FS_CLASS_STREAM
Definition: filters.h:2445
static const GF_FilterCapability TileSplitCaps[]
Definition: tilesplit.c:534
static const GF_FilterArgs TileSplitArgs[]
Definition: tilesplit.c:556
static GF_Err tilesplit_process(GF_Filter *filter)
Definition: tilesplit.c:362
static GF_Err tilesplit_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: tilesplit.c:96
static GF_Err tilesplit_initialize(GF_Filter *filter)
Definition: tilesplit.c:509
static void tilesplit_finalize(GF_Filter *filter)
Definition: tilesplit.c:516
Definition: tilesplit.c:46