FFmpeg  2.1.1
Macros | Functions | Variables
common.h File Reference

common internal and external API header More...

#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "attributes.h"
#include "version.h"
#include "libavutil/avconfig.h"
#include "common.h"
#include "mem.h"

Go to the source code of this file.

Macros

#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 FF_CEIL_RSHIFT(a, b)
 
#define FFUDIV(a, b)   (((a)>0 ?(a):(a)-(b)+1) / (b))
 
#define FFUMOD(a, b)   ((a)-(b)*FFUDIV(a,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 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 FF_CEIL_RSHIFT(a, b)
 
#define FFUDIV(a, b)   (((a)>0 ?(a):(a)-(b)+1) / (b))
 
#define FFUMOD(a, b)   ((a)-(b)*FFUDIV(a,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 FF_CEIL_RSHIFT(a, b)
 
#define FFUDIV(a, b)   (((a)>0 ?(a):(a)-(b)+1) / (b))
 
#define FFUMOD(a, b)   ((a)-(b)*FFUDIV(a,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...
 

Functions

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 int64_t 
av_clip64_c (int64_t a, int64_t amin, int64_t amax)
 Clip a signed 64bit 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 double 
av_clipd_c (double a, double amin, double amax)
 Clip a double 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...
 

Variables

attribute_deprecated const uint8_t av_reverse [256]
 Reverse the order of the bits of an 8-bits unsigned integer. More...
 

Detailed Description

common internal and external API header

Definition in file common.h.

Macro Definition Documentation

#define AVUTIL_COMMON_H

Definition at line 567 of file avcodec.h.

#define AV_NE (   be,
  le 
)    (le)
#define RSHIFT (   a,
  b 
)    ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))

Definition at line 912 of file avcodec.h.

Referenced by get_amv(), unpack_vectors(), and vp56_decode_4mv().

#define ROUNDED_DIV (   a,
  b 
)    (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
#define FF_CEIL_RSHIFT (   a,
  b 
)
#define FFUDIV (   a,
  b 
)    (((a)>0 ?(a):(a)-(b)+1) / (b))
#define FFUMOD (   a,
  b 
)    ((a)-(b)*FFUDIV(a,b))

Definition at line 919 of file avcodec.h.

Referenced by ff_mpeg4_encode_picture_header(), and mpeg4_encode_gop_header().

#define FFABS (   a)    ((a) >= 0 ? (a) : (-(a)))

Definition at line 920 of file avcodec.h.

Referenced by add_8x8basis(), alloc_scratch_buffers(), apply_channel_coupling(), apply_tilt_comp(), asf_read_stream_properties(), av_compare_ts(), av_reduce(), avi_read_header(), await_reference_row(), build_abs_diff_mask(), check_mv(), codebook_sanity_check_for_rate_quarter(), config_video_output(), D(), dct_error(), dct_max8x8_c(), dct_quantize_refine(), dct_quantize_trellis_c(), dct_single_coeff_elimination(), decode_bmv_frame(), decode_dc_coeffs(), decode_dct(), decode_fixed_vector(), decode_frame(), decode_frame_header(), decode_pic(), decode_q_branch(), dering(), dirac_decode_picture_header(), do_a_deblock_C(), do_apply_filter(), doHorizDefFilter_C(), doHorizLowPass_C(), doVertDefFilter(), doVertLowPass(), dpcm_predict(), draw_line(), dts_probe(), dv_init_enc_block(), encode_acs(), encode_block(), encode_header(), encode_picture_ls(), encode_q_branch(), encode_q_branch2(), encode_subband_c0run(), estimate_acs(), estimate_dcs(), estimate_stereo_mode(), estimate_timings_from_pts(), ff_h263_encode_picture_header(), ff_h264_direct_ref_list_init(), ff_init_me(), ff_jpegls_update_state_regular(), ff_mpeg1_encode_init(), ff_mpeg4_encode_mb(), ff_mpv_frame_size_alloc(), ff_msmpeg4_decode_block(), ff_nelly_get_sample_bits(), ff_ps_read_data(), filter_frame(), filter_line_c(), filter_line_c_16bit(), filter_plane(), flashsv_encode_frame(), flv_read_packet(), generate_noise(), get_block_bits(), get_diff_limited_q(), get_needed_flags(), get_qminmax(), get_rrp(), get_sae(), get_scale_factor(), get_shift(), get_tilt_comp(), guess_mv(), gxf_seek(), h263_h_loop_filter_c(), h263_v_loop_filter_c(), h264_loop_filter_chroma(), h264_loop_filter_chroma_intra(), h264_loop_filter_luma(), h264_loop_filter_luma_intra(), h_block_filter(), hadamard8_intra8x8_c(), headroom(), hev(), horizX1Filter(), implicit_weight_table(), init_muxer(), init_uni_ac_vlc(), initFilter(), interpol(), intra_pred(), inv_predict_11(), long_term_filter(), loop_filter(), ls_decode_line(), ls_encode_line(), ls_encode_regular(), ls_get_code_runterm(), main(), make_glyphs(), mov_find_next_sample(), mov_read_ctts(), mp3_write_xing(), mpc8_decode_frame(), mpeg1_encode_sequence_header(), mpeg4_decode_block(), msrle_decode_8_16_24_32(), mss4_decode_dct(), normal_limit(), nsse16_c(), nsse8_c(), packed_16bpc_bswap(), packedCopyWrapper(), paf_vid_decode(), pp_postprocess(), precalc_coefs(), pred_spatial_direct_motion(), put_alpha_diff(), put_s(), put_symbol(), put_symbol_inline(), render_line(), resample_one(), reverse_dc_prediction(), rtcp_update_jitter(), rv40_loop_filter_strength(), rv40_strong_loop_filter(), rv40_weak_loop_filter(), sab_diamond_search(), scale_vector(), scaleforopp_x(), scaleforopp_y(), scaleforsame_x(), scaleforsame_y(), search_for_quantizers_faac(), seq_unpack_rle_block(), simple_limit(), skip_check(), sobel(), sum_abs_dctelem_c(), swap_channel_layouts_on_filter(), swri_resample(), sws_getShiftedVec(), sws_scale(), try_8x8basis(), ts_str(), update_vlc_state(), v_block_filter(), vc1_filter_line(), vc1_pred_b_mv(), vc1_pred_mv(), vertX1Filter(), vorbis_floor1_decode(), vp6_filter(), vsad16_c(), w_c(), wmv2_pred_motion(), x8_loop_filter(), and xan_wc3_copy_pixel_run().

#define FFSIGN (   a)    ((a) > 0 ? 1 : -1)
#define FFMAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))
Examples:
doc/examples/decoding_encoding.c.

Definition at line 923 of file avcodec.h.

