libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
dec_uncv.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/avparse.h>

Data Structures

struct  UNCVComponentDefinition
 
struct  UNCVComponentInfo
 
struct  UNCVPalette
 
struct  UNCVConfig
 
struct  BlockComp
 
struct  BSRead
 
struct  UNCVDecCtx
 

Macros

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

Enumerations

enum  { SAMPLING_NONE =0 , SAMPLING_422 =1 , SAMPLING_420 =2 , SAMPLING_411 =3 }
 
enum  {
  INTERLEAVE_COMPONENT =0 , INTERLEAVE_PIXEL =1 , INTERLEAVE_MIXED =2 , INTERLEAVE_ROW =3 ,
  INTERLEAVE_TILE =4 , INTERLEAVE_MULTIY =5
}
 
enum  { UNCV_OUT_NONE =0 , UNCV_OUT_YUV =1 , UNCV_OUT_RGB , UNCV_OUT_MONO }
 

Functions

static u8 uncv_get_val (GF_BitStream *bs, UNCVComponentInfo *comp, UNCVDecCtx *ctx)
 
static void read_pixel_interleave_comp_yuv_420 (UNCVDecCtx *ctx, UNCVConfig *config, u32 x, u32 y, u8 *output, u32 offset)
 
static void read_pixel_interleave_comp_yuv (UNCVDecCtx *ctx, UNCVConfig *config, u32 x, u32 y, u8 *output, u32 offset)
 
static void read_pixel_interleave_comp (UNCVDecCtx *ctx, UNCVConfig *config, u32 x, u32 y, u8 *output, u32 offset)
 
static void read_pixel_interleave_pixel (UNCVDecCtx *ctx, UNCVConfig *config, u32 x, u32 y, u8 *output, u32 offset)
 
static void read_pixel_interleave_mixed (UNCVDecCtx *ctx, UNCVConfig *config, u32 x, u32 y, u8 *output, u32 offset)
 
static void read_pixel_interleave_multiy (UNCVDecCtx *ctx, UNCVConfig *config, u32 x, u32 y, u8 *output, u32 offset)
 
static void uncv_del (UNCVConfig *cfg)
 
static GF_Err uncv_load_profile (UNCVConfig *uncv)
 
static UNCVConfiguncv_parse_config (u8 *dsi, u32 dsi_size, GF_Err *out_err)
 
GF_Err rfc_6381_get_codec_uncv (char *szCodec, u32 subtype, u8 *dsi, u32 dsi_size)
 
static void uncv_check_comp_type (u32 type, Bool *has_mono, Bool *has_yuv, Bool *has_rgb, Bool *has_alpha, Bool *has_depth, Bool *has_disp, Bool *has_pal, Bool *has_fa, Bool *has_pad, Bool *has_non_int)
 
static void uncv_check_comps_type (UNCVComponentInfo *comps, u32 nb_comps, Bool *has_mono, Bool *has_yuv, Bool *has_rgb, Bool *has_alpha, Bool *has_depth, Bool *has_disp, Bool *has_pal, Bool *has_fa, Bool *has_pad, Bool *has_non_int)
 
static u32 uncv_get_compat (UNCVDecCtx *ctx)
 
static u32 uncv_get_line_size (UNCVDecCtx *ctx, u32 *comp_bits, u32 clen)
 
static void uncv_reset (UNCVDecCtx *ctx)
 
static GF_Err uncv_config (UNCVDecCtx *ctx, u8 *dsi, u32 dsi_size)
 
static GF_Err uncvdec_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void uncv_setup_block (UNCVDecCtx *ctx, BSRead *bsr)
 
static void uncv_start_frame (UNCVDecCtx *ctx, const u8 *data, u32 size)
 
static void uncv_start_tile (UNCVDecCtx *ctx, UNCVConfig *config, u32 tile_x, u32 tile_y)
 
static void uncv_end_tile (UNCVDecCtx *ctx)
 
static void uncv_end_line (UNCVDecCtx *ctx, UNCVConfig *config)
 
static void uncv_pull_block (UNCVDecCtx *ctx, UNCVConfig *config, BSRead *bsr, u32 comp_idx)
 
static void uncv_set_pix_val (UNCVDecCtx *ctx, UNCVComponentInfo *comp, u8 val, u32 x, u32 y)
 
static void uncv_pull_val (UNCVDecCtx *ctx, UNCVConfig *config, BSRead *bsr, UNCVComponentInfo *comp, Bool no_write, u32 x, u32 y)
 
static GF_Err uncvdec_process (GF_Filter *filter)
 
static void uncvdec_finalize (GF_Filter *filter)
 
const GF_FilterRegister * uncvdec_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability UNCVDecCaps []
 
static const GF_FilterArgs UNCVDecArgs []
 
GF_FilterRegister UNCVDecRegister
 

Data Structure Documentation

◆ UNCVComponentDefinition

struct UNCVComponentDefinition
Data Fields
u32 type
char * uri

