libgpac
Documentation of the core library of GPAC
evg_rescale.c File Reference
#include <gpac/filters.h>
#include <gpac/evg.h>
+ Include dependency graph for evg_rescale.c:

Data Structures

struct  EVGScaleCtx
 

Macros

#define CHK_EXIT(_msg)
 
#define OFFS(_n)   #_n, offsetof(EVGScaleCtx, _n)
 

Enumerations

enum  { EVGS_KEEPAR_OFF =0 , EVGS_KEEPAR_FULL , EVGS_KEEPAR_NOSRC }
 

Functions

u32 gf_evg_stencil_get_pixel_fast (GF_EVGStencil *st, s32 x, s32 y)
 
u64 gf_evg_stencil_get_pixel_wide_fast (GF_EVGStencil *st, s32 x, s32 y)
 
static GF_Err evgs_process (GF_Filter *filter)
 
static GF_Err evgs_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err evgs_initialize (GF_Filter *filter)
 
static void evgs_finalize (GF_Filter *filter)
 
static GF_Err evgs_reconfigure_output (GF_Filter *filter, GF_FilterPid *pid)
 
const GF_FilterRegister * evgs_register (GF_FilterSession *session)
 

Variables

static GF_FilterArgs EVGSArgs []
 
static const GF_FilterCapability EVGSCaps []
 
GF_FilterRegister EVGSRegister
 

Data Structure Documentation

◆ EVGScaleCtx

struct EVGScaleCtx
+ Collaboration diagram for EVGScaleCtx:
Data Fields
GF_PropVec2i osize
u32 ofmt
u32 nbth
Bool ofr
Bool hq
char * padclr
u32 keepar
GF_Fraction osar
GF_FilterPid * ipid
u32 i_w
u32 i_h
u32 i_stride
u32 i_stride_uv
u32 i_pfmt
u32 i_planes
u32 i_size
Bool i_has_alpha
GF_FilterPid * opid
u32 o_size
u32 o_w
u32 o_h
u32 o_stride
u32 o_stride_uv
GF_Fraction ar
Bool passthrough
Bool fullrange
u32 offset_w
u32 offset_h
GF_EVGSurface * surf
GF_EVGStencil * tx
GF_Path * path

Macro Definition Documentation

◆ CHK_EXIT

#define CHK_EXIT (   _msg)
Value:
if (e) {\
GF_LOG(GF_LOG_ERROR, GF_LOG_MEDIA, ("[EVGS] "_msg": %s\n", gf_error_to_string(e) )); \
gf_filter_pck_discard(dst_pck); \
gf_filter_pid_drop_packet(ctx->ipid); \
return e;\
}
const char * gf_error_to_string(GF_Err e)
Error Printing.
Definition: error.c:1030
@ GF_LOG_MEDIA
Definition: tools.h:792
@ GF_LOG_ERROR
Definition: tools.h:741

◆ OFFS

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
EVGS_KEEPAR_OFF 
EVGS_KEEPAR_FULL 
EVGS_KEEPAR_NOSRC 

Function Documentation

◆ gf_evg_stencil_get_pixel_fast()

u32 gf_evg_stencil_get_pixel_fast ( GF_EVGStencil *  st,
s32  x,
s32  y 
)

◆ gf_evg_stencil_get_pixel_wide_fast()

u64 gf_evg_stencil_get_pixel_wide_fast ( GF_EVGStencil *  st,
s32  x,
s32  y 
)

◆ evgs_process()

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

◆ evgs_configure_pid()

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

◆ evgs_initialize()

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

◆ evgs_finalize()

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

◆ evgs_reconfigure_output()

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

◆ evgs_register()

const GF_FilterRegister* evgs_register ( GF_FilterSession *  session)

Variable Documentation

◆ EVGSArgs

GF_FilterArgs EVGSArgs[]
static
Initial value:
=
{
{ OFFS(osize), "osize of output video", GF_PROP_VEC2I, NULL, NULL, 0},
{ OFFS(ofmt), "pixel format for output video. When not set, input format is used", GF_PROP_PIXFMT, "none", NULL, 0},
{ OFFS(ofr), "force output full range", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(keepar), "keep aspect ratio\n"
"- off: ignore aspect ratio\n"
"- full: respect aspect ratio, applying input sample aspect ratio info\n"
"- nosrc: respect aspect ratio but ignore input sample aspect ratio"
, GF_PROP_UINT, "off", "off|full|nosrc", GF_FS_ARG_HINT_EXPERT},
{ OFFS(padclr), "clear color when aspect ration preservation is used", GF_PROP_STRING, "black", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(osar), "force output pixel aspect ratio", GF_PROP_FRACTION, "0/1", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(nbth), "number of threads to use, -1 means all cores", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(hq), "use bilinear interpolation instead of closest pixel", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_EXPERT},
{0}
}
#define OFFS(_n)
Definition: evg_rescale.c:462
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_STRING
Definition: filters.h:876
@ GF_PROP_SINT
Definition: filters.h:850
@ GF_PROP_PIXFMT
Definition: filters.h:916
@ GF_PROP_VEC2I
Definition: filters.h:868
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_FRACTION
Definition: filters.h:860

◆ EVGSCaps

const GF_FilterCapability EVGSCaps[]
static
Initial value:
=
{
}
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define GF_CAPS_INPUT_OUTPUT
Definition: filters.h:2242
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112

◆ EVGSRegister

GF_FilterRegister EVGSRegister