Referenced by aac_encode_frame(), ac3_bit_alloc_calc_bap_c(), ac3_eac3_probe(), adaptive_quantization(), add_codec(), add_file(), add_tonal_components(), adjust_frame_information(), adpcm_compress_trellis(), adpcm_decode_frame(), adts_aac_probe(), alloc_array_elem(), alloc_picture(), alloc_sequence_buffers(), allocate_buffers(), append_packet_chunked(), apply_8x8(), apply_channel_coupling(), apply_delogo(), apply_lpc(), apply_tns(), asf_build_simple_index(), asf_write_packet(), auto_matrix(), av_d2q(), av_fast_realloc(), av_fifo_grow(), av_image_copy(), av_image_copy_to_buffer(), av_probe_input_buffer2(), av_probe_input_format3(), avcodec_align_dimensions(), avcodec_align_dimensions2(), avfilter_graph_dump_to_buf(), avformat_find_stream_info(), avi_read_header(), avi_read_packet(), avi_read_seek(), avi_write_counters(), avpriv_ac3_parse_header(), avresample_build_matrix(), avresample_open(), await_reference_row(), bidir_refine(), bink_decode_plane(), bit_allocation(), blend_image(), blur_pixel(), build_diff_map(), build_feed_streams(), build_filter(), build_table(), calc_bit_demand(), calc_input_response(), calc_lowcomp(), calc_lowcomp1(), calc_reduced_thr_3gpp(), calc_reduction_3gpp(), calc_stereo_peak(), calculate_display_rect(), calculate_scales(), cavs_decode_frame(), cdg_scroll(), check_external_clock_speed(), chroma_4mv_motion(), chroma_4mv_motion_lowres(), cmap_read_palette(), codec_reinit(), comp_ppf_coeff(), compare_fields(), compute_affinity(), compute_pkt_fields2(), compute_target_delay(), config_input(), config_output(), config_props(), configure_video_filters(), copy(), copy_backptr(), copy_chapters(), create(), create_vorbis_context(), D(), dc_test(), dca_decode_frame(), dct_error(), dct_max8x8_c(), decode(), decode_audio_block(), decode_b(), decode_channel_residues(), decode_channel_sound_unit(), decode_chunks(), decode_component(), decode_entropy_coded_image(), decode_entropy_image(), decode_frame(), decode_frame_header(), decode_init(), decode_lowdelay_slice(), decode_lspf(), decode_p_frame(), decode_postinit(), decode_scale_factors(), decode_var_block_data(), decorrelation(), dirac_decode_frame_internal(), dirac_unpack_prediction_parameters(), direct_search(), dnxhd_encode_rdo(), dnxhd_find_qscale(), do_a_deblock_C(), do_psnr(), doHorizDefFilter_C(), doVertDefFilter(), draw_text(), dv_decode_video_segment(), encode_block(), encode_cblk(), encode_dvd_subtitles(), encode_frame(), encode_init(), encode_picture(), epzs_motion_search_internal(), estimate_timings(), estimate_timings_from_pts(), execute_code(), fade(), fade_gain(), 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_mix(), ff_audio_resample_init(), ff_dither_alloc(), ff_draw_init(), ff_emulated_edge_mc(), ff_fast_malloc(), ff_find_last_ts(), ff_g729_postfilter(), ff_gen_syncpoint_search(), ff_get_best_fcode(), ff_gradfun_filter_line_c(), ff_h264_alloc_tables(), ff_h264_decode_seq_parameter_set(), ff_h264_execute_ref_pic_marking(), ff_init_buffer_info(), ff_init_me(), ff_interleave_packet_per_dts(), ff_jpeg2000_dwt_init(), ff_jpeg2000_init_component(), ff_jpegls_init_state(), ff_jpegls_reset_coding_parameters(), ff_jpegls_update_state_regular(), ff_lag_rac_init(), ff_mjpeg_decode_dqt(), ff_MPV_encode_init(), ff_MPV_encode_picture(), ff_MPV_lowest_referenced_row(), ff_msmpeg4_encode_ext_header(), ff_nelly_get_sample_bits(), ff_pca(), ff_seek_frame_binary(), ff_set_min_dist_lsf(), ff_snow_common_init_after_header(), ff_snow_pred_block(), ff_srtp_decrypt(), ff_timefilter_update(), ff_yuv2rgb_c_init_tables(), ffio_limit(), ffio_rewind_with_probe_data(), ffm_seek1(), filter(), filter_frame(), filter_level_for_mb(), find_best_state(), find_hb_gain(), find_max_val(), find_new_headers(), find_next_delta_ts(), findCode(), flac_parse(), flv_write_packet(), frame_erasure(), framesync_sync_level_update(), ftp_seek(), ftp_write(), full_search(), g729d_onset_decision(), gain_scale(), generate_intervals(), generate_transition(), get_block_rd(), get_channel_layout_single(), get_dc(), get_exponent_dynamic(), get_floor_average(), get_fps(), get_limits(), get_lowest_part_list_y(), get_lowest_part_y(), get_new_centroids(), get_pix_fmt_depth(), get_qcx(), get_quant_quality(), get_quants(), get_rotated_h(), get_rotated_w(), get_sample_rate(), get_siz(), get_tag(), get_visual_weight(), gmc1_motion(), guess_dc(), guess_mv(), guess_ni_flag(), gxf_seek(), h_block_filter(), handle_file(), hls_window(), horizX1Filter(), hpel_motion(), hpel_motion_lowres(), http_start_receive_data(), huff_reader_build_canonical(), init(), init_exp(), init_luts(), init_offset(), init_pass2(), init_pattern_from_file(), init_ralf_vlc(), init_tile(), initFilter(), interpol(), inverse_quant(), is_intra_more_likely(), iterative_me(), kalman_smoothen(), lame_calc_attack_threshold(), lavfi_read_header(), libopenjpeg_copy_to_packed16(), libopenjpeg_copyto16(), libopenjpeg_encode_init(), loas_probe(), long_term_filter(), main(), make_glyphs(), match_format(), matroska_parse_block(), matroska_read_seek(), median4(), mkv_write_header(), mkv_write_packet_internal(), mmap_read_frame(), mmsh_read_seek(), modify_qscale(), mov_build_index(), mov_probe(), mov_update_dts_shift(), mov_write_stsz_tag(), movie_common_init(), mp3_read_probe(), mp3_write_xing(), mp_decode_layer3(), mpc_read_seek(), mpeg_motion_internal(), mpeg_motion_lowres(), mpegts_probe(), mxf_compute_ptses_fake_index(), mxf_edit_unit_absolute_offset(), mxf_read_seek(), mxf_timestamp_to_str(), noise_enhancer(), nut_write_header(), opus_packet(), output_chunk_list(), output_packet(), paint_mouse_pointer(), parse_adts_frame_header(), parse_commands(), parse_intervals(), parse_media_type(), plot_spectrum_column(), postfilter(), pp_postprocess(), print_report(), print_stats(), process_frame_obj(), ps_tableinit(), put_codebook_header(), qpel_motion(), quantize_lpc_coefs(), raw_decode(), read_header(), read_huffman_tables(), read_packet(), read_sbr_grid(), read_seek(), read_shape_from_file(), read_var_block_data(), read_whole_file(), render_charset(), resample(), resample_init(), residue_encode(), retry_transfer_wrapper(), roq_dpcm_encode_frame(), rv10_decode_frame(), rv10_decode_packet(), rv34_decode_mv(), rv34_gen_vlc(), sbg_read_header(), sbr_hf_calc_npatches(), sbr_make_f_derived(), sbr_x_gen(), scale_vector(), search_for_ms(), search_for_quantizers_anmr(), search_for_quantizers_faac(), seg_write_packet(), segment_list_open(), select_input_picture(), select_sample_rate(), send_silence(), set_format(), set_sample_rate_params(), skip_check(), smjpeg_write_packet(), smv_img_pnt(), stability_factor(), stabilize_lsps(), sub2video_prepare(), swf_read_packet(), swr_convert_internal(), swri_resample(), sws_diffVec(), sws_init_context(), sws_sumVec(), swscale(), synchronize_audio(), tak_parse(), thp_read_packet(), umh_search(), update_index(), update_stat(), update_stream_timings(), v_block_filter(), var_diamond_search(), vc1_decode_frame(), vertX1Filter(), vorbis_packet(), wmv2_pred_motion(), write_frame(), x11grab_read_header(), x11grab_read_packet(), x8_ac_compensation(), x8_loop_filter(), x8_setup_spatial_compensation(), yae_align(), yae_flush(), yae_overlap_add(), yop_read_seek(), and zmbv_me().

