|
FFmpeg
|
Replacements for frequently missing libm functions. More...
#include <math.h>#include "config.h"#include "attributes.h"#include "intfloat.h"#include "mathematics.h"Go to the source code of this file.
Macros | |
| #define | atanf(x) |
| #define | atan2f(y, x) |
| #define | powf(x, y) |
| #define | cosf(x) |
| #define | FF_ARRAY_ELEMS(a) |
| #define | expf(x) |
| #define | exp2(x) |
| #define | exp2f(x) |
| #define | isinf(x) |
| #define | isnan(x) |
| #define | isfinite(x) |
| #define | ldexpf(x, exp) |
| #define | llrint(x) |
| #define | llrintf(x) |
| #define | log2(x) |
| #define | log2f(x) |
| #define | log10f(x) |
| #define | sinf(x) |
Replacements for frequently missing libm functions.
Definition in file libm.h.
| #define atanf | ( | x | ) |
Definition at line 42 of file libm.h.
Referenced by calc_bark(), cylindrical_to_xyz(), filter_flt(), ps_tableinit(), stereographic_to_xyz(), xyz_to_cube(), and xyz_to_eac().
| #define atan2f | ( | y, | |
| x ) |
Definition at line 47 of file libm.h.
Referenced by angle_transform(), celt_calc_theta(), compute_sat_hue_metrics16(), compute_sat_hue_metrics8(), do_hsvkey_pixel(), draw(), draw_spatial(), filter_2_1(), filter_5_0_side(), filter_5_1_back(), filter_5_1_side(), filter_stereo(), filter_surround(), fir_to_phase(), fisheye_to_xyz(), focus_transform(), fov_from_dfov(), ipt2ich(), pannini_to_xyz(), perspective_to_xyz(), project(), ps_tableinit(), update_hue_peaks(), upmix_7_1_5_0_side(), xyz_to_barrel(), xyz_to_barrelsplit(), xyz_to_cube(), xyz_to_cylindrical(), xyz_to_cylindricalea(), xyz_to_equirect(), xyz_to_fisheye(), xyz_to_hammer(), xyz_to_hequirect(), xyz_to_mercator(), xyz_to_pannini(), and xyz_to_sinusoidal().
| #define powf | ( | x, | |
| y ) |
Definition at line 52 of file libm.h.
Referenced by ac3_float_tables_init(), apply_noise_fill(), calc_input_response(), calculate_factors(), cbrtf(), config_eq_output(), config_output(), decode_frame(), decode_ppc(), fastaudio_decode(), ff_aac_usac_decode_frame(), ff_atrac_init_gain_compensation(), ff_eac3_parse_header(), filter_flt(), focus_transform(), frequency_band(), generate_window_func(), get_pm_factor(), get_scale(), imc_decode_level_coefficients_raw(), init_pow2table(), kaiser_beta(), kelvin2rgb(), make_bands(), mix_exp(), nmr_solve_group(), parse_frame_header(), pq_oetf(), remap_log(), scale_gamma(), search_for_quantizers_twoloop(), set_margin_curve(), siren_init(), smooth(), to_linear(), tone_map_setup(), upmix_7_1_5_0_side(), and upmix_7_1_5_1().
| #define cosf | ( | x | ) |
Definition at line 80 of file libm.h.
Referenced by activate(), activate(), angle_transform(), barrel_to_xyz(), barrelsplit_to_xyz(), calculate_rotation(), calculate_rotation_matrix(), celt_exp_rotation(), color_range(), config_eq_output(), config_input(), config_props(), cylindrical_to_xyz(), cylindricalea_to_xyz(), dfisheye_to_xyz(), do_hsvkey_pixel(), draw(), equirect_to_xyz(), equisolid_to_xyz(), filter_frame(), filter_frame(), fir_to_phase(), fisheye_to_xyz(), focus_transform(), generate_hann_window(), generate_hann_window(), get_barrel_map(), get_barrel_split_map(), get_cubemap32_map(), get_lfe(), get_rotated_cubemap_map(), hequirect_to_xyz(), hue_rotate_matrix(), ich2ipt(), idct_1d(), init(), lininterp(), lsf2lsp(), lsp_to_lpc(), mercator_to_xyz(), orthographic_to_xyz(), pannini_to_xyz(), perspective_to_xyz(), ps_tableinit(), run_channel_fft(), set_params(), shue_rotate_matrix(), sinusoidal_to_xyz(), stereo_position(), stereographic_to_xyz(), upmix_7_1_5_0_side(), upmix_7_1_5_1(), view_matrix(), xyz_to_cube(), xyz_to_hammer(), xyz_to_pannini(), and xyz_to_sinusoidal().
| #define expf | ( | x | ) |
Definition at line 285 of file libm.h.
Referenced by activate(), calculate_gamma(), calculate_gaussian_coeffs(), checkasm_check_nlmeans(), compute_kernel(), config_eq_output(), config_filter(), config_input(), config_input(), config_input(), config_input(), config_output(), config_output(), config_params(), convert_coeffs(), decode_init(), ff_fast_powf(), filter(), filter_flt(), fir_to_phase(), frequency_band(), gaussian_for(), generate_spread_table(), get_iscale(), lab2rgb(), load_data(), mercator_to_xyz(), nb_decode(), nmr_setup_channel(), parse_gains(), remap_log(), sb_decode(), softmax_exp(), spectral_flatness(), step_collect_psy_metrics(), synth_block_fcb_acb(), and to_linear().
| #define exp2 | ( | x | ) |
Definition at line 290 of file libm.h.
Referenced by config_input(), decode_init_static(), ff_exp10(), imc_decode_level_coefficients(), init(), initFilter(), mpa_encode_init(), nelly_decode_block(), nellymoser_init_static(), and psy_3gpp_init().
| #define exp2f | ( | x | ) |
Definition at line 295 of file libm.h.
Referenced by calc_reduction_3gpp(), celt_denormalize(), ff_atrac3p_init_dsp_static(), ff_exp10f(), filter_frame(), init_tables(), inv_log_scale(), log_scale(), nmr_solve_group(), process_anticollapse(), psy_3gpp_analyze_channel(), and wma_lsp_to_curve_init().
| #define isinf | ( | x | ) |
Definition at line 319 of file libm.h.
Referenced by do_xpsnr(), eval_expr(), generate_kernel(), get_exponent_dynamic(), and hypot().
| #define isnan | ( | x | ) |
Definition at line 342 of file libm.h.
Referenced by audio_decode_frame(), av_d2q(), av_expr_parse_and_eval(), clip_with_log(), compare_zimg_graph_builder_params(), compute_target_delay(), config_input(), config_input(), config_output(), config_props(), decompose_zp2biquads(), double2int64str(), draw_cubic_curve_to(), draw_quad_curve_to(), drawvg_filter_frame(), entry_func(), eval_expr(), eval_pts(), event_loop(), ff_print_pts(), filter_frame(), filter_frame(), final_block_filtering(), forced_pitch_unquant(), gain_interpolate_func(), generate_kernel(), get_qscale(), get_video_frame(), h264_metadata_handle_display_orientation(), init(), init_cscheme(), init_filter(), isnan_vec(), main(), noise(), normalize_double(), normalize_xy(), normalize_xy(), nppscale_eval_dimensions(), parse_keyframes_index(), parse_playlist(), print_displaymatrix(), request_frame(), scale_eval_dimensions(), sdl_audio_callback(), select_frame(), set_volume(), sox_read_header(), sync_clock_to_slave(), synchronize_audio(), tansig_approx(), thp_probe(), tonemap_opencl_init(), update_alpha(), update_context(), update_stat(), v360_slice(), video_refresh(), vif_statistic(), and vp_duration().
| #define isfinite | ( | x | ) |
Definition at line 361 of file libm.h.
Referenced by amf_parse_object(), apply_window_and_mdct(), av_exif_matrix_to_orientation(), av_ts_make_time_string2(), ff_aac_search_for_tns(), ff_pnm_decode_header(), fits_decode_frame(), get_output_dimension(), isfinite_array(), read_ts(), search_for_tns_short_pooled(), v360_slice(), vgs_eval(), vgs_fn_p(), vgs_fn_pathlen(), vgs_fn_randomg(), vorbis_parse_setup_hdr_codebooks(), xyz_to_equisolid(), xyz_to_orthographic(), and xyz_to_stereographic().
| #define ldexpf | ( | x, | |
| exp ) |
Definition at line 391 of file libm.h.
Referenced by convert(), get_float(), and vorbisfloat2float().
| #define llrint | ( | x | ) |
Definition at line 396 of file libm.h.
Referenced by adjust_frame_pts_to_encoder_tb(), build_filter(), ff_print_pts(), ff_rfps_add_frame(), filter_channel(), mpegaudio_tableinit(), mpegaudiodec_common_tableinit(), qdmc_decode_init(), read_header_openmpt(), read_packet_openmpt(), read_ts(), set(), setts_filter(), setup_compress_thresh(), video_sync_process(), and write_number().
| #define llrintf | ( | x | ) |
Definition at line 401 of file libm.h.
Referenced by lerp_color16(), and video_sync_process().
| #define log2 | ( | x | ) |
Definition at line 406 of file libm.h.
Referenced by calc_entropy(), calculate_visual_weight(), config_output(), decode_frame(), decode_ppc(), draw_mandelbrot(), dump_fir(), encode_block(), encode_init(), ff_hevc_intra_pred_dc_msa(), ff_vvc_pred_flag(), filter_frame(), filter_frame(), filter_frame(), find_best_state(), generate_kernel(), get_symbol2(), main(), midi(), mip_downsampling(), put_symbol2(), qscale2qlog(), and value_string().
| #define log2f | ( | x | ) |
Definition at line 411 of file libm.h.
Referenced by bit_allocation(), calc_pe_3gpp(), celt_frame_mdct(), coef2maxsf(), coef2minsf(), encode_float32_remap(), imc_decode_level_coefficients(), imc_decode_level_coefficients_raw(), inv_log_scale(), log_scale(), sbr_make_f_derived(), sbr_make_f_master(), search_for_pns(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), set_special_band_scalefactors(), and vif_statistic().
| #define log10f | ( | x | ) |
Definition at line 416 of file libm.h.
Referenced by compute_frame_features(), config_output(), draw_legend(), ff_amr_set_fixed_gain(), ff_sipr_decode_frame_16k(), g728_init_static_data(), get_energy(), get_log_bin_abs(), get_log_bin_sign(), get_scale(), and print_stats().
| #define sinf | ( | x | ) |
Definition at line 421 of file libm.h.
Referenced by activate(), angle_transform(), atrac9_decode_init(), barrel_to_xyz(), barrelsplit_to_xyz(), calculate_lanczos_coeffs(), calculate_rotation(), calculate_rotation_matrix(), celt_exp_rotation(), color_range(), config_eq_output(), config_input(), cylindrical_to_xyz(), cylindricalea_to_xyz(), dfisheye_to_xyz(), draw(), draw_mandelbrot(), equirect_to_xyz(), equisolid_to_xyz(), ff_sine_window_init(), filter_flt(), filter_flt(), filter_fltp(), filter_frame(), fir_to_phase(), fisheye_to_xyz(), focus_transform(), fov_from_dfov(), frand(), frand(), generate_eye_tape_map(), get_barrel_map(), get_barrel_split_map(), get_cubemap32_map(), get_rotated_cubemap_map(), hequirect_to_xyz(), hn_lpf(), hue_rotate_matrix(), ich2ipt(), lininterp(), make_lpf(), mercator_to_xyz(), pannini_to_xyz(), perspective_to_xyz(), prepare_equisolid_in(), prepare_equisolid_out(), prepare_orthographic_in(), prepare_orthographic_out(), ps_tableinit(), run_channel_fft(), set_params(), shue_rotate_matrix(), sincf(), sine_window_init_fixed(), sinusoidal_to_xyz(), siren_init(), stereographic_to_xyz(), upmix_7_1_5_0_side(), upmix_7_1_5_1(), view_matrix(), xyz_to_cylindricalea(), xyz_to_equisolid(), xyz_to_hammer(), xyz_to_orthographic(), and xyz_to_pannini().
|
static |
|
static |
Definition at line 63 of file libm.h.
Referenced by calculate_gamma(), config_output(), decode_spectrum_and_dequant(), draw_spatial(), filter_frame(), get_cm_factor(), get_scale(), power(), quantize_and_encode_band_cost_template(), and remap_log().
|
static |
Definition at line 70 of file libm.h.
Referenced by copysignl(), decfloat(), hexfloat(), and perform_compression().
erf function Algorithm taken from the Boost project, source: http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp Use, modification and distribution are subject to the Boost Software License, Version 1.0 (see notice below).
Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:
The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition at line 123 of file libm.h.
Referenced by bound(), erf(), and filter_dbl().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 368 of file libm.h.
Referenced by av_display_rotation_get(), check_stability(), config_output(), config_props(), decompose_transform(), decompose_zp2biquads(), distance(), draw_curves(), eval_expr(), freq_gain(), get_natural_factor(), get_response(), h264_metadata_handle_display_orientation(), mov_read_tkhd(), oscilloscope_config_input(), parse_points(), process_frame(), ps_tableinit(), ring2_test(), update_oscilloscope(), vectorscope16(), vectorscope8(), vgs_fn_pathlen(), and video_audio_display().
|
static |
|
static |
|
static |
Definition at line 446 of file libm.h.
Referenced by aom_config(), ap_init(), apply_dependent_coupling(), apply_independent_coupling(), autocorr_calc(), check_filter_process(), check_mspel_pixels(), combine_residual_frame(), comparef(), compute_row(), config_input(), dequant(), dequantize_dexp24_dither(), eval_expr(), ff_ffv1_encode_init(), ff_hevc_idct_32x32_lsx(), ff_tta_filter_process_sse4(), ff_tta_filter_process_ssse3(), ff_ttaenc_filter_process_sse4(), ff_ttaenc_filter_process_ssse3(), filter_frame(), frame_size(), get_rotation(), hevc_idct_32x32_msa(), hevc_idct_8x32_column_lsx(), hevc_idct_8x32_column_msa(), imdct_half_32(), imdct_half_64(), lpf(), mapres(), mediacodec_init(), merge_channel_layouts_internal(), mov_write_sidx_tags(), mv_compression(), noise_scale(), ps_tableinit(), ransac_update_num_iters(), read_global_param(), rkmpp_init_encoder(), sampling_init(), sbr_hf_apply_noise(), sbr_hf_assemble(), sbr_hf_inverse_filter(), sbr_sum_square_c(), scale_coefs(), scale_coefs_q2(), sls_flags_filename_process(), subband_scale(), tta_filter_process_c(), ttaenc_filter_process_c(), vector_fmul_window_scaled_c(), and write_time().
|
static |
Definition at line 453 of file libm.h.
Referenced by bitreduction(), output_frame(), search_for_pns(), set_special_band_scalefactors(), and xvid_correct_framerate().
|
static |