FFmpeg
Data Structures | Macros | Typedefs | Functions | Variables
cuda_runtime.h File Reference

Go to the source code of this file.

Data Structures

struct  dim3
 

Macros

#define __global__   __attribute__((global))
 
#define __device__   __attribute__((device))
 
#define __device_builtin__   __attribute__((device_builtin))
 
#define __align__(N)   __attribute__((aligned(N)))
 
#define __inline__   __inline__ __attribute__((always_inline))
 
#define max(a, b)   ((a) > (b) ? (a) : (b))
 
#define min(a, b)   ((a) < (b) ? (a) : (b))
 
#define abs(x)   ((x) < 0 ? -(x) : (x))
 
#define atomicAdd(a, b)   (__atomic_fetch_add(a, b, __ATOMIC_SEQ_CST))
 
#define GETCOMP(reg, comp)
 
#define GET(name, reg)
 
#define blockIdx   (getBlockIdx())
 
#define blockDim   (getBlockDim())
 
#define threadIdx   (getThreadIdx())
 
#define make_int2(a, b)   ((int2){.x = a, .y = b})
 
#define make_uchar2(a, b)   ((uchar2){.x = a, .y = b})
 
#define make_ushort2(a, b)   ((ushort2){.x = a, .y = b})
 
#define make_float2(a, b)   ((float2){.x = a, .y = b})
 
#define make_int4(a, b, c, d)   ((int4){.x = a, .y = b, .z = c, .w = d})
 
#define make_uchar4(a, b, c, d)   ((uchar4){.x = a, .y = b, .z = c, .w = d})
 
#define make_ushort4(a, b, c, d)   ((ushort4){.x = a, .y = b, .z = c, .w = d})
 
#define make_float4(a, b, c, d)   ((float4){.x = a, .y = b, .z = c, .w = d})
 
#define TEX2D(type, ret)   static inline __device__ void conv(type* out, unsigned a, unsigned b, unsigned c, unsigned d) {*out = (ret);}
 

Typedefs

typedef __device_builtin__ unsigned long long cudaTextureObject_t
 

Functions

struct __device_builtin__ __align__ (2) uchar2
 
struct __device_builtin__ __align__ (4) ushort2
 
struct __device_builtin__ __align__ (8) float2
 
struct __device_builtin__ __align__ (16) int4
 
template<typename T >
__device__ T tex2D (cudaTextureObject_t texObject, float x, float y)
 
template<>
__device__ float4 tex2D< float4 > (cudaTextureObject_t texObject, float x, float y)
 
template<>
__device__ float tex2D< float > (cudaTextureObject_t texObject, float x, float y)
 
template<>
__device__ float2 tex2D< float2 > (cudaTextureObject_t texObject, float x, float y)
 
static __device__ float floorf (float a)
 
static __device__ float floor (float a)
 
static __device__ double floor (double a)
 
static __device__ float ceilf (float a)
 
static __device__ float ceil (float a)
 
static __device__ double ceil (double a)
 
static __device__ float truncf (float a)
 
static __device__ float trunc (float a)
 
static __device__ double trunc (double a)
 
static __device__ float fabsf (float a)
 
static __device__ float fabs (float a)
 
static __device__ double fabs (double a)
 
static __device__ float sqrtf (float a)
 
static __device__ float __saturatef (float a)
 
static __device__ float __sinf (float a)
 
static __device__ float __cosf (float a)
 
static __device__ float __expf (float a)
 
static __device__ float __powf (float a, float b)
 

Variables

 uchar2
 
 ushort2
 
 float2
 
 int2
 
 uchar4
 
 ushort4
 
 int4
 
 float4
 

Macro Definition Documentation

◆ __global__

#define __global__   __attribute__((global))

Definition at line 27 of file cuda_runtime.h.

◆ __device__

#define __device__   __attribute__((device))

Definition at line 28 of file cuda_runtime.h.

◆ __device_builtin__

#define __device_builtin__   __attribute__((device_builtin))

Definition at line 29 of file cuda_runtime.h.

◆ __align__

#define __align__ (   N)    __attribute__((aligned(N)))

Definition at line 30 of file cuda_runtime.h.

◆ __inline__

#define __inline__   __inline__ __attribute__((always_inline))

Definition at line 31 of file cuda_runtime.h.

◆ max