#define FFMAX3 (   a,
  b,
  c 
)    FFMAX(FFMAX(a,b),c)
#define FFMIN (   a,
  b 
)    ((a) > (b) ? (b) : (a))
Examples:
doc/examples/demuxing.c.

Definition at line 925 of file avcodec.h.

Referenced by a64multi_encode_frame(), aac_encode_frame(), aac_parse_packet(), aasc_decode_init(), ac3_bit_alloc_calc_bap_c(), ac3_decode_frame(), adapt_prob(), add_bell(), add_metadata(), adpcm_ima_compress_sample(), adpcm_yamaha_compress_sample(), adts_aac_probe(), afc_read_packet(), aic_decode_slice(), aiff_read_packet(), alac_decode_close(), alloc_array_elem(), alloc_picture(), allocate_buffers(), amf_tag_contents(), analyze_mono(), analyze_stereo(), ape_decode_frame(), append_packet_chunked(), apply_channel_coupling(), apply_lpc(), apply_ltp(), apply_pitch_filters(), apply_tns(), array_min_int16(), asf_read_stream_properties(), asfrtp_parse_packet(), audio_get_buffer(), audio_open(), audio_write_packet(), autocorr_max(), av_adler32_update(), av_audio_fifo_drain(), av_audio_fifo_read(), av_bprint_alloc(), av_bprint_append_data(), av_bprint_chars(), av_bprint_finalize(), av_bprint_grow(), av_bprint_init(), av_bprint_strftime(), av_buffer_realloc(), av_fifo_generic_read(), av_fifo_generic_write(), av_find_best_stream(), av_grow_packet(), av_md5_update(), av_packet_split_side_data(), av_parse_color(), av_probe_input_buffer2(), av_probe_input_format3(), av_reduce(), av_url_split(), avi_read_header(), avi_read_nikon(), avi_read_seek(), avio_get_str(), avio_write(), avpriv_find_start_code(), avresample_open(), aw_parse_coords(), await_reference_mb_row(), await_references(), bidir_refine(), blend_frame(), blend_image(), blur_pixel(), bmp_parse(), buffer_offset(), build_diff_map(), build_filter(), build_huff(), build_table(), bytestream2_get_buffer(), bytestream2_put_buffer(), bytestream2_set_buffer(), bytestream2_skip(), bytestream2_skip_p(), cache_read(), calc_bit_demand(), calc_cpl_coord(), cdg_scroll(), channelmap_filter_frame(), check_external_clock_speed(), chomp6(), chroma_4mv_motion_lowres(), chrRangeToJpeg16_c(), chrRangeToJpeg_c(), cin_decode_lzss(), cin_decode_rle(), cinepak_decode(), clean_index(), close_output_stream(), cmap_read_palette(), cng_decode_frame(), codeblock(), commit_bitstream_and_slice_buffer(), compand_drain(), compare_fields(), compute_rematrixing_strategy(), compute_target_delay(), config_output(), config_props(), copy_bits(), copy_chapters(), copy_moof(), copy_tag(), count_mantissa_bits_update_ch(), count_pixels(), create(), create_adapt_vect(), crypto_read(), data_read(), dca_decode_frame(), dct_quantize_trellis_c(), decode_555(), decode_ac_coeffs(), decode_b(), decode_block(), decode_block_refinement(), decode_byterun(), decode_coeffs(), decode_component(), decode_dc_coeffs(), decode_deep_rle32(), decode_deep_tvdc32(), decode_finish_row(), decode_flush(), decode_frame(), decode_frame_headers(), decode_header(), decode_lowdelay_slice(), decode_lspf(), decode_ltp(), decode_mb_i(), decode_mode(), decode_mvc2(), decode_new_pred(), decode_packet(), decode_pixel(), decode_prediction(), decode_rle(), decode_sgirle8(), decode_slice_header(), decode_subframe(), decode_tonal_components(), decorr_mono_buffer(), decorr_stereo_buffer(), decorrelate(), dering(), derive_spatial_merge_candidates(), dfa_decode_frame(), direct_search(), dnxhd_encode_rdo(), dnxhd_find_qscale(), dnxhd_mb_var_thread(), do_a_deblock_C(), do_psnr(), do_rematrixing(), do_video_out(), doHorizDefFilter_C(), doVertDefFilter(), dpx_parse(), draw_dot(), draw_frame(), draw_mandelbrot(), draw_text(), dump_metadata(), dvb_encode_rle8(), dxa_read_packet(), eightsvx_decode_frame(), encode_ac_coeffs(), encode_acs(), encode_dc_coeffs(), encode_dcs(), encode_dvd_subtitles(), encode_exponents_blk_ch(), encode_ext_header(), encode_frame(), encode_header(), encode_init(), encode_qlogs(), encode_scalar(), encode_tile(), epzs_motion_search_internal(), estimate_acs(), estimate_dcs(), estimate_sid_gain(), event_loop(), evrc_decode_frame(), execute_code(), extract_header(), extrapolate_isf(), fade_gain(), fbdev_write_packet(), 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_audio_resample_init(), ff_convert_dither(), ff_copy_and_dup(), ff_dirac_init_arith_decoder(), ff_draw_horiz_band(), ff_eac3_apply_spectral_extension(), ff_emulated_edge_mc(), ff_estimate_p_frame_motion(), ff_filter_frame_needs_framing(), ff_flac_parse_picture(), ff_frame_thread_encoder_init(), ff_get_best_fcode(), ff_get_wav_header(), ff_h264_draw_horiz_band(), ff_hevc_decode_nal_sps(), ff_hevc_hls_residual_coding(), ff_hevc_ref_idx_lx_decode(), ff_hevc_sao_offset_abs_decode(), ff_hevc_slice_rpl(), ff_init_me(), ff_init_poc(), ff_insert_pad(), ff_isom_write_avcc(), ff_jpeg2000_init_component(), ff_jpegls_reset_coding_parameters(), ff_jpegls_update_state_regular(), ff_mjpeg_find_marker(), ff_mms_read_data(), ff_mms_read_header(), ff_mpeg4_encode_mb(), ff_MPV_common_init(), ff_MPV_lowest_referenced_row(), ff_msmpeg4_encode_ext_header(), ff_pca(), ff_poll_frame(), 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_spatial_idwt_slice2(), ff_spdif_probe(), ff_vf_next_put_image(), ff_voc_get_packet(), ff_vorbis_floor1_render_list(), ff_vp8_decode_frame(), ffio_fill(), ffm_seek1(), ffurl_alloc(), file_read(), file_write(), fill_picture_rgb(), fill_rectangle(), filter(), filter_common(), filter_frame(), filter_level_for_mb(), find_best_state(), find_frame_end(), find_optimal_param(), flac_fifo_read(), flac_fifo_read_wrap(), flac_parse(), floor_encode(), frame_thread_init(), ftp_seek(), full_search(), g2m_load_cursor(), generate_half_size_image(), generate_intervals(), generate_noise(), get_alpha_data(), get_audio_buffer(), get_available_samples(), get_block_rd(), get_buffer_internal(), get_dc(), get_exponent_dynamic(), get_floor_average(), get_limits(), get_max_p_order(), get_nb_samples(), get_new_centroids(), get_pix_fmt_depth(), get_pix_fmt_score(), get_qPy_pred(), get_quants(), get_slice_data(), get_sockaddr(), get_str(), get_symbol(), get_symbol_inline(), get_visual_weight(), gif_image_write_image(), guess_mv(), guess_ni_flag(), h264_slice_header_init(), handle_trimming(), hex_log(), hls_decode_neighbour(), hls_sao_param(), hpel_motion_lowres(), hScale16To15_c(), hScale16To19_c(), hScale8To15_c(), hScale8To19_c(), http_read(), http_receive_data(), huffman_decode(), if(), iff_read_packet(), init_long_region(), init_ralf_vlc(), init_tile(), init_tiles(), initFilter(), inter_recon(), interleave_new_audio_packet(), interpolate_bilinear(), intra_pred(), intra_recon(), inverse_channel_transform(), inverse_quant(), ivi_init_tiles(), join_request_frame(), kalman_smoothen(), kempf_decode_tile(), kset(), lag_decode_line(), lag_decode_zero_run_line(), latm_decode_audio_specific_config(), libopenjpeg_copy_to_packed16(), libopenjpeg_copyto16(), libopus_decode_init(), loas_probe(), loop_filter(), lowdelay_subband(), lsf_decode_fp(), lumRangeToJpeg16_c(), lumRangeToJpeg_c(), matroska_ebmlnum_uint(), matroska_read_header(), median4(), mjpegb_decode_frame(), mmf_read_packet(), model_calc_threshold(), mov2textsub(), mov_build_index(), mov_read_default(), mov_read_dref(), mov_read_packet(), mov_text_decode_frame(), mov_text_new_line_cb(), mov_text_text_cb(), mov_write_chpl_tag(), mov_write_edts_tag(), mov_write_uuidprof_tag(), movie_request_frame(), mp3_read_packet(), mp3_update_xing(), mp_decode_frame(), mp_read_changes_map(), mpc8_get_mask(), mpeg4_decode_mb(), mpeg4_decode_sprite_trajectory(), mpeg4_encode_gop_header(), mpeg_decode_slice(), mpeg_motion_lowres(), mpegaudio_parse(), mpegts_handle_packet(), mpegts_probe(), msrle_decode_init(), mss4_init_vlc(), mszh_decomp(), mxf_read_packet(), mxf_read_random_index_pack(), mxf_read_seek(), mxpeg_decode_app(), mxpeg_decode_com(), noise_enhancer(), nsv_read_chunk(), nut_write_packet(), ogg_buffer_data(), ogg_packet(), ogm_header(), op(), opt_default(), opus_packet(), output_plane(), pack_yuv(), packed_16bpc_bswap(), paint_mouse_pointer(), param_write_hex(), parse_chunks(), parse_psfile(), pcx_palette(), pitch_sharpening(), piz_uncompress(), plot_spectrum_column(), png_decode_idat(), png_parse(), postfilter(), pp_get_mode_by_name_and_quality(), precalc_coefs(), pred_intra_mode(), predict_slice(), predict_slice_buffered(), print_report(), print_stats(), process_frame(), process_input(), psy_3gpp_init(), push_samples(), 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_seek(), read_var_block_data(), read_whole_file(), reduce_matrix(), region_offset2size(), render_charset(), render_slice(), request_frame(), resample(), resample_init(), return_audio_frame(), rice_decompress(), rm_assemble_video_frame(), rtcp_parse_packet(), rtmp_open(), rtmp_packet_read_one_chunk(), rtmp_write(), rtp_send_ilbc(), rtp_send_samples(), rtp_write_header(), rv20_decode_picture_header(), rv30_decode_init(), rv34_gen_vlc(), sao_filter_CTB(), save_bits(), sbg_read_packet(), sbr_gain_calc(), sbr_make_f_master(), scaleforopp(), scaleforopp_x(), scaleforopp_y(), scaleforsame(), scaling_list_data(), search_for_ms(), search_for_quantizers_anmr(), search_for_quantizers_faac(), search_for_quantizers_fast(), search_for_quantizers_twoloop(), select_frame(), select_palette(), send_silence(), seq_unpack_rle_block(), set_bandwidth(), set_deblocking_bypass(), set_format(), set_tile_offset(), shorten_decode_frame(), significant_coeff_flag_decode(), significant_coeff_group_flag_decode(), spatial_compensation_1(), spatial_compensation_9(), srt_text_cb(), srt_to_ass(), srtp_open(), stabilize_lsps(), sub_left_prediction_bgr32(), sub_left_prediction_rgb24(), subframe_count_exact(), subimage_with_fill(), subsampling_bounds(), super2xsai(), svq3_decode_mb(), svq3_get_ue_golomb(), swr_convert(), swr_convert_internal(), swri_resample(), swscale(), synchronize_audio(), synth_frame(), synthesis(), tak_parse(), targa_decode_rle(), tgq_decode_mb(), thread_init_internal(), to_meta_with_crop(), umh_search(), unpack(), unpack_coeffs(), update_dimensions(), update_stat(), update_stream_timings(), var_diamond_search(), vc1_decode_frame(), vc1_filter_line(), video_audio_display(), video_open(), video_refresh(), vp5_parse_coeff(), vp6_parse_coeff_huffman(), vpx_init(), vqf_read_header(), wiener_denoise(), write_manifest(), write_subframes(), writer_print_data(), wtvfile_read_packet(), wv_mono(), wv_stereo(), x11grab_read_header(), x11grab_read_packet(), x8_get_prediction(), x8_loop_filter(), x8_setup_spatial_compensation(), xan_decode_frame(), xan_decode_frame_type0(), xan_wc3_output_pixel_run(), xmv_fetch_audio_packet(), xsub_encode_rle(), xwma_read_packet(), yae_align(), yae_flush(), yae_load_data(), yae_load_frag(), yae_overlap_add(), yop_read_seek(), and zmbv_me().

