FFmpeg
Macros | Functions
mem_internal.h File Reference
#include "config.h"
#include <stdint.h>
#include "avassert.h"
#include "mem.h"
#include "version.h"

Go to the source code of this file.

Macros

#define E1(x)   x
 
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...)
 
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...)
 
#define LOCAL_ALIGNED(a, t, v, ...)   LOCAL_ALIGNED_##a(t, v, __VA_ARGS__)
 
#define LOCAL_ALIGNED_4(t, v, ...)   E1(LOCAL_ALIGNED_A(4, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_8(t, v, ...)   E1(LOCAL_ALIGNED_A(8, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_16(t, v, ...)   E1(LOCAL_ALIGNED_A(16, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_32(t, v, ...)   E1(LOCAL_ALIGNED_A(32, t, v, __VA_ARGS__,,))
 

Functions

static int ff_fast_malloc (void *ptr, unsigned int *size, size_t min_size, int zero_realloc)
 

Macro Definition Documentation

#define E1 (   x)    x

Definition at line 103 of file mem_internal.h.

Referenced by epx2_slice(), and epx3_slice().

#define LOCAL_ALIGNED_A (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:36
uint8_t
#define FFALIGN(x, a)
Definition: macros.h:48
#define s(width, name)
Definition: cbs_vp9.c:257

Definition at line 105 of file mem_internal.h.

#define LOCAL_ALIGNED_D (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:36
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
Definition: mem.h:117
#define s(width, name)
Definition: cbs_vp9.c:257

Definition at line 109 of file mem_internal.h.

#define LOCAL_ALIGNED (   a,
  t,
  v,
  ... 
)    LOCAL_ALIGNED_##a(t, v, __VA_ARGS__)
#define LOCAL_ALIGNED_4 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(4, t, v, __VA_ARGS__,,))

Definition at line 118 of file mem_internal.h.

#define LOCAL_ALIGNED_8 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(8, t, v, __VA_ARGS__,,))

Definition at line 124 of file mem_internal.h.

Referenced by apply_obmc(), check_yuv2yuvX(), and dv_encode_video_segment().

#define LOCAL_ALIGNED_16 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(16, t, v, __VA_ARGS__,,))

Definition at line 130 of file mem_internal.h.

Referenced by apply_channel_coupling(), bink_decode_plane(), binkb_decode_plane(), bit8x8_c(), check_append_extra_bits(), check_butterflies(), check_decorrelate_stereo(), check_idct(), check_idct_dc4(), check_idct_multiple(), check_interleave_bytes(), check_loop_filter(), check_loop_filter_intra(), check_loopfilter_16y(), check_loopfilter_8uv(), check_loopfilter_simple(), check_luma_dc_wht(), check_mc(), check_vector_fmul_window_scaled(), checkasm_check_bswapdsp(), checkasm_check_flacdsp(), checkasm_check_float_dsp(), checkasm_check_h264pred(), checkasm_check_h264qpel(), checkasm_check_pixblockdsp(), count_mantissa_bits(), dct_max8x8_c(), dct_quantize_refine(), dct_quantize_TMPL(), dct_sad8x8_c(), decode_slice_thread(), decorrelation(), dnxhd_calc_bits_thread(), dv_decode_video_segment(), dv_init_enc_block(), hybrid6_cx(), imc_decode_frame(), mpc7_decode_init(), quant_psnr8x8_c(), rd8x8_c(), rv34_decode_inter_macroblock(), rv34_output_i16x16(), sbr_hf_assemble(), sbr_hf_inverse_filter(), stereo_processing(), test_add_squares(), test_autocorrelate(), test_butterflies_float(), test_hf_apply_noise(), test_hf_g_filt(), test_hf_gen(), test_hybrid_analysis(), test_hybrid_analysis_ileave(), test_hybrid_synthesis_deint(), test_mul_pair_single(), test_neg_odd_64(), test_qmf_deint_bfly(), test_qmf_deint_neg(), test_qmf_post_shuffle(), test_qmf_pre_shuffle(), test_stereo_interpolate(), test_sum64x5(), test_sum_square(), test_vector_fmul_scalar(), and test_vector_fmul_window().

#define LOCAL_ALIGNED_32 (   t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(32, t, v, __VA_ARGS__,,))

Definition at line 136 of file mem_internal.h.

Referenced by bink_decode_plane(), binkb_decode_plane(), calc_power(), check_diff_bytes(), check_eq(), check_hflip(), check_hscale(), check_ict_float(), check_ipred(), check_itxfm(), check_loopfilter(), check_mc(), check_multiply3x3(), check_predictor(), check_rct_int(), check_reorder_pixels(), check_rgb2yuv(), check_sao_band(), check_sao_edge(), check_shuffle_bytes(), check_sub_left_pred(), check_threshold(), check_uyvy_to_422p(), check_vector_fmul(), check_vector_fmul_add(), check_vector_fmul_window(), check_yuv2rgb(), check_yuv2yuv(), checkasm_check_afir(), checkasm_check_blockdsp(), checkasm_check_fixed_dsp(), checkasm_check_float_dsp(), checkasm_check_hevc_epel(), checkasm_check_hevc_epel_bi(), checkasm_check_hevc_epel_bi_w(), checkasm_check_hevc_epel_uni(), checkasm_check_hevc_epel_uni_w(), checkasm_check_hevc_qpel(), checkasm_check_hevc_qpel_bi(), checkasm_check_hevc_qpel_bi_w(), checkasm_check_hevc_qpel_uni(), checkasm_check_hevc_qpel_uni_w(), compare_add_res(), compute_frame_features(), compute_gru(), compute_rnn(), decode_slice_alpha(), decode_slice_chroma(), decode_slice_luma(), ff_atrac3p_power_compensation(), frame_analysis(), frame_synthesis(), h263_skip_b_part(), intra_recon(), predictor(), process_new(), process_old(), rnnoise_channel(), sub_qmf32_fixed_c(), sub_qmf32_float_c(), sub_qmf64_fixed_c(), sub_qmf64_float_c(), test_fcmul_add(), test_vector_dmac_scalar(), test_vector_dmul(), test_vector_dmul_scalar(), test_vector_fmac_scalar(), test_vector_fmul(), test_vector_fmul_add(), transform(), and transform_channel().

Function Documentation

static int ff_fast_malloc ( void ptr,
unsigned int size,
size_t  min_size,
int  zero_realloc 
)
inlinestatic