#define max (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 33 of file cuda_runtime.h.

◆ min

#define min (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 34 of file cuda_runtime.h.

◆ abs

#define abs (   x)    ((x) < 0 ? -(x) : (x))
Examples
encode_audio.c.

Definition at line 35 of file cuda_runtime.h.

◆ atomicAdd

#define atomicAdd (   a,
  b 
)    (__atomic_fetch_add(a, b, __ATOMIC_SEQ_CST))

Definition at line 37 of file cuda_runtime.h.

◆ GETCOMP

#define GETCOMP (   reg,
  comp 
)
Value:
asm("mov.u32 %0, %%" #reg "." #comp ";" : "=r"(tmp)); \
ret.comp = tmp;

Definition at line 90 of file cuda_runtime.h.

◆ GET

#define GET (   name,
  reg 
)
Value:
static inline __device__ uint3 name() {\
uint3 ret; \
unsigned tmp; \
GETCOMP(reg, x) \
GETCOMP(reg, y) \
GETCOMP(reg, z) \
return ret; \
}

Definition at line 94 of file cuda_runtime.h.

◆ blockIdx

#define blockIdx   (getBlockIdx())

Definition at line 108 of file cuda_runtime.h.

◆ blockDim

#define blockDim   (getBlockDim())

Definition at line 109 of file cuda_runtime.h.

◆ threadIdx

#define threadIdx   (getThreadIdx())

Definition at line 110 of file cuda_runtime.h.

◆ make_int2

#define make_int2 (   a,
  b 
)    ((int2){.x = a, .y = b})

Definition at line 113 of file cuda_runtime.h.

◆ make_uchar2

#define make_uchar2 (   a,
  b 
)    ((uchar2){.x = a, .y = b})

Definition at line 114 of file cuda_runtime.h.

◆ make_ushort2

#define make_ushort2 (   a,
  b 
)    ((ushort2){.x = a, .y = b})

Definition at line 115 of file cuda_runtime.h.

◆ make_float2

#define make_float2 (   a,
  b 
)    ((float2){.x = a, .y = b})

Definition at line 116 of file cuda_runtime.h.

◆ make_int4

#define make_int4 (   a,
  b,
  c,
 
)    ((int4){.x = a, .y = b, .z = c, .w = d})

Definition at line 117 of file cuda_runtime.h.

◆ make_uchar4

#define make_uchar4 (   a,
  b,
  c,
 
)    ((uchar4){.x = a, .y = b, .z = c, .w = d})

Definition at line 118 of file cuda_runtime.h.

◆ make_ushort4

#define make_ushort4 (   a,
  b,
  c,
 
)    ((ushort4){.x = a, .y = b, .z = c, .w = d})

Definition at line 119 of file cuda_runtime.h.

◆ make_float4

#define make_float4 (   a,
  b,
  c,
 
)    ((float4){.x = a, .y = b, .z = c, .w = d})

Definition at line 120 of file cuda_runtime.h.

◆ TEX2D

#define TEX2D (   type,
  ret 
)    static inline __device__ void conv(type* out, unsigned a, unsigned b, unsigned c, unsigned d) {*out = (ret);}

Definition at line 123 of file cuda_runtime.h.

Typedef Documentation

◆ cudaTextureObject_t

typedef __device_builtin__ unsigned long long cudaTextureObject_t

Definition at line 40 of file cuda_runtime.h.

Function Documentation

◆ __align__() [1/4]

struct __device_builtin__ __align__ ( )

Definition at line 42 of file cuda_runtime.h.

◆ __align__() [2/4]

struct __device_builtin__ __align__ ( )

Definition at line 47 of file cuda_runtime.h.

◆ __align__() [3/4]

struct __device_builtin__ __align__ ( )

Definition at line 52 of file cuda_runtime.h.

◆ __align__() [4/4]

struct __device_builtin__ __align__ ( 16  )

Definition at line 79 of file cuda_runtime.h.

◆ tex2D()

template<typename T >
__device__ T tex2D ( cudaTextureObject_t  texObject,
float  x,
float  y 
)
inline

Definition at line 137 of file cuda_runtime.h.

◆ tex2D< float4 >()

template<>
__device__ float4 tex2D< float4 > ( cudaTextureObject_t  texObject,
float  x,
float  y 
)
inline

Definition at line 149 of file cuda_runtime.h.