#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)

Definition at line 928 of file avcodec.h.

Referenced by add_cb(), at1_imdct(), at1_imdct_block(), av_aes_init(), av_rc4_crypt(), av_rc4_init(), cbr_bit_allocation(), cinvideo_decode_frame(), compute_pkt_fields(), compute_pkt_fields2(), decode_band(), decode_bytes_and_gain(), decode_cell_data(), decode_frame(), decode_mvs(), decode_pic(), decorrelate(), do_swap(), draw_char(), draw_line(), draw_mandelbrot(), encode_frame(), escape130_decode_frame(), ff_acelp_reorder_lsf(), ff_ccitt_unpack(), ff_celp_lp_synthesis_filterf(), ff_eval_coefs(), ff_eval_refl(), ff_filter_graph_remove_filter(), ff_h263_decode_frame(), ff_hevc_hls_residual_coding(), ff_merge_channel_layouts(), ff_mjpeg_decode_frame(), ff_sort_nearly_sorted_floats(), ff_twinvq_decode_frame(), ff_vp56_decode_mbs(), filter_frame(), g722_encode_trellis(), get_channel_weights(), getsigctxno(), heap_sift(), imlt(), init_dict(), ipvideo_decode_frame(), luma_intra_pred_mode(), main(), make_lpc_coefs(), mc_subpel(), mp3_header_compress(), mp3_header_decompress(), mss2_decode_frame(), nelly_decode_block(), png_choose_filter(), png_handle_row(), postfilter(), ra144_decode_frame(), ra144_encode_frame(), raw_decode(), read_restart_header(), read_tree(), rm_ac3_swap_bytes(), roq_decode_frame(), roq_encode_video(), rotate_bufs(), select_palette(), sniff_channel_order(), sort_stt(), svq3_decode_frame(), swap_channel_layouts_on_filter(), swap_sample_fmts_on_filter(), swap_samplerates_on_filter(), switch_buffers(), transcode_subtitles(), update_initial_timestamps(), vc1_decode_frame(), and vp9_decode_frame().