◆ UNCVComponentInfo

struct UNCVComponentInfo
Data Fields
u16 idx
u32 bits
u32 format
u32 align_size
u32 type
u64 max_val
s32 p_idx
u32 line_size
u32 plane_size
u32 row_align_size
u32 comp_idx
u8 value

◆ UNCVPalette

struct UNCVPalette
Data Fields
u32 nb_comps
UNCVComponentInfo * comps
u32 nb_values
u8 * values

◆ UNCVConfig

struct UNCVConfig
Data Fields
u32 nb_comp_defs
UNCVComponentDefinition * comp_defs
UNCVPalette * palette
u8 version
u32 flags
u32 profile
u32 nb_comps
UNCVComponentInfo * comps
u32 sampling
u32 interleave
u32 block_size
Bool components_little_endian
Bool block_pad_lsb
Bool block_little_endian
Bool block_reversed
Bool pad_unknown
u32 pixel_size
u32 row_align_size
u32 tile_align_size
u32 num_tile_cols
u32 num_tile_rows
u16 fa_width
u16 fa_height
u16 * fa_map

◆ BlockComp

struct BlockComp
Data Fields
UNCVComponentInfo * component
u32 val

◆ BSRead

struct BSRead
Data Fields
GF_BitStream * bs
u32 init_offset
u32 line_start_pos
u32 row_align_size
u32 plane_size
u32 tile_size
u32 comp_row_size
u32 loaded_comps
u32 first_comp_idx
u8 * le_buf
GF_BitStream * le_bs
BlockComp * block_comps

Macro Definition Documentation

◆ OFFS

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SAMPLING_NONE 
SAMPLING_422 
SAMPLING_420 
SAMPLING_411 

◆ anonymous enum

anonymous enum
Enumerator
INTERLEAVE_COMPONENT 
INTERLEAVE_PIXEL 
INTERLEAVE_MIXED 
INTERLEAVE_ROW 
INTERLEAVE_TILE 
INTERLEAVE_MULTIY 

◆ anonymous enum

anonymous enum
Enumerator
UNCV_OUT_NONE 
UNCV_OUT_YUV 
UNCV_OUT_RGB 
UNCV_OUT_MONO 

Function Documentation

◆ uncv_get_val()

static u8 uncv_get_val ( GF_BitStream *  bs,
UNCVComponentInfo comp,
UNCVDecCtx ctx 
)
static

◆ read_pixel_interleave_comp_yuv_420()

static void read_pixel_interleave_comp_yuv_420 ( UNCVDecCtx ctx,
UNCVConfig config,
u32  x,
u32  y,
u8 output,
u32  offset 
)
static

◆ read_pixel_interleave_comp_yuv()

static void read_pixel_interleave_comp_yuv ( UNCVDecCtx ctx,
UNCVConfig config,
u32  x,
u32  y,
u8 output,
u32  offset 
)
static

◆ read_pixel_interleave_comp()

static void read_pixel_interleave_comp ( UNCVDecCtx ctx,
UNCVConfig config,
u32  x,
u32  y,
u8 output,
u32  offset 
)
static

◆ read_pixel_interleave_pixel()

static void read_pixel_interleave_pixel ( UNCVDecCtx ctx,
UNCVConfig config,
u32  x,
u32  y,
u8 output,
u32  offset 
)
static

◆ read_pixel_interleave_mixed()

static void read_pixel_interleave_mixed ( UNCVDecCtx ctx,
UNCVConfig config,
u32  x,
u32  y,
u8 output,
u32  offset 
)
static

◆ read_pixel_interleave_multiy()

static void read_pixel_interleave_multiy ( UNCVDecCtx ctx,
UNCVConfig config,
u32  x,
u32  y,
u8 output,
u32  offset 
)
static

◆ uncv_del()

static void uncv_del ( UNCVConfig cfg)
static

◆ uncv_load_profile()

static GF_Err uncv_load_profile ( UNCVConfig uncv)
static

◆ uncv_parse_config()

static UNCVConfig * uncv_parse_config ( u8 dsi,
u32  dsi_size,
GF_Err out_err 
)
static

◆ rfc_6381_get_codec_uncv()

GF_Err rfc_6381_get_codec_uncv ( char *  szCodec,
u32  subtype,
u8 dsi,
u32  dsi_size 
)

◆ uncv_check_comp_type()

static void uncv_check_comp_type ( u32  type,
Bool has_mono,
Bool has_yuv,
Bool has_rgb,
Bool has_alpha,
Bool has_depth,
Bool has_disp,
Bool has_pal,
Bool has_fa,
Bool has_pad,
Bool has_non_int 
)
static

◆ uncv_check_comps_type()

static void uncv_check_comps_type ( UNCVComponentInfo comps,
u32  nb_comps,
Bool has_mono,
Bool has_yuv,
Bool has_rgb,
Bool has_alpha,
Bool has_depth,
Bool has_disp,
Bool has_pal,
Bool has_fa,
Bool has_pad,
Bool has_non_int 
)
static