Referenced by tex2D< float >(), and tex2D< float2 >().

◆ tex2D< float >()

template<>
__device__ float tex2D< float > ( cudaTextureObject_t  texObject,
float  x,
float  y 
)
inline

Definition at line 159 of file cuda_runtime.h.

◆ tex2D< float2 >()

template<>
__device__ float2 tex2D< float2 > ( cudaTextureObject_t  texObject,
float  x,
float  y 
)
inline

Definition at line 165 of file cuda_runtime.h.

◆ floorf()

static __device__ float floorf ( float  a)
inlinestatic

◆ floor() [1/2]

static __device__ float floor ( float  a)
inlinestatic

◆ floor() [2/2]

static __device__ double floor ( double  a)
inlinestatic

Definition at line 174 of file cuda_runtime.h.

◆ ceilf()

static __device__ float ceilf ( float  a)
inlinestatic

◆ ceil() [1/2]

static __device__ float ceil ( float  a)
inlinestatic

◆ ceil() [2/2]

static __device__ double ceil ( double  a)
inlinestatic

Definition at line 177 of file cuda_runtime.h.

◆ truncf()

static __device__ float truncf ( float  a)
inlinestatic

Definition at line 178 of file cuda_runtime.h.

Referenced by amrnb_decode_frame(), and amrwb_decode_frame().

◆ trunc() [1/2]

static __device__ float trunc ( float  a)
inlinestatic

Definition at line 179 of file cuda_runtime.h.

Referenced by eval_expr(), and fwht_1d().

◆ trunc() [2/2]

static __device__ double trunc ( double  a)
inlinestatic

Definition at line 180 of file cuda_runtime.h.

◆ fabsf()

static __device__ float fabsf ( float  a)
inlinestatic

◆ fabs() [1/2]

static __device__ float fabs ( float  a)
inlinestatic

Definition at line 182 of file cuda_runtime.h.

Referenced by aac_encode_frame(), av_bessel_i0(), av_d2q(), av_guess_frame_rate(), av_ts_make_time_string2(), avformat_find_stream_info(), bitreduction(), build_filter(), calc_noise_floor(), calc_thr_3gpp(), check_external_clock_speed(), check_values(), compand_delay(), compand_nodelay(), compare(), compressor(), compute_acc_den(), compute_acc_num(), compute_quant_matrix(), compute_target_delay(), config_filter(), config_input(), config_output(), config_props(), configure_input_video_filter(), configure_video_device(), configure_video_filters(), cubic_interpolate_func(), D(), dct_error(), decfloat(), decode_lspf(), decode_vector(), decompose_zp2biquads(), detect_clicks(), detect_clips(), detect_peak(), detect_scene_change(), double_near_abs_eps(), draw_response(), dump_fir(), encode_block(), evaluate_timeline_at_frame(), evrc_decode_frame(), expand(), factor(), ff_icc_profile_detect_transfer(), ff_lpc_calc_coefs(), ff_pca(), ff_rfps_calculate(), filter_channels(), filter_frame(), filter_slice(), filter_slice_grey_edge(), find_peak_magnitude(), fir_to_phase(), fixed_gain_smooth(), floor_offset(), frame_erasure(), gate(), gauss_make_triangular(), generate_kernel(), generate_window_func(), get_coeff(), get_floor_average(), get_rotation(), get_scene_score(), get_video_frame(), hypot(), init(), init_muxer(), init_pass2(), init_video_param(), inv_cdf(), lfo_advance(), lup_decompose(), M(), main(), mcompand_channel(), measure_absmean(), mov_read_tkhd(), noise_filter(), optimize_colors(), parse_points(), parse_primary(), pchip_edge_case(), perform_compression(), points_not_collinear(), precalc_coefs(), print_stats(), procamp_vaapi_init(), process_frame(), quantize_lpc_coefs(), random_ts(), ready_residue(), residue_encode(), run_psnr(), set_constqp(), set_metadata(), set_vbr(), ssim_db(), swr_build_matrix2(), swr_next_pts(), sync_clock_to_slave(), synchronize_audio(), test_dcmul_add(), test_evaluate(), test_fcmul_add(), test_update(), test_vector_dmul(), test_vector_dmul_scalar(), test_vector_fmul(), test_vector_fmul_scalar(), true_peak_limiter(), twinvq_mulawinv(), update_qp(), update_stat(), vaapi_encode_av1_configure(), velvet_filter(), video_thread(), write_hls_media_playlist(), X264_init(), and XAVS_init().