#define FF_ARRAY_ELEMS (   a)    (sizeof(a) / sizeof((a)[0]))
Examples:
doc/examples/demuxing.c, and doc/examples/resampling_audio.c.

Definition at line 929 of file avcodec.h.

Referenced by aac_decode_init(), add_av_stream1(), add_bell(), add_codec(), alloc_frame(), als_weighting(), asf_read_ext_stream_properties(), asf_read_picture(), asf_write_header1(), ass_split(), av_aes_init(), av_bprint_channel_layout(), av_convert_lang_to(), av_crc_get_table(), av_frame_get_plane_buffer(), av_frame_is_writable(), av_frame_ref(), av_frame_unref(), av_get_channel_description(), av_get_colorspace_name(), av_get_default_channel_layout(), av_get_known_color_name(), av_get_standard_channel_layout(), av_parse_color(), av_parse_time(), av_parse_video_rate(), av_parse_video_size(), av_pix_fmt_count_planes(), av_pix_fmt_desc_get_id(), av_pix_fmt_desc_next(), av_strerror(), avcodec_close(), avcodec_descriptor_get(), avcodec_descriptor_next(), avpriv_dv_codec_profile(), avpriv_dv_frame_profile2(), avpriv_mpeg4audio_get_config(), avpriv_tak_parse_streaminfo(), buffer_needs_copy(), buffer_offset(), channelmap_filter_frame(), check_fps(), config_input(), create_vorbis_context(), dca_subframe_header(), decode_band_hdr(), decode_exp_vlc(), decode_frame(), decode_init(), decode_init_static(), decode_lt_rps(), decode_segment(), decode_slice_header(), decode_subframe(), decode_subframe_lpc(), decode_vui(), decode_vui_parameters(), decorrelate(), dv_extract_audio(), dv_extract_audio_info(), eval_function(), exif_get_tag_name(), expand_category(), expand_function(), ff_ass_split_dialog(), ff_ass_split_free(), ff_check_pixfmt_descriptors(), ff_dnxhd_find_cid(), ff_dnxhd_get_cid_table(), ff_dnxhd_print_profiles(), ff_dv_print_profiles(), ff_flac_parse_picture(), ff_flac_set_channel_layout(), ff_get_pixfmt_from_fb_varinfo(), ff_h263_encode_picture_header(), ff_h264_decode_init_vlc(), ff_h264_decode_ref_pic_list_reordering(), ff_h264_decode_seq_parameter_set(), ff_hevc_clear_refs(), ff_hevc_decode_nal_sps(), ff_hevc_flush_dpb(), ff_hevc_frame_rps(), ff_hevc_output_frame(), ff_hevc_set_new_ref(), ff_hevc_slice_rpl(), ff_id3v2_write_apic(), ff_init_ff_sine_windows(), ff_init_vlc_sparse(), ff_mov_iso639_to_lang(), ff_mov_lang_to_iso639(), ff_MPV_encode_init(), ff_mxf_get_samples_per_frame(), ff_tis_ifd(), ff_tread_tag(), ff_twinvq_decode_init(), ff_vp56_free_context(), ff_vp56_init_context(), ff_vp8_decode_free(), ffmpeg_parse_options(), ffprobe_cleanup(), fill_picture_parameters(), fill_slice_long(), fill_vaapi_ReferenceFrames(), filter_frame(), find_ref_idx(), geq_uninit(), get_best_frame(), get_buffer_internal(), get_channel_layout_single(), get_channel_name(), get_device_list(), get_format_from_sample_fmt(), get_geokey_val(), get_jss_cmd(), get_preset_file_2(), get_siz(), get_sot(), grab_read_header(), h261_decode_mb(), hevc_close(), hevc_decode_free(), hevc_init_context(), hevc_update_thread_context(), http_parse_request(), infer_size(), init(), init_er(), jacosub_to_ass(), join_request_frame(), libopenjpeg_guess_pix_fmt(), list_voices(), main(), make_command_flags_str(), match_section(), matroska_aac_profile(), matroska_aac_sri(), matroska_probe(), matroska_read_header(), mimic_decode_end(), mimic_decode_init(), mimic_decode_update_thread_context(), mimic_init_thread_copy(), mov_get_rawvideo_codec_tag(), mov_write_fiel_tag(), mp3_write_xing(), mxf_write_header(), mxf_write_primer_pack(), new_audio_stream(), opt_loglevel(), parse_primary(), parse_psfile(), pick_palette_entry(), print_report(), ps_tableinit(), pullup_get_buffer(), pullup_get_frame(), qdm2_decode(), qdm2_decode_super_block(), qdm2_fft_decode_tones(), query_formats(), read_apic(), return_stored_frame(), rm_read_metadata(), rsd_read_header(), rv10_write_header(), search_for_quantizers_faac(), select_reference_stream(), select_voice(), shall_we_drop(), sniff_channel_order(), srt_to_ass(), store_packet(), svq1_write_header(), swap_channel_layouts_on_filter(), synthfilt_build_sb_samples(), tak_get_nb_samples(), tedcaptions_read_probe(), thd_channel_layout_extract_channel(), udp_open(), uninit(), value_string(), vp8_decode_flush_impl(), vp8_decode_update_thread_context(), vp8_init_frames(), webvtt_event_to_ass(), xa_decode(), and xvid_encode_init().

#define FFALIGN (   x,
  a 
)    (((x)+(a)-1)&~((a)-1))

Definition at line 930 of file avcodec.h.