◆ uncv_get_compat()

static u32 uncv_get_compat ( UNCVDecCtx ctx)
static

◆ uncv_get_line_size()

static u32 uncv_get_line_size ( UNCVDecCtx ctx,
u32 comp_bits,
u32  clen 
)
static

◆ uncv_reset()

static void uncv_reset ( UNCVDecCtx ctx)
static

◆ uncv_config()

static GF_Err uncv_config ( UNCVDecCtx ctx,
u8 dsi,
u32  dsi_size 
)
static

◆ uncvdec_configure_pid()

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

◆ uncv_setup_block()

static void uncv_setup_block ( UNCVDecCtx ctx,
BSRead bsr 
)
static

◆ uncv_start_frame()

static void uncv_start_frame ( UNCVDecCtx ctx,
const u8 data,
u32  size 
)
static

◆ uncv_start_tile()

static void uncv_start_tile ( UNCVDecCtx ctx,
UNCVConfig config,
u32  tile_x,
u32  tile_y 
)
static

◆ uncv_end_tile()

static void uncv_end_tile ( UNCVDecCtx ctx)
static

◆ uncv_end_line()

static void uncv_end_line ( UNCVDecCtx ctx,
UNCVConfig config 
)
static

◆ uncv_pull_block()

static void uncv_pull_block ( UNCVDecCtx ctx,
UNCVConfig config,
BSRead bsr,
u32  comp_idx 
)
static

◆ uncv_set_pix_val()

static void uncv_set_pix_val ( UNCVDecCtx ctx,
UNCVComponentInfo comp,
u8  val,
u32  x,
u32  y 
)
static

◆ uncv_pull_val()

static void uncv_pull_val ( UNCVDecCtx ctx,
UNCVConfig config,
BSRead bsr,
UNCVComponentInfo comp,
Bool  no_write,
u32  x,
u32  y 
)
static

◆ uncvdec_process()

static GF_Err uncvdec_process ( GF_Filter *  filter)
static

◆ uncvdec_finalize()

static void uncvdec_finalize ( GF_Filter *  filter)
static

◆ uncvdec_register()

const GF_FilterRegister * uncvdec_register ( GF_FilterSession *  session)

Variable Documentation

◆ UNCVDecCaps

const GF_FilterCapability UNCVDecCaps[]
static
Initial value:
=
{
}
@ GF_CODECID_RAW_UNCV
Definition constants.h:592
@ GF_CODECID_RAW
Definition constants.h:590
@ GF_STREAM_VISUAL
Definition constants.h:64
@ GF_PIXEL_UNCV
Definition constants.h:190
#define GF_CAPS_OUTPUT
Definition filters.h:2139
#define CAP_UINT(_f, _a, _b)
Definition filters.h:2081
#define GF_CAPS_INPUT_OUTPUT
Definition filters.h:2149
#define GF_CAPS_INPUT_EXCLUDED
Definition filters.h:2135
#define CAP_BOOL(_f, _a, _b)
Definition filters.h:2089
#define GF_CAPS_INPUT
Definition filters.h:2127
@ GF_PROP_PID_CODECID
Definition filters.h:1092
@ GF_PROP_PID_PIXFMT
Definition filters.h:1122
@ GF_PROP_PID_STREAM_TYPE
Definition filters.h:1088
@ GF_PROP_PID_UNFRAMED
Definition filters.h:1094
@ GF_TRUE
Definition setup.h:438

◆ UNCVDecArgs

const GF_FilterArgs UNCVDecArgs[]
static
Initial value:
=
{
{ OFFS(force_pf), "ignore possible mapping to GPAC pixel formats", GF_PROP_BOOL, "false", NULL, 0},
{ OFFS(no_tile), "ignore tiling info (debug)", GF_PROP_BOOL, "false", NULL, 0},
{0}
}
#define OFFS(_n)
Definition dec_uncv.c:1662
@ GF_PROP_BOOL
Definition filters.h:837

◆ UNCVDecRegister

GF_FilterRegister UNCVDecRegister
Initial value:
= {
.name = "uncvdec",
.private_size = sizeof(UNCVDecCtx),
.priority = 1,
.finalize = uncvdec_finalize,
.configure_pid = uncvdec_configure_pid,
.process = uncvdec_process,
}
static GF_Err uncvdec_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition dec_uncv.c:1121
static void uncvdec_finalize(GF_Filter *filter)
Definition dec_uncv.c:1647
static const GF_FilterCapability UNCVDecCaps[]
Definition dec_uncv.c:1653
static GF_Err uncvdec_process(GF_Filter *filter)
Definition dec_uncv.c:1579
static const GF_FilterArgs UNCVDecArgs[]
Definition dec_uncv.c:1664
#define SETCAPS(__struct)
Definition filters.h:2271
attribute Array args
Definition jsf.idl:24
Definition dec_uncv.c:130