|
#define | AVUTIL_COMMON_H |
|
#define | AV_NE(be, le) (le) |
|
#define | RSHIFT(a, b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) |
|
#define | ROUNDED_DIV(a, b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
|
#define | FFABS(a) ((a) >= 0 ? (a) : (-(a))) |
|
#define | FFSIGN(a) ((a) > 0 ? 1 : -1) |
|
#define | FFMAX(a, b) ((a) > (b) ? (a) : (b)) |
|
#define | FFMAX3(a, b, c) FFMAX(FFMAX(a,b),c) |
|
#define | FFMIN(a, b) ((a) > (b) ? (b) : (a)) |
|
#define | FFMIN3(a, b, c) FFMIN(FFMIN(a,b),c) |
|
#define | FFSWAP(type, a, b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) |
|
#define | FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) |
|
#define | FFALIGN(x, a) (((x)+(a)-1)&~((a)-1)) |
|
#define | MKTAG(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24)) |
|
#define | MKBETAG(a, b, c, d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24)) |
|
#define | GET_UTF8(val, GET_BYTE, ERROR) |
|
#define | GET_UTF16(val, GET_16BIT, ERROR) |
|
#define | PUT_UTF8(val, tmp, PUT_BYTE) |
|
#define | PUT_UTF16(val, tmp, PUT_16BIT) |
|
#define | AV_NE(be, le) (le) |
|
#define | RSHIFT(a, b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) |
|
#define | ROUNDED_DIV(a, b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
|
#define | FFABS(a) ((a) >= 0 ? (a) : (-(a))) |
|
#define | FFSIGN(a) ((a) > 0 ? 1 : -1) |
|
#define | FFMAX(a, b) ((a) > (b) ? (a) : (b)) |
|
#define | FFMAX3(a, b, c) FFMAX(FFMAX(a,b),c) |
|
#define | FFMIN(a, b) ((a) > (b) ? (b) : (a)) |
|
#define | FFMIN3(a, b, c) FFMIN(FFMIN(a,b),c) |
|
#define | FFSWAP(type, a, b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) |
|
#define | FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) |
|
#define | FFALIGN(x, a) (((x)+(a)-1)&~((a)-1)) |
|
#define | MKTAG(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24)) |
|
#define | MKBETAG(a, b, c, d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24)) |
|
#define | GET_UTF8(val, GET_BYTE, ERROR) |
| Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form. More...
|
|
#define | GET_UTF16(val, GET_16BIT, ERROR) |
| Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form. More...
|
|
#define | PUT_UTF8(val, tmp, PUT_BYTE) |
| Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long). More...
|
|
#define | PUT_UTF16(val, tmp, PUT_16BIT) |
| Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes). More...
|
|
|
av_const int | av_log2 (unsigned v) |
|
av_const int | av_log2_16bit (unsigned v) |
|
static av_always_inline
av_const int | av_clip_c (int a, int amin, int amax) |
| Clip a signed integer value into the amin-amax range. More...
|
|
static av_always_inline
av_const uint8_t | av_clip_uint8_c (int a) |
| Clip a signed integer value into the 0-255 range. More...
|
|
static av_always_inline
av_const int8_t | av_clip_int8_c (int a) |
| Clip a signed integer value into the -128,127 range. More...
|
|
static av_always_inline
av_const uint16_t | av_clip_uint16_c (int a) |
| Clip a signed integer value into the 0-65535 range. More...
|
|
static av_always_inline
av_const int16_t | av_clip_int16_c (int a) |
| Clip a signed integer value into the -32768,32767 range. More...
|
|
static av_always_inline
av_const int32_t | av_clipl_int32_c (int64_t a) |
| Clip a signed 64-bit integer value into the -2147483648,2147483647 range. More...
|
|
static av_always_inline
av_const unsigned | av_clip_uintp2_c (int a, int p) |
| Clip a signed integer to an unsigned power of two range. More...
|
|
static av_always_inline int | av_sat_add32_c (int a, int b) |
| Add two signed 32-bit values with saturation. More...
|
|
static av_always_inline int | av_sat_dadd32_c (int a, int b) |
| Add a doubled value to another value with saturation at both stages. More...
|
|
static av_always_inline
av_const float | av_clipf_c (float a, float amin, float amax) |
| Clip a float value into the amin-amax range. More...
|
|
static av_always_inline
av_const int | av_ceil_log2_c (int x) |
| Compute ceil(log2(x)). More...
|
|
static av_always_inline
av_const int | av_popcount_c (uint32_t x) |
| Count number of bits set to one in x. More...
|
|
static av_always_inline
av_const int | av_popcount64_c (uint64_t x) |
| Count number of bits set to one in x. More...
|
|
common internal and external API header
Definition in file common.h.
#define FFMAX |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) > (b) ? (a) : (b)) |
- Examples:
- libavcodec/api-example.c.
Referenced by aac_encode_frame(), ac3_bit_alloc_calc_bap_c(), ac3_eac3_probe(), adaptive_quantization(), add_codec(), add_tonal_components(), adjust_frame_information(), adpcm_compress_trellis(), adpcm_decode_frame(), adts_aac_probe(), allocate_buffers(), apply_channel_coupling(), apply_delogo(), apply_lpc(), apply_tns(), asf_build_simple_index(), asf_write_packet(), av_append_packet(), av_d2q(), av_fast_malloc(), av_fast_realloc(), av_image_copy(), av_probe_input_buffer(), avcodec_align_dimensions(), avi_read_header(), avi_read_packet(), avi_read_seek(), avi_write_counters(), avpicture_layout(), avpriv_ac3_parse_header(), avresample_build_matrix(), avresample_get_delay(), avresample_open(), await_reference_row(), bidir_refine(), bink_decode_plane(), bit_allocation(), blend_frame(), build_feed_streams(), build_filter(), build_table(), calc_bit_demand(), calc_input_response(), calc_lowcomp(), calc_lowcomp1(), calc_reduced_thr_3gpp(), calc_reduction_3gpp(), calculate_scales(), cavs_decode_frame(), cdg_scroll(), check_stream_max_drift(), chroma_4mv_motion(), comp_ppf_coeff(), compute_pkt_fields2(), compute_target_time(), config_input(), copy(), copy_backptr(), copy_chapters(), create_vorbis_context(), dca_decode_frame(), dct_error(), dct_max8x8_c(), decode(), decode_audio_block(), decode_channel_residues(), decode_channel_sound_unit(), decode_chunks(), decode_frame(), decode_init(), decode_lspf(), decode_p_frame(), decode_postinit(), decode_scale_factors(), decode_var_block_data(), decorrelation(), direct_search(), dnxhd_encode_rdo(), dnxhd_find_qscale(), dtext_prepare_text(), encode_block(), encode_frame(), encode_init(), encode_picture(), epzs_motion_search_internal(), estimate_timings(), estimate_timings_from_pts(), execute_code(), ff_ac3_bit_alloc_calc_mask(), ff_ac3_bit_alloc_calc_psd(), ff_acelp_reorder_lsf(), ff_acelp_update_past_gain(), ff_ass_add_rect(), ff_audio_resample_init(), ff_dither_alloc(), ff_emulated_edge_mc(), ff_gen_syncpoint_search(), ff_get_best_fcode(), ff_gradfun_filter_line_c(), ff_init_me(), ff_jpegls_init_state(), ff_jpegls_reset_coding_parameters(), ff_jpegls_update_state_regular(), ff_lag_rac_init(), ff_mjpeg_decode_dqt(), ff_MPV_common_init(), ff_MPV_encode_picture(), ff_MPV_lowest_referenced_row(), ff_nelly_get_sample_bits(), ff_seek_frame_binary(), ff_set_min_dist_lsf(), ff_timefilter_update(), ffio_rewind_with_probe_data(), ffm_seek1(), ffv1_encode_init(), filter_frame(), filter_level_for_mb(), find_best_state(), find_hb_gain(), find_max_val(), find_new_headers(), findCode(), flac_parse(), flv_write_packet(), full_search(), gain_scale(), get_block_rd(), get_channel_layout_single(), get_dc(), get_exponent_dynamic(), get_floor_average(), get_limits(), get_lowest_part_list_y(), get_lowest_part_y(), get_new_centroids(), get_quant_quality(), get_quants(), get_sample_rate(), get_tag(), get_video_frame(), get_visual_weight(), gmc1_motion(), guess_mv(), gxf_seek(), h_block_filter(), hls_window(), hpel_motion(), http_start_receive_data(), img_read_header(), init_exp(), init_offset(), init_ralf_vlc(), initFilter(), inverse_quant(), is_intra_more_likely(), iterative_me(), kalman_smoothen(), lame_calc_attack_threshold(), libopenjpeg_copy_to_packed16(), libopenjpeg_encode_init(), main(), match_format(), matroska_parse_block(), matroska_read_seek(), median4(), mkv_write_ass_blocks(), mkv_write_packet_internal(), modify_qscale(), mov_read_ctts(), mov_write_esds_tag(), mov_write_stsz_tag(), mp3_read_probe(), mp_decode_layer3(), mpeg_motion_internal(), MPV_motion_internal(), mxf_compute_ptses_fake_index(), mxf_edit_unit_absolute_offset(), mxf_read_seek(), noise_enhancer(), nut_write_header(), opus_packet(), output_chunk_list(), output_packet(), paint_mouse_pointer(), parse_adts_frame_header(), parse_media_type(), ps_tableinit(), put_codebook_header(), qpel_motion(), quantize_lpc_coefs(), queue_picture(), read_header(), read_packet(), read_sbr_grid(), read_seek(), read_shape_from_file(), read_var_block_data(), render_charset(), resample(), residue_encode(), retry_transfer_wrapper(), roq_dpcm_encode_frame(), rv10_decode_frame(), rv10_decode_packet(), rv34_decode_mv(), rv34_gen_vlc(), sbr_hf_calc_npatches(), sbr_make_f_derived(), sbr_x_gen(), search_for_ms(), search_for_quantizers_anmr(), search_for_quantizers_faac(), segment_hls_window(), select_input_picture(), select_sample_rate(), set_sample_rate_params(), skip_check(), smjpeg_write_packet(), stability_factor(), stabilize_lsps(), swf_read_packet(), sws_diffVec(), sws_init_context(), sws_sumVec(), swScale(), tak_parse(), umh_search(), update_stream_timings(), v_block_filter(), var_diamond_search(), vc1_decode_frame(), video_refresh_timer(), wav_write_packet(), wmv2_pred_motion(), write_frame(), x11grab_read_header(), x11grab_read_packet(), x8_ac_compensation(), x8_loop_filter(), x8_setup_spatial_compensation(), yop_read_seek(), and zmbv_me().
#define FFMIN |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) > (b) ? (b) : (a)) |
Referenced by a64multi_encode_frame(), aac_encode_frame(), ac3_bit_alloc_calc_bap_c(), ac3_decode_frame(), add_metadata(), adpcm_ima_compress_sample(), adpcm_yamaha_compress_sample(), aiff_read_packet(), alac_decode_close(), allocate_buffers(), ape_decode_frame(), apply_channel_coupling(), apply_lpc(), apply_ltp(), apply_pitch_filters(), apply_tns(), array_min_int16(), asf_read_stream_properties(), asfrtp_parse_packet(), audio_write_packet(), autocorr_max(), av_audio_fifo_drain(), av_audio_fifo_read(), av_fifo_generic_read(), av_fifo_generic_write(), av_parse_color(), av_probe_input_buffer(), av_reduce(), av_url_split(), avcodec_get_pix_fmt_loss(), avfilter_get_audio_buffer_ref_from_arrays(), avi_read_header(), avi_read_nikon(), avio_get_str(), avio_write(), avpriv_mpv_find_start_code(), avresample_open(), aw_parse_coords(), await_reference_mb_row(), await_references(), bidir_refine(), blend_frame(), buffer_offset(), build_filter(), build_huff(), build_table(), bwf_write_bext_string(), bytestream2_copy_buffer(), bytestream2_get_buffer(), bytestream2_put_buffer(), bytestream2_set_buffer(), bytestream2_skip(), bytestream2_skip_p(), calc_bit_demand(), calc_cpl_coord(), cdg_scroll(), channelmap_filter_frame(), check_stream_max_drift(), chomp6(), chrRangeToJpeg16_c(), chrRangeToJpeg_c(), cin_decode_lzss(), cin_decode_rle(), cinepak_decode(), cinvideo_decode_frame(), clean_index(), cng_decode_frame(), commit_bitstream_and_slice_buffer(), compute_rematrixing_strategy(), copy_bits(), copy_chapters(), copy_moof(), copy_tag(), count_mantissa_bits_update_ch(), count_pixels(), create_adapt_vect(), crypto_read(), dca_decode_frame(), dct_quantize_trellis_c(), decode_555(), decode_ac_coeffs(), decode_block(), decode_block_refinement(), decode_byterun(), decode_dc_coeffs(), decode_finish_row(), decode_frame(), decode_frame_headers(), decode_frame_ilbm(), decode_header(), decode_lspf(), decode_ltp(), decode_mb_i(), decode_pixel(), decode_prediction(), decode_rle(), decode_slice_header(), decode_subframe(), decode_tonal_components(), dfa_decode_frame(), direct_search(), dnxhd_encode_rdo(), dnxhd_find_qscale(), dnxhd_mb_var_thread(), do_rematrixing(), dtext_prepare_text(), dxa_read_packet(), eightsvx_decode_frame(), encode_acs(), encode_dcs(), encode_exponents_blk_ch(), encode_ext_header(), encode_frame(), encode_init(), encode_scalar(), encode_superframe(), epzs_motion_search_internal(), estimate_acs(), estimate_dcs(), estimate_sid_gain(), execute_code(), extrapolate_isf(), ff_aac_ac3_parse(), ff_ac3_apply_rematrixing(), ff_ac3_bit_alloc_calc_mask(), ff_ac3_bit_alloc_calc_psd(), ff_acelp_reorder_lsf(), ff_af_queue_remove(), ff_alsa_open(), ff_amf_get_field_value(), ff_amf_read_string(), ff_amf_tag_contents(), ff_audio_resample_init(), ff_cmap_read_palette(), ff_convert_dither(), ff_copy_and_dup(), ff_draw_horiz_band(), ff_eac3_apply_spectral_extension(), ff_emulated_edge_mc(), ff_estimate_p_frame_motion(), ff_get_best_fcode(), ff_init_long_region(), ff_init_me(), ff_insert_pad(), ff_interleave_new_audio_packet(), ff_isom_write_avcc(), ff_jpegls_reset_coding_parameters(), ff_jpegls_update_state_regular(), ff_lag_rac_init(), ff_mms_read_data(), ff_mms_read_header(), ff_MPV_common_init(), ff_MPV_lowest_referenced_row(), ff_msmpeg4_encode_ext_header(), ff_poll_frame(), ff_region_offset2size(), ff_rtmp_packet_read_internal(), ff_rtmp_packet_write(), ff_rtp_check_and_send_back_rr(), ff_rtp_send_aac(), ff_rtp_send_h263(), ff_rtp_send_h263_rfc2190(), ff_rtp_send_jpeg(), ff_rtp_send_latm(), ff_rtp_send_vp8(), ff_sipr_decode_frame_16k(), ff_spatial_idwt_buffered_slice(), ff_spatial_idwt_slice(), ff_voc_get_packet(), ff_vorbis_floor1_render_list(), ffio_fill(), ffm_seek1(), ffurl_alloc(), fill_rectangle(), filter_common(), filter_frame(), filter_level_for_mb(), find_best_state(), find_optimal_param(), flac_fifo_read(), flac_fifo_read_wrap(), flac_parse(), floor_encode(), frame_thread_init(), full_search(), generate_noise(), get_available_samples(), get_block_rd(), get_dc(), get_exponent_dynamic(), get_floor_average(), get_limits(), get_max_p_order(), get_nb_samples(), get_new_centroids(), get_quants(), get_slice_data(), get_sockaddr(), get_str(), get_symbol(), get_symbol_inline(), get_visual_weight(), gif_image_write_image(), guess_mv(), handle_trimming(), hex_log(), hScale16To15_c(), hScale16To19_c(), hScale8To15_c(), hScale8To19_c(), hScale_altivec_real(), http_read(), http_receive_data(), huffman_decode(), init_poc(), init_ralf_vlc(), initFilter(), inverse_channel_transform(), inverse_quant(), ivi_init_tiles(), join_request_frame(), kalman_smoothen(), kset(), lag_decode_line(), lag_decode_zero_run_line(), latm_decode_audio_specific_config(), libopenjpeg_copy_to_packed16(), lsf_decode_fp(), lumRangeToJpeg16_c(), lumRangeToJpeg_c(), matroska_ebmlnum_uint(), matroska_read_header(), median4(), mjpegb_decode_frame(), mkv_write_ass_blocks(), model_calc_threshold(), mov2textsub(), mov_build_index(), mov_read_default(), mov_read_dref(), mov_write_chpl_tag(), mov_write_uuidprof_tag(), mp3_update_xing(), mp_decode_frame(), mp_get_vlc(), mp_read_changes_map(), mpc8_get_mask(), mpeg4_decode_mb(), mpeg4_decode_sprite_trajectory(), mpeg4_encode_gop_header(), mpeg_decode_slice(), mpegaudio_parse(), mss4_init_vlc(), mszh_decomp(), mxf_read_packet(), mxf_read_seek(), mxpeg_decode_app(), mxpeg_decode_com(), noise_enhancer(), nsv_read_chunk(), nut_write_packet(), ogg_buffer_data(), ogg_packet(), op(), opt_default(), opus_packet(), output_plane(), packed_16bpc_bswap(), paint_mouse_pointer(), param_write_hex(), parse_chunks(), parse_picture(), pitch_sharpening(), png_decode_idat(), precalc_coefs(), pred_intra_mode(), predict_slice(), predict_slice_buffered(), psy_3gpp_init(), put_bitstream_info(), put_symbol(), put_symbol_inline(), pva_read_timestamp(), qcp_read_header(), qdm2_parse_subpacket(), qdm2_restore_block(), qtrle_encode_line(), quantize_bands(), rac_init(), raw_read_packet(), read_access_unit(), read_dcs(), read_header(), read_packet(), read_probe(), read_seek(), read_var_block_data(), render_charset(), render_slice(), request_frame(), resample(), return_audio_frame(), rice_decompress(), rm_assemble_video_frame(), rpza_decode_stream(), rtcp_parse_packet(), rtmp_write(), rtp_parse_packet_internal(), rtp_send_ilbc(), rtp_send_samples(), rtp_write_header(), rv20_decode_picture_header(), rv30_decode_init(), rv34_gen_vlc(), save_bits(), sbr_gain_calc(), sbr_make_f_master(), scale_vector(), scaleforopp(), scaleforopp_x(), scaleforopp_y(), scaleforsame(), search_for_ms(), search_for_quantizers_anmr(), search_for_quantizers_faac(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), seq_unpack_rle_block(), set_bandwidth(), shorten_decode_frame(), spatial_compensation_1(), spatial_compensation_9(), spdif_probe(), srt_to_ass(), stabilize_lsps(), sub_left_prediction_bgr32(), subframe_count_exact(), svq3_decode_mb(), svq3_get_ue_golomb(), swScale(), synth_frame(), synthesis(), tak_parse(), targa_decode_rle(), tgq_decode_mb(), thread_init(), to_meta_with_crop(), umh_search(), unpack(), unpack_coeffs(), update_dimensions(), update_stream_timings(), var_diamond_search(), vc1_decode_frame(), vc1_filter_line(), video_audio_display(), vmdaudio_decode_frame(), vp5_parse_coeff(), vp6_parse_coeff_huffman(), vp8_decode_frame(), vp8_init(), vqf_read_header(), wav_write_packet(), wiener_denoise(), write_manifest(), write_subframes(), wtvfile_read_packet(), x11grab_read_header(), x11grab_read_packet(), x8_get_prediction(), x8_loop_filter(), x8_setup_spatial_compensation(), xan_decode_frame(), xan_wc3_output_pixel_run(), xmv_fetch_audio_packet(), xsub_encode_rle(), xwma_read_packet(), yop_read_seek(), and zmbv_me().