Referenced by add_frame_default(), aic_decode_frame(), aic_decode_init(), alloc_metrics(), alloc_scratch_buffers(), alloc_sequence_buffers(), allocate_frame_buffers(), ape_decode_frame(), apply_channel_coupling(), atrac3_decode_init(), av_get_audio_frame_duration(), av_image_alloc(), av_image_copy_to_buffer(), av_image_fill_arrays(), av_samples_get_buffer_size(), avcodec_align_dimensions(), avcodec_align_dimensions2(), backward_filter(), cdxl_decode_frame(), cdxl_read_packet(), codec_reinit(), config_input(), config_props(), convert_samples(), copy_frame_default(), cyuv_decode_frame(), decode_frame(), decode_i2_frame(), decode_init(), decode_pic(), dirac_decode_frame_internal(), do_hybrid_window(), doTest(), dxtory_decode_v2(), encode_frame(), encode_init(), estimate_slice_plane(), ff_audio_mix(), ff_convert_dither(), ff_end_tag(), ff_ivi_init_planes(), ff_lpc_calc_coefs(), ff_lpc_init(), ff_mpv_frame_size_alloc(), ff_mss12_decode_init(), ff_spdif_read_packet(), filter(), filter_frame(), flv_write_packet(), g2m_init_buffers(), g2m_load_cursor(), generate_dither_noise(), get_max_frame_size(), get_video_buffer(), hcscale(), if(), init_dimensions(), init_lengths(), init_planes(), init_sizes(), jpg_decode_data(), kempf_decode_tile(), lag_decode_frame(), mp3lame_encode_frame(), msrle_decode_frame(), mss4_decode_frame(), mss4_decode_init(), open_filter_param(), output_frame(), paf_vid_init(), pcm_bluray_decode_frame(), pcm_bluray_parse_header(), pp_filter_frame(), pp_get_context(), prores_encode_frame(), put_meta(), qdm2_calculate_fft(), raw_decode(), raw_init_decoder(), read_table(), resample_init(), saturate_output_float(), send_command_packet(), set_sample_rate_params(), sox_write_header(), spdif_header_dts4(), spdif_write_packet(), sunrast_encode_init(), svq1_decode_frame(), swf_read_packet(), swri_realloc_audio(), sws_init_context(), tgq_decode_frame(), tscc2_decode_init(), utvideo_encode_init(), video_get_buffer(), vp3_decode_init(), vp6_parse_header(), xsub_encode(), xwd_decode_frame(), xwd_encode_frame(), and y216_decode_frame().

#define MKTAG (   a,
  b,
  c,
 
)    ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))

Referenced by aasc_decode_frame(), aiff_read_header(), aiff_write_header(), amr_read_header(), ape_read_header(), asf_read_stream_properties(), ast_probe(), ast_read_packet(), avi_load_index(), avi_read_header(), avi_read_nikon(), avpriv_flac_is_extradata_valid(), avr_probe(), bfi_probe(), bfi_read_packet(), caf_write_header(), cllc_decode_frame(), daud_header(), decode_frame(), decode_init(), decode_wave_header(), dfa_probe(), dfa_read_header(), dfa_read_packet(), dirac_probe(), dpx_parse(), dshow_add_device(), dxa_read_header(), dxa_read_packet(), encode_frame(), epaf_probe(), export_orphan_timecode(), ff_h264_decode_seq_parameter_set(), ff_mjpeg_decode_sos(), ff_mov_init_hinting(), ff_rm_read_mdpr_codecdata(), ff_wv_parse_header(), ffio_wfourcc(), ffm_read_header(), ffm_write_header(), flac_read_header(), get_codec_data(), ingenient_read_packet(), init_multbl2(), init_muxer(), ipod_get_codec_tag(), libspeex_decode_init(), lvf_probe(), lvf_read_header(), lvf_read_packet(), matroska_parse_wavpack(), mmf_read_header(), mov_codec_id(), mov_create_chapter_track(), mov_create_timecode_track(), mov_finalize_stsd_codec(), mov_find_codec_tag(), mov_free(), mov_get_codec_tag(), mov_get_dv_codec_tag(), mov_get_mpeg2_xdcam_codec_tag(), mov_parse_stsd_audio(), mov_parse_stsd_data(), mov_parse_stsd_video(), mov_probe(), mov_read_ares(), mov_read_cmov(), mov_read_custom_metadata(), mov_read_default(), mov_read_dref(), mov_read_glbl(), mov_read_hdlr(), mov_read_meta(), mov_read_sbgp(), mov_read_stco(), mov_read_stsz(), mov_read_trak(), mov_read_udta_string(), mov_read_wide(), mov_skip_multiple_stsd(), mov_write_audio_tag(), mov_write_gmhd_tag(), mov_write_hdlr_tag(), mov_write_header(), mov_write_minf_tag(), mov_write_moov_tag(), mov_write_stbl_tag(), mov_write_stsd_tag(), mov_write_trak_tag(), mov_write_video_tag(), mp4_get_codec_tag(), mpc_read_header(), msnwc_tcp_probe(), msnwc_tcp_read_header(), nsv_parse_NSVf_header(), nsv_read_chunk(), open_output_file(), parse_ffconfig(), parse_fragment(), png_write_row(), probe(), put_id3v2_tags(), qcp_read_packet(), qt_rtp_parse_packet(), query_codec(), r3d_probe(), r3d_read_header(), r3d_read_packet(), raw_decode(), raw_init_decoder(), rdt_load_mdpr(), read_desc_chunk(), read_header(), rm_read_header(), rm_read_index(), siff_parse_vbv1(), siff_read_header(), smacker_read_header(), smush_read_probe(), sol_read_header(), start_command_packet(), tak_read_header(), thp_probe(), tta_probe(), utvideo_decode_init(), utvideo_encode_init(), v4l2_read_header(), vfw_codecid(), vfw_pixfmt(), vfw_read_header(), vid_probe(), vp3_decode_init(), vqf_probe(), vqf_read_header(), wavesynth_init(), wavpack_encode_block(), webp_decode_frame(), wv_probe(), xsub_encoder_init(), xv_write_header(), xwma_read_header(), zero12v_decode_frame(), and zero12v_decode_init().

#define MKBETAG (   a,
  b,
  c,
 
)    ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
#define GET_UTF8 (   val,
  GET_BYTE,
  ERROR 
)
Value:
val= GET_BYTE;\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
ERROR\
while (val & top) {\
int tmp= GET_BYTE - 128;\
if(tmp>>6)\
val= (val<<6) + tmp;\
top <<= 5;\
}\
val &= (top << 1) - 1;\
}
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965

Referenced by ascii_to_wc(), avio_put_str16le(), draw_glyphs(), draw_text(), get_utf8(), utf8_check(), and utf8len().

#define GET_UTF16 (   val,
  GET_16BIT,
  ERROR 
)
Value:
val = GET_16BIT;\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = GET_16BIT - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
val += (hi<<10) + 0x10000;\
}\
}\
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965

Referenced by decode_str().

#define PUT_UTF8 (   val,
  tmp,
  PUT_BYTE 
)
Value:
{\
int bytes, shift;\
uint32_t in = val;\
if (in < 0x80) {\
tmp = in;\
PUT_BYTE\
} else {\
bytes = (av_log2(in) + 4) / 5;\
shift = (bytes - 1) * 6;\
tmp = (256 - (256 >> bytes)) | (in >> shift);\
PUT_BYTE\
while (shift >= 6) {\
shift -= 6;\
tmp = 0x80 | ((in >> shift) & 0x3f);\
PUT_BYTE\
}\
}\
}
const char const char void * val
Definition: avisynth_c.h:671
static int shift(int a, int b)
Definition: sonic.c:78
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in
#define av_log2
Definition: intmath.h:89

Referenced by count_frame_header(), decode_str(), mov_read_mac_string(), and write_utf8().

#define PUT_UTF16 (   val,
  tmp,
  PUT_16BIT 
)
Value:
{\
uint32_t in = val;\
if (in < 0x10000) {\
tmp = in;\
PUT_16BIT\
} else {\
tmp = 0xD800 | ((in - 0x10000) >> 10);\
PUT_16BIT\
tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
PUT_16BIT\
}\
}\
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in

Referenced by avio_put_str16le().

#define AVUTIL_COMMON_H

Definition at line 567 of file avcodec.h.

#define AV_NE (   be,
  le 
)    (le)

Definition at line 908 of file avcodec.h.

#define RSHIFT (   a,
  b 
)    ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))

Definition at line 912 of file avcodec.h.

#define ROUNDED_DIV (   a,
  b 
)    (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))

Definition at line 914 of file avcodec.h.

#define FF_CEIL_RSHIFT (   a,
  b 
)
Value:
(!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
: ((a) + (1<<(b)) - 1) >> (b))
const char * b
Definition: vf_curves.c:105
#define av_builtin_constant_p(x)
Definition: avcodec.h:727

Definition at line 916 of file avcodec.h.

#define FFUDIV (   a,
  b 
)    (((a)>0 ?(a):(a)-(b)+1) / (b))

Definition at line 918 of file avcodec.h.

#define FFUMOD (   a,
  b 
)    ((a)-(b)*FFUDIV(a,b))

Definition at line 919 of file avcodec.h.

#define FFABS (   a)    ((a) >= 0 ? (a) : (-(a)))

Definition at line 920 of file avcodec.h.

#define FFSIGN (   a)    ((a) > 0 ? 1 : -1)

Definition at line 921 of file avcodec.h.

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

Definition at line 923 of file avcodec.h.

#define FFMAX3 (   a,
  b,
  c 
)    FFMAX(FFMAX(a,b),c)

Definition at line 924 of file avcodec.h.

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

Definition at line 925 of file avcodec.h.

#define FFMIN3 (   a,
  b,
  c 
)    FFMIN(FFMIN(a,b),c)

Definition at line 926 of file avcodec.h.

#define FFSWAP (   type,
  a,
  b 
)    do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)

Definition at line 928 of file avcodec.h.

#define FF_ARRAY_ELEMS (   a)    (sizeof(a) / sizeof((a)[0]))

Definition at line 929 of file avcodec.h.

#define FFALIGN (   x,
  a 
)    (((x)+(a)-1)&~((a)-1))

Definition at line 930 of file avcodec.h.

#define MKTAG (   a,
  b,
  c,
 
)    ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
#define MKBETAG (   a,
  b,
  c,
 
)    ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
#define GET_UTF8 (   val,
  GET_BYTE,
  ERROR 
)
Value:
val= GET_BYTE;\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
ERROR\
while (val & top) {\
int tmp= GET_BYTE - 128;\
if(tmp>>6)\
val= (val<<6) + tmp;\
top <<= 5;\
}\
val &= (top << 1) - 1;\
}
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
#define GET_UTF16 (   val,
  GET_16BIT,
  ERROR 
)
Value:
val = GET_16BIT;\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = GET_16BIT - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
val += (hi<<10) + 0x10000;\
}\
}\
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
#define PUT_UTF8 (   val,
  tmp,
  PUT_BYTE 
)
Value:
{\
int bytes, shift;\
uint32_t in = val;\
if (in < 0x80) {\
tmp = in;\
PUT_BYTE\
} else {\
bytes = (av_log2(in) + 4) / 5;\
shift = (bytes - 1) * 6;\
tmp = (256 - (256 >> bytes)) | (in >> shift);\
PUT_BYTE\
while (shift >= 6) {\
shift -= 6;\
tmp = 0x80 | ((in >> shift) & 0x3f);\
PUT_BYTE\
}\
}\
}
const char const char void * val
Definition: avisynth_c.h:671
static int shift(int a, int b)
Definition: sonic.c:78
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in
#define av_log2
Definition: intmath.h:89
#define PUT_UTF16 (   val,
  tmp,
  PUT_16BIT 
)
Value:
{\
uint32_t in = val;\
if (in < 0x10000) {\
tmp = in;\
PUT_16BIT\
} else {\
tmp = 0xD800 | ((in - 0x10000) >> 10);\
PUT_16BIT\
tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
PUT_16BIT\
}\
}\
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in
#define AV_NE (   be,
  le 
)    (le)

Definition at line 44 of file common.h.

#define RSHIFT (   a,
  b 
)    ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))

Definition at line 48 of file common.h.

#define ROUNDED_DIV (   a,
  b 
)    (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))

Definition at line 50 of file common.h.

#define FF_CEIL_RSHIFT (   a,
  b 
)
Value:
(!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
: ((a) + (1<<(b)) - 1) >> (b))
const char * b
Definition: vf_curves.c:105
#define av_builtin_constant_p(x)
Definition: avcodec.h:727

Definition at line 52 of file common.h.

#define FFUDIV (   a,
  b 
)    (((a)>0 ?(a):(a)-(b)+1) / (b))

Definition at line 54 of file common.h.

#define FFUMOD (   a,
  b 
)    ((a)-(b)*FFUDIV(a,b))

Definition at line 55 of file common.h.

#define FFABS (   a)    ((a) >= 0 ? (a) : (-(a)))

Definition at line 56 of file common.h.

#define FFSIGN (   a)    ((a) > 0 ? 1 : -1)

Definition at line 57 of file common.h.

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

Definition at line 59 of file common.h.

#define FFMAX3 (   a,
  b,
  c 
)    FFMAX(FFMAX(a,b),c)

Definition at line 60 of file common.h.

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

Definition at line 61 of file common.h.

#define FFMIN3 (   a,
  b,
  c 
)    FFMIN(FFMIN(a,b),c)

Definition at line 62 of file common.h.

#define FFSWAP (   type,
  a,
  b 
)    do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)

Definition at line 64 of file common.h.

#define FF_ARRAY_ELEMS (   a)    (sizeof(a) / sizeof((a)[0]))

Definition at line 65 of file common.h.

#define FFALIGN (   x,
  a 
)    (((x)+(a)-1)&~((a)-1))

Definition at line 66 of file common.h.

#define MKTAG (   a,
  b,
  c,
 
)    ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))

Definition at line 285 of file common.h.

#define MKBETAG (   a,
  b,
  c,
 
)    ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))

Definition at line 286 of file common.h.

#define GET_UTF8 (   val,
  GET_BYTE,
  ERROR 
)
Value:
val= GET_BYTE;\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
ERROR\
while (val & top) {\
int tmp= GET_BYTE - 128;\
if(tmp>>6)\
val= (val<<6) + tmp;\
top <<= 5;\
}\
val &= (top << 1) - 1;\
}
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965

Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.

Parameters
valOutput value, must be an lvalue of type uint32_t.
GET_BYTEExpression reading one byte from the input. Evaluated up to 7 times (4 for the currently assigned Unicode range). With a memory buffer input, this could be *ptr++.
ERRORExpression to be evaluated on invalid input, typically a goto statement.
Warning
ERROR should not contain a loop control statement which could interact with the internal while loop, and should force an exit from the macro code (e.g. through a goto or a return) in order to prevent undefined results.