◆ fabs() [2/2]

static __device__ double fabs ( double  a)
inlinestatic

Definition at line 183 of file cuda_runtime.h.

◆ sqrtf()

static __device__ float sqrtf ( float  a)
inlinestatic

Definition at line 184 of file cuda_runtime.h.

Referenced by aac_encode_frame(), abs_pow34_v(), ball_to_xyz(), basic_block_filtering(), bayes_threshold(), bessel_reinit(), calc_cpl_coord(), calc_input_response(), calc_reduced_thr_3gpp(), calc_thr_3gpp(), calculate_gamma(), cas_slice16(), cas_slice8(), celt_alg_quant(), celt_alg_unquant(), celt_calc_theta(), celt_frame_mdct(), celt_renormalize_vector(), celt_stereo_is_decouple(), celt_stereo_merge(), compute_frame_features(), compute_kernel(), compute_pitch_gain(), compute_rms(), config_input(), config_output(), config_params(), config_props(), dct(), decode_spectrum_and_dequant(), do_hsvkey_pixel(), euclidean_kernel(), ff_amr_set_fixed_gain(), ff_eac3_apply_spectral_extension(), filter16_prewitt(), filter16_roberts(), filter16_scharr(), filter16_sobel(), filter_channel(), filter_flt(), filter_frame(), filter_prewitt(), filter_roberts(), filter_scharr(), filter_sobel(), find_form_factor(), find_rms(), finish_block(), fir_to_phase(), frequency_band(), gather_input(), get_factors(), get_qm_factor(), get_scale(), get_zeropadded_input(), hammer_to_xyz(), hue_rotate_matrix(), init(), init_segment(), make_lpf(), mark_pns(), multicomb(), nb_decode(), normalize(), normalize_vector(), on2avc_scale(), pannini_to_xyz(), perspective_to_xyz(), pitch_filter(), pos_pow34(), print_stats(), process_anticollapse(), project(), ps_tableinit(), pvq_band_cost(), quant(), quant_band_template(), r_distance(), remap_log(), rgtc2_block_internal(), run_postproc(), sbr_gain_calc(), search_for_pns(), search_for_quantizers_anmr(), search_for_quantizers_twoloop(), set_params(), shue_rotate_matrix(), siren_init(), spectral_flux(), spectral_spread(), speex_decode_stereo(), spx_coordinates(), stddevf(), step_collect_psy_metrics(), weuclidean_kernel(), win(), xyz_to_ball(), and xyz_to_hammer().

◆ __saturatef()

static __device__ float __saturatef ( float  a)
inlinestatic

Definition at line 186 of file cuda_runtime.h.

◆ __sinf()

static __device__ float __sinf ( float  a)
inlinestatic

Definition at line 187 of file cuda_runtime.h.

◆ __cosf()

static __device__ float __cosf ( float  a)
inlinestatic

Definition at line 188 of file cuda_runtime.h.

◆ __expf()

static __device__ float __expf ( float  a)
inlinestatic

Definition at line 189 of file cuda_runtime.h.

◆ __powf()

static __device__ float __powf ( float  a,
float  b 
)
inlinestatic

Definition at line 190 of file cuda_runtime.h.

Variable Documentation

◆ uchar2

uchar2

Definition at line 45 of file cuda_runtime.h.

◆ ushort2

ushort2

Definition at line 50 of file cuda_runtime.h.

◆ float2

float2

Definition at line 55 of file cuda_runtime.h.

◆ int2

int2

Definition at line 60 of file cuda_runtime.h.

◆ uchar4

uchar4

Definition at line 72 of file cuda_runtime.h.

◆ ushort4

ushort4

Definition at line 77 of file cuda_runtime.h.

◆ int4

int4

Definition at line 82 of file cuda_runtime.h.

◆ float4

float4

Definition at line 87 of file cuda_runtime.h.

Referenced by tex2D< float2 >(), and tex2D< float4 >().

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
comp
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
Definition: eamad.c:81
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:28
__device__
#define __device__
Definition: cuda_runtime.h:28
ret
ret
Definition: filter_design.txt:187
uint3
Definition: cuda_runtime.h:62