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

Data Structures

struct  HEVCTilePid
 
struct  GF_HEVCSplitCtx
 

Macros

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

Functions

static u32 hevcsplit_get_slice_tile_index (HEVCState *hevc)
 
static void hevcsplit_get_tile_pixel_coords (HEVCState *hevc, u32 index_row, u32 index_col, u32 pps_id, u32 *width, u32 *height, u32 *tx, u32 *ty)
 
static void hevc_write_profile_tier_level (GF_BitStream *bs_in, GF_BitStream *bs_out, Bool ProfilePresentFlag, u8 MaxNumSubLayersMinus1)
 
void hevc_rewrite_sps (char *in_SPS, u32 in_SPS_length, u32 width, u32 height, char **out_SPS, u32 *out_SPS_length)
 
static void hevcsplit_rewrite_pps_no_grid (GF_HEVCSplitCtx *ctx, char *in_PPS, u32 in_PPS_length, char **out_PPS, u32 *out_PPS_length)
 
static u32 hevcsplit_remove_slice_address (GF_HEVCSplitCtx *ctx, u8 *in_slice, u32 in_slice_length)
 
static char * hevcsplit_rewrite_nal (GF_Filter *filter, GF_HEVCSplitCtx *ctx, char *in_nal, u32 in_nal_size, u32 *out_tile_index, u32 *out_nal_size)
 
static GF_Err hevcsplit_rewrite_dsi (GF_HEVCSplitCtx *ctx, GF_FilterPid *opid, char *data, u32 size, u32 new_width, u32 new_height)
 
static void hevcsplit_write_nal (char *output_nal, char *rewritten_nal, u32 out_nal_size, u32 hevc_nalu_size_length)
 
static GF_Err hevcsplit_config_passthrough (GF_Filter *filter, GF_HEVCSplitCtx *ctx, GF_FilterPid *pid)
 
static GF_Err hevcsplit_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err hevcsplit_process (GF_Filter *filter)
 
static GF_Err hevcsplit_initialize (GF_Filter *filter)
 
static void hevcsplit_finalize (GF_Filter *filter)
 
const GF_FilterRegister * hevcsplit_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability HEVCSplitCaps []
 
static const GF_FilterArgs HEVCSplitArgs []
 
GF_FilterRegister HEVCSplitRegister
 

Data Structure Documentation

◆ HEVCTilePid

struct HEVCTilePid
Data Fields
GF_FilterPid * opid
u32 width
u32 height
u32 orig_x
u32 orig_y
GF_FilterPacket * cur_pck

◆ GF_HEVCSplitCtx

struct GF_HEVCSplitCtx
+ Collaboration diagram for GF_HEVCSplitCtx:
Data Fields
GF_FilterPid * ipid
GF_List * outputs
u32 num_tiles
u32 got_p
HEVCState hevc_state
u32 hevc_nalu_size_length
u32 cfg_crc
u32 nb_pck
GF_BitStream * bs_au_in
GF_BitStream * bs_nal_in
GF_BitStream * bs_nal_out
u8 * buffer_nal
u32 buffer_nal_alloc
u8 * output_no_epb
u32 output_no_epb_alloc
u8 * input_no_epb
u32 input_no_epb_alloc
Bool passthrough

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ hevcsplit_get_slice_tile_index()

static u32 hevcsplit_get_slice_tile_index ( HEVCState hevc)
static
+ Here is the caller graph for this function:

◆ hevcsplit_get_tile_pixel_coords()

static void hevcsplit_get_tile_pixel_coords ( HEVCState hevc,
u32  index_row,
u32  index_col,
u32  pps_id,
u32 width,
u32 height,
u32 tx,
u32 ty 
)
static
+ Here is the caller graph for this function:

◆ hevc_write_profile_tier_level()

static void hevc_write_profile_tier_level ( GF_BitStream *  bs_in,
GF_BitStream *  bs_out,
Bool  ProfilePresentFlag,
u8  MaxNumSubLayersMinus1 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevc_rewrite_sps()

void hevc_rewrite_sps ( char *  in_SPS,
u32  in_SPS_length,
u32  width,
u32  height,
char **  out_SPS,
u32 out_SPS_length 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevcsplit_rewrite_pps_no_grid()

static void hevcsplit_rewrite_pps_no_grid ( GF_HEVCSplitCtx ctx,
char *  in_PPS,
u32  in_PPS_length,
char **  out_PPS,
u32 out_PPS_length 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevcsplit_remove_slice_address()

static u32 hevcsplit_remove_slice_address ( GF_HEVCSplitCtx ctx,
u8 in_slice,
u32  in_slice_length 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevcsplit_rewrite_nal()

static char* hevcsplit_rewrite_nal ( GF_Filter *  filter,
GF_HEVCSplitCtx ctx,
char *  in_nal,
u32  in_nal_size,
u32 out_tile_index,
u32 out_nal_size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevcsplit_rewrite_dsi()

static GF_Err hevcsplit_rewrite_dsi ( GF_HEVCSplitCtx ctx,
GF_FilterPid *  opid,
char *  data,
u32  size,
u32  new_width,
u32  new_height 
)
static

used for storing AVC sequenceParameterSetNALUnit and pictureParameterSetNALUnit

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevcsplit_write_nal()

static void hevcsplit_write_nal ( char *  output_nal,
char *  rewritten_nal,
u32  out_nal_size,
u32  hevc_nalu_size_length 
)
static
+ Here is the caller graph for this function:

◆ hevcsplit_config_passthrough()

static GF_Err hevcsplit_config_passthrough ( GF_Filter *  filter,
GF_HEVCSplitCtx ctx,
GF_FilterPid *  pid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevcsplit_configure_pid()

static GF_Err hevcsplit_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
static

used for storing AVC sequenceParameterSetNALUnit and pictureParameterSetNALUnit

+ Here is the call graph for this function:

◆ hevcsplit_process()

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

◆ hevcsplit_initialize()

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

◆ hevcsplit_finalize()

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

◆ hevcsplit_register()

const GF_FilterRegister* hevcsplit_register ( GF_FilterSession *  session)

Variable Documentation

◆ HEVCSplitCaps

const GF_FilterCapability HEVCSplitCaps[]
static
Initial value:
=
{
}
@ 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

◆ HEVCSplitArgs

const GF_FilterArgs HEVCSplitArgs[]
static
Initial value:
=
{
{0}
}

◆ HEVCSplitRegister

GF_FilterRegister HEVCSplitRegister
Initial value:
= {
.name = "hevcsplit",
GF_FS_SET_HELP("This filter splits a motion-constrained tiled HEVC PID into N independent HEVC PIDs.\n"
"Use hevcmerge filter to merge initially motion-constrained tiled HEVC PID in a single output.")
.private_size = sizeof(GF_HEVCSplitCtx),
.initialize = hevcsplit_initialize,
.finalize = hevcsplit_finalize,
.args = HEVCSplitArgs,
.configure_pid = hevcsplit_configure_pid,
.process = hevcsplit_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 GF_Err hevcsplit_process(GF_Filter *filter)
Definition: hevcsplit.c:819
static const GF_FilterCapability HEVCSplitCaps[]
Definition: hevcsplit.c:966
static GF_Err hevcsplit_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: hevcsplit.c:680
static void hevcsplit_finalize(GF_Filter *filter)
Definition: hevcsplit.c:945
static const GF_FilterArgs HEVCSplitArgs[]
Definition: hevcsplit.c:978
static GF_Err hevcsplit_initialize(GF_Filter *filter)
Definition: hevcsplit.c:936
Definition: hevcsplit.c:44