Definition at line 304 of file common.h.

#define GET_UTF16 (   val,
  GET_16BIT,
  ERROR 
)
Value:
val = GET_16BIT;\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = GET_16BIT - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
val += (hi<<10) + 0x10000;\
}\
}\
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965

Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form.

Parameters
valOutput value, must be an lvalue of type uint32_t.
GET_16BITExpression returning two bytes of UTF-16 data converted to native byte order. Evaluated one or two times.
ERRORExpression to be evaluated on invalid input, typically a goto statement.

Definition at line 329 of file common.h.

#define PUT_UTF8 (   val,
  tmp,
  PUT_BYTE 
)
Value:
{\
int bytes, shift;\
uint32_t in = val;\
if (in < 0x80) {\
tmp = in;\
PUT_BYTE\
} else {\
bytes = (av_log2(in) + 4) / 5;\
shift = (bytes - 1) * 6;\
tmp = (256 - (256 >> bytes)) | (in >> shift);\
PUT_BYTE\
while (shift >= 6) {\
shift -= 6;\
tmp = 0x80 | ((in >> shift) & 0x3f);\
PUT_BYTE\
}\
}\
}
const char const char void * val
Definition: avisynth_c.h:671
static int shift(int a, int b)
Definition: sonic.c:78
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in
#define av_log2
Definition: intmath.h:89

Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).

Parameters
valis an input-only argument and should be of type uint32_t. It holds a UCS-4 encoded Unicode character that is to be converted to UTF-8. If val is given as a function it is executed only once.
tmpis a temporary variable and should be of type uint8_t. It represents an intermediate value during conversion that is to be output by PUT_BYTE.
PUT_BYTEwrites the converted UTF-8 bytes to any proper destination. It could be a function or a statement, and uses tmp as the input byte. For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be executed up to 4 times for values in the valid UTF-8 range and up to 7 times in the general case, depending on the length of the converted Unicode character.

Definition at line 357 of file common.h.

#define PUT_UTF16 (   val,
  tmp,
  PUT_16BIT 
)
Value:
{\
uint32_t in = val;\
if (in < 0x10000) {\
tmp = in;\
PUT_16BIT\
} else {\
tmp = 0xD800 | ((in - 0x10000) >> 10);\
PUT_16BIT\
tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
PUT_16BIT\
}\
}\
const char const char void * val
Definition: avisynth_c.h:671
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);ff_audio_convert_init_arm(ac);ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in

Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes).

Parameters
valis an input-only argument and should be of type uint32_t. It holds a UCS-4 encoded Unicode character that is to be converted to UTF-16. If val is given as a function it is executed only once.
tmpis a temporary variable and should be of type uint16_t. It represents an intermediate value during conversion that is to be output by PUT_16BIT.
PUT_16BITwrites the converted UTF-16 data to any proper destination in desired endianness. It could be a function or a statement, and uses tmp as the input byte. For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be executed 1 or 2 times depending on input character.

Definition at line 391 of file common.h.

Function Documentation

av_const int av_log2 ( unsigned  v)

Definition at line 26 of file intmath.c.

av_const int av_log2_16bit ( unsigned  v)

Definition at line 31 of file intmath.c.

static av_always_inline av_const int av_clip_c ( int  a,
int  amin,
int  amax 
)
static

Clip a signed integer value into the amin-amax range.

Parameters
avalue to clip
aminminimum value of the clip range
amaxmaximum value of the clip range
Returns
clipped value

Definition at line 100 of file common.h.

static av_always_inline av_const int64_t av_clip64_c ( int64_t  a,
int64_t  amin,
int64_t  amax 
)
static

Clip a signed 64bit integer value into the amin-amax range.

Parameters
avalue to clip
aminminimum value of the clip range
amaxmaximum value of the clip range
Returns
clipped value

Definition at line 117 of file common.h.

static av_always_inline av_const uint8_t av_clip_uint8_c ( int  a)
static

Clip a signed integer value into the 0-255 range.

Parameters
avalue to clip
Returns
clipped value

Definition at line 132 of file common.h.

static av_always_inline av_const int8_t av_clip_int8_c ( int  a)
static

Clip a signed integer value into the -128,127 range.

Parameters
avalue to clip
Returns
clipped value

Definition at line 143 of file common.h.

static av_always_inline av_const uint16_t av_clip_uint16_c ( int  a)
static

Clip a signed integer value into the 0-65535 range.

Parameters
avalue to clip
Returns
clipped value

Definition at line 154 of file common.h.

static av_always_inline av_const int16_t av_clip_int16_c ( int  a)
static

Clip a signed integer value into the -32768,32767 range.

Parameters
avalue to clip
Returns
clipped value

Definition at line 165 of file common.h.

static av_always_inline av_const int32_t av_clipl_int32_c ( int64_t  a)
static

Clip a signed 64-bit integer value into the -2147483648,2147483647 range.

Parameters
avalue to clip
Returns
clipped value

Definition at line 176 of file common.h.

static av_always_inline av_const unsigned av_clip_uintp2_c ( int  a,
int  p 
)
static

Clip a signed integer to an unsigned power of two range.

Parameters
avalue to clip
pbit position to clip at
Returns
clipped value

Definition at line 188 of file common.h.

static av_always_inline int av_sat_add32_c ( int  a,
int  b 
)
static

Add two signed 32-bit values with saturation.

Parameters
aone value
banother value
Returns
sum with signed saturation

Definition at line 201 of file common.h.

static av_always_inline int av_sat_dadd32_c ( int  a,
int  b 
)
static

Add a doubled value to another value with saturation at both stages.

Parameters
afirst value
bvalue doubled and added to a
Returns
sum with signed saturation

Definition at line 213 of file common.h.

static av_always_inline av_const float av_clipf_c ( float  a,
float  amin,
float  amax 
)
static

Clip a float value into the amin-amax range.

Parameters
avalue to clip
aminminimum value of the clip range
amaxmaximum value of the clip range
Returns
clipped value

Definition at line 225 of file common.h.

static av_always_inline av_const double av_clipd_c ( double  a,
double  amin,
double  amax 
)
static

Clip a double value into the amin-amax range.

Parameters
avalue to clip
aminminimum value of the clip range
amaxmaximum value of the clip range
Returns
clipped value

Definition at line 242 of file common.h.

static av_always_inline av_const int av_ceil_log2_c ( int  x)
static

Compute ceil(log2(x)).

Parameters
xvalue used to compute ceil(log2(x))
Returns
computed ceiling of log2(x)

Definition at line 256 of file common.h.

static av_always_inline av_const int av_popcount_c ( uint32_t  x)
static

Count number of bits set to one in x.

Parameters
xvalue to count bits of
Returns
the number of bits set to one in x

Definition at line 266 of file common.h.

static av_always_inline av_const int av_popcount64_c ( uint64_t  x)
static

Count number of bits set to one in x.

Parameters
xvalue to count bits of
Returns
the number of bits set to one in x

Definition at line 280 of file common.h.

Variable Documentation

attribute_deprecated const uint8_t av_reverse[256]

Reverse the order of the bits of an 8-bits unsigned integer.

Definition at line 35 of file mathematics.c.