#include <inttypes.h>#include "mem.h"Go to the source code of this file.
Defines | |
| #define | av_always_inline inline |
| #define | av_noinline |
| #define | av_pure |
| #define | av_const |
| #define | av_cold |
| #define | attribute_deprecated |
| #define | av_unused |
| #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 | MKTAG(a, b, c, d) (a | (b << 8) | (c << 16) | (d << 24)) |
| #define | MKBETAG(a, b, c, d) (d | (c << 8) | (b << 16) | (a << 24)) |
| #define | GET_UTF8(val, GET_BYTE, ERROR) |
| #define | PUT_UTF8(val, tmp, PUT_BYTE) |
| #define | START_TIMER |
| #define | STOP_TIMER(id) {} |
| #define | NULL_IF_CONFIG_SMALL(x) x |
Functions | |
| static av_const int | av_log2 (unsigned int v) |
| static av_const int | av_log2_16bit (unsigned int v) |
| static av_const int | mid_pred (int a, int b, int c) |
| static av_const int | av_clip (int a, int amin, int amax) |
| static av_const uint8_t | av_clip_uint8 (int a) |
| static av_const int16_t | av_clip_int16 (int a) |
| static av_const float | av_clipf (float a, float amin, float amax) |
| int64_t av_const | ff_gcd (int64_t a, int64_t b) |
| static av_pure int | ff_get_fourcc (const char *s) |
Variables | |
| const uint8_t | ff_log2_tab [256] |
Definition in file common.h.
| #define attribute_deprecated |
| #define av_unused |
Definition at line 100 of file common.h.
Referenced by body(), decode_cabac_residual_internal(), decode_i_frame(), ff_faandct(), ff_fft_init(), get_cabac_inline(), get_rac(), p8idct(), pred4x4_down_left_svq3_c(), and row_fdct().
| #define FFABS | ( | a | ) | ((a) >= 0 ? (a) : (-(a))) |
Definition at line 110 of file common.h.
Referenced by add_8x8basis(), av_reduce(), av_resample(), compute_pkt_fields(), dct_error(), dct_max8x8_c(), dct_quantize_refine(), dct_quantize_trellis_c(), dct_single_coeff_elimination(), decode_q_branch(), dering(), direct_dist_scale_factor(), do_a_deblock_C(), doHorizDefFilter_C(), doHorizLowPass_C(), doVertDefFilter(), doVertLowPass(), dpcm_predict(), draw_line(), dv_set_class_number(), encode_q_branch(), encode_q_branch2(), encode_subband_c0run(), estimate_stereo_mode(), ff_ac3_bit_alloc_calc_psd(), ff_init_me(), ff_jpegls_update_state_regular(), ff_mpeg1_encode_init(), ff_msmpeg4_decode_block(), ff_nelly_get_sample_bits(), filter_mb_edgeh(), filter_mb_edgev(), filter_mb_mbaff_edgecv(), filter_mb_mbaff_edgev(), find_frame_rate_index(), flashsv_encode_frame(), funny_diamond_search(), get_block_bits(), get_diff_limited_q(), get_needed_flags(), get_qminmax(), get_sae(), gxf_seek(), h263_h_loop_filter_c(), h263_v_loop_filter_c(), h264_loop_filter_chroma_c(), h264_loop_filter_chroma_intra_c(), h264_loop_filter_luma_c(), h_block_filter(), hadamard8_intra8x8_c(), headroom(), horizX1Filter(), implicit_weight_table(), init_uni_ac_vlc(), ls_decode_line(), ls_encode_line(), ls_encode_regular(), ls_get_code_runterm(), mov_read_packet(), mpeg1_encode_sequence_header(), mpeg4_decode_block(), nsse16_c(), nsse16_mmx(), nsse8_c(), nsse8_mmx(), pp_postprocess(), pred_direct_motion(), put_s(), put_symbol(), read_rle_sgi(), render_line(), render_slice(), reverse_dc_prediction(), sab_diamond_search(), seq_unpack_rle_block(), skip_check(), sum_abs_dctelem_c(), sws_convVec(), try_8x8basis(), update_vlc_state(), v_block_filter(), var_diamond_search(), vc1_pred_b_mv(), vc1_pred_mv(), vertX1Filter(), vorbis_floor1_decode(), vp6_filter(), vsad16_c(), vsad_intra16_c(), wmv2_pred_motion(), x8_loop_filter(), and yuv420_rgb16().
| #define FFMAX | ( | a, | |||
| b | ) | ((a) > (b) ? (a) : (b)) |
Definition at line 113 of file common.h.
Referenced by ac3_probe(), adaptive_quantization(), add_codec(), addTonalComponents(), allocate_buffers(), asf_write_packet(), av_build_filter(), av_d2q(), av_fast_realloc(), av_fifo_init(), av_resample_init(), av_seek_frame_binary(), avcodec_default_get_buffer(), avi_read_header(), avi_read_idx1(), bit_allocation(), blend_subrect(), calc_lowcomp(), calc_lowcomp1(), cavs_decode_frame(), compute_pkt_fields2(), copy(), copy_backptr(), dct_error(), dct_max8x8_c(), decode(), decode_chunks(), decode_p_frame(), decodeChannelSoundUnit(), direct_search(), dnxhd_encode_rdo(), dnxhd_find_qscale(), do_a_deblock_C(), do_audio_out(), doHorizDefFilter_C(), doVertDefFilter(), encode_init(), epzs_motion_search_internal(), ff_ac3_bit_alloc_calc_bap(), ff_ac3_bit_alloc_calc_mask(), ff_ac3_bit_alloc_calc_psd(), ff_ac3_parse_header(), ff_acelp_reorder_lsf(), ff_acelp_update_past_gain(), ff_emulated_edge_mc(), ff_get_best_fcode(), ff_init_me(), ff_jpegls_init_state(), ff_jpegls_reset_coding_parameters(), ff_jpegls_update_state_regular(), ff_mjpeg_decode_dqt(), ff_nelly_get_sample_bits(), findCode(), flv_write_packet(), full_search(), get_block_rd(), get_dc(), get_floor_average(), get_limits(), get_new_centroids(), get_quant_quality(), get_visual_weight(), gxf_seek(), h_block_filter(), horizX1Filter(), init_dequantizer(), init_exp(), init_offset(), is_intra_more_likely(), iterative_me(), median4(), mkv_write_packet(), modify_qscale(), mov_write_esds_tag(), mp3_read_probe(), MPV_encode_picture(), output_packet(), pp_postprocess(), put_codebook_header(), quantize_lpc_coefs(), read_braindead_odml_indx(), residue_encode(), rv34_gen_vlc(), shorten_decode_frame(), skip_check(), sp5x_decode_frame(), try_decode_frame(), umh_search(), v_block_filter(), var_diamond_search(), vertX1Filter(), wmv2_pred_motion(), x8_ac_compensation(), x8_loop_filter(), x8_setup_spatial_compensation(), and zmbv_me().
Definition at line 114 of file common.h.
Referenced by ff_mjpeg_decode_frame(), ff_mpeg4_get_video_packet_prefix_length(), filter_mb(), and mjpegb_decode_frame().
| #define FFMIN | ( | a, | |||
| b | ) | ((a) > (b) ? (b) : (a)) |
Definition at line 115 of file common.h.
Referenced by ac3_decode_frame(), ape_decode_frame(), ape_tag_read_field(), asf_read_header(), av_audio_convert(), av_build_filter(), av_fifo_generic_read(), av_fifo_generic_write(), av_reduce(), av_resample(), av_resample_init(), avfilter_insert_pad(), avfilter_merge_formats(), avfilter_poll_frame(), avi_read_header(), blend_subrect(), cin_decode_lzss(), cin_decode_rle(), cinaudio_decode_frame(), clean_index(), count_pixels(), dca_convert_bitstream(), dct_quantize_trellis_c(), decode_frame(), decode_mb_i(), decode_rgb_frame(), decode_rle(), decode_slice_header(), decodeTonalComponents(), dering(), direct_search(), dnxhd_encode_rdo(), dnxhd_find_qscale(), do_a_deblock_C(), do_rematrixing(), do_video_out(), doHorizDefFilter_C(), doVertDefFilter(), dxa_read_packet(), encode_exp(), encode_ext_header(), encode_frame(), encode_init(), encode_superframe(), epzs_motion_search_internal(), ff_aac_ac3_parse(), ff_ac3_bit_alloc_calc_bap(), ff_ac3_bit_alloc_calc_mask(), ff_ac3_bit_alloc_calc_psd(), ff_acelp_reorder_lsf(), ff_draw_horiz_band(), ff_emulated_edge_mc(), ff_estimate_p_frame_motion(), ff_find_start_code(), ff_get_best_fcode(), ff_init_long_region(), ff_init_me(), ff_jpegls_reset_coding_parameters(), ff_jpegls_update_state_regular(), ff_region_offset2size(), ff_rtp_send_aac(), ff_spatial_idwt_buffered_slice(), ff_spatial_idwt_slice(), ff_vorbis_floor1_render_list(), fill_rectangle(), find_optimal_param(), flac_decode_frame(), floor_encode(), full_search(), get_block_rd(), get_dc(), get_floor_average(), get_limits(), get_max_p_order(), get_new_centroids(), get_str(), get_symbol(), get_visual_weight(), huffman_decode(), id3v2_read_ttag(), interleave_buffer(), iv_decode_frame(), median4(), mkv_write_packet(), mov2textsub(), mov_parse_udta_string(), mov_read_default(), mov_read_dref(), mov_write_uuidprof_tag(), mp_decode_frame(), mp_read_changes_map(), mpc8_get_mask(), mpeg4_decode_sprite_trajectory(), mpegaudio_parse(), ogg_write_page(), paint_mouse_pointer(), pcm_decode_frame(), pred_intra_mode(), predict_slice(), predict_slice_buffered(), put_symbol(), pva_read_timestamp(), qtrle_encode_line(), rm_assemble_video_frame(), rtp_check_and_send_back_rr(), rtp_send_samples(), rv30_decode_init(), rv34_gen_vlc(), seq_unpack_rle_block(), shorten_decode_frame(), spatial_compensation_1(), spatial_compensation_9(), stream_component_open(), sub_left_prediction_bgr32(), svq3_decode_mb(), svq3_get_ue_golomb(), tiff_decode_tag(), truespeech_decode_frame(), umh_search(), unpack_coeffs(), url_split(), var_diamond_search(), voc_get_packet(), vorbis_decode_init(), vp5_parse_coeff(), vp6_parse_coeff_huffman(), wav_read_packet(), write_packet(), x8_get_prediction(), x8_loop_filter(), x8_setup_spatial_compensation(), and zmbv_me().
| #define FFSIGN | ( | a | ) | ((a) > 0 ? 1 : -1) |
Definition at line 111 of file common.h.
Referenced by do_a_deblock_C(), doHorizDefFilter_C(), doVertDefFilter(), horizX1Filter(), sign_only(), and vertX1Filter().
Definition at line 118 of file common.h.
Referenced by avcodec_default_release_buffer(), cinvideo_decode_frame(), cmv_decode_frame(), compute_pkt_fields(), compute_pkt_fields2(), decode_bytes_and_gain(), decode_frame(), decodeFrame(), draw_line(), encode_frame(), eval_coefs(), eval_refl(), ff_acelp_reorder_lsf(), ff_huff_build_tree(), ff_rc4_enc(), fft(), getChannelWeights(), IMLT(), mp3_header_compress(), mp3_header_decompress(), png_choose_filter(), png_handle_row(), ra144_decode_frame(), rm_ac3_swap_bytes(), roq_decode_frame(), vmdvideo_decode_frame(), vp56_decode_frame(), and xan_decode_frame().
| #define GET_UTF8 | ( | val, | |||
| GET_BYTE, | |||||
| ERROR | ) |
Value:
val= GET_BYTE;\
{\
int ones= 7 - av_log2(val ^ 255);\
if(ones==1)\
ERROR\
val&= 127>>ones;\
while(--ones > 0){\
int tmp= GET_BYTE - 128;\
if(tmp>>6)\
ERROR\
val= (val<<6) + tmp;\
}\
}
| val | is the output and should be of type uint32_t. It holds the converted UCS-4 character and should be a left value. | |
| GET_BYTE | gets UTF-8 encoded bytes from any proper source. It can be a function or a statement whose return value or evaluated value is of type uint8_t. It will be executed up to 4 times for values in the valid UTF-8 range, and up to 7 times in the general case. | |
| ERROR | action that should be taken when an invalid UTF-8 byte is returned from GET_BYTE. It should be a statement that jumps out of the macro, like exit(), goto, return, break, or continue. |
Definition at line 272 of file common.h.
Referenced by ascii_to_wc(), get_utf8(), and utf8len().
Definition at line 257 of file common.h.
Referenced by id3v2_parse(), metadata_parse(), mjpegb_decode_frame(), mp3_parse_vbr_tags(), nsv_resync(), qdm2_decode_init(), swf_read_header(), and sync().
Definition at line 256 of file common.h.
Referenced by aiff_read_header(), amr_read_header(), ape_read_header(), asf_read_header(), au_read_header(), avi_load_index(), avi_read_header(), bfi_probe(), bfi_read_packet(), daud_header(), decode_frame(), decode_init(), decode_wave_header(), dirac_probe(), dxa_read_header(), dxa_read_packet(), encode_frame(), ff_mjpeg_decode_init(), ff_rm_read_mdpr_codecdata(), ffm_read_header(), ffm_write_header(), flac_decode_frame(), get_codec_data(), ingenient_read_packet(), mmf_read_header(), mov_find_codec_tag(), mov_probe(), mov_read_cmov(), mov_read_dref(), mov_read_ftyp(), mov_read_hdlr(), mov_read_stco(), mov_read_stsd(), mov_read_udta(), mov_read_wide(), mov_write_audio_tag(), mov_write_video_tag(), mpc_read_header(), msnwc_tcp_probe(), msnwc_tcp_read_header(), mtv_read_header(), nsv_read_chunk(), png_write_row(), raw_decode(), raw_init_decoder(), rm_read_header(), siff_parse_vbv1(), siff_read_header(), smacker_read_header(), sol_read_header(), thp_probe(), vfw_pixfmt(), vfw_read_header(), vid_probe(), vp3_decode_init(), wav_read_header(), wav_read_packet(), and wv_read_block_header().
| #define NULL_IF_CONFIG_SMALL | ( | x | ) | x |
| #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\
}\
}\
}
| val | is an input only argument and should be of type uint32_t. It holds a ucs4 encoded unicode character that is to be converted to UTF-8. If val is given as a function it's executed only once. | |
| tmp | is a temporary variable and should be of type uint8_t. It represents an intermediate value during conversion that is to be outputted by PUT_BYTE. | |
| PUT_BYTE | writes 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 303 of file common.h.
Referenced by get_str16_nolen(), id3v2_read_ttag(), and write_utf8().
| #define ROUNDED_DIV | ( | a, | |||
| b | ) | (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
Definition at line 109 of file common.h.
Referenced by decode_vop_header(), draw_arrow(), mpeg4_decode_sprite_trajectory(), mpeg4_pred_ac(), and vect_division().
| #define RSHIFT | ( | a, | |||
| b | ) | ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) |
| #define START_TIMER |
Definition at line 400 of file common.h.
Referenced by av_adler32_update(), dct_quantize_refine(), and main().
| #define STOP_TIMER | ( | id | ) | {} |
Definition at line 401 of file common.h.
Referenced by av_adler32_update(), dct_quantize_refine(), and main().
| static av_const int av_clip | ( | int | a, | |
| int | amin, | |||
| int | amax | |||
| ) | [inline, static] |
clip a signed integer value into the amin-amax range
| a | value to clip | |
| amin | minimum value of the clip range | |
| amax | maximum value of the clip range |
Definition at line 199 of file common.h.
Referenced by AC3_encode_init(), adpcm_ct_expand_nibble(), adpcm_sbpro_expand_nibble(), adpcm_yamaha_expand_nibble(), av_build_filter(), build_qp_table(), categorize(), choose_vlc_set(), chroma_4mv_motion(), decode(), decode_exponents(), decode_slice(), decode_subband_slice_buffered(), dequantize(), dequantize_slice_buffered(), direct_dist_scale_factor(), direct_search(), do_audio_out(), draw_arrow(), draw_line(), encode_block(), encode_frame(), encode_mb_internal(), eval_expr(), ff_ac3_bit_alloc_calc_bap(), ff_er_add_slice(), ff_gmc_c(), ff_mspel_motion(), ff_nelly_get_sample_bits(), ff_vbv_update(), filter_mb_mbaff_edgecv(), filter_mb_mbaff_edgev(), g726_decode(), get_dc(), get_qminmax(), gmc1_motion(), h263_h_loop_filter_c(), h263_v_loop_filter_c(), h264_loop_filter_chroma_c(), h264_loop_filter_luma_c(), hpel_motion(), hScale(), hScale_altivec_real(), implicit_weight_table(), init_dequantizer(), loop_filter_c1(), loop_filter_l1(), ls_decode_line(), ls_encode_line(), MPV_motion_internal(), png_enc_init(), quantize(), quantize_lpc_coefs(), ratecontrol_1pass(), sum_bits(), svq3_mc_dir(), svq3_mc_dir_part(), truespeech_synth(), update_qscale(), vc1_interp_mc(), vc1_mc_1mv(), vc1_mc_4mv_chroma(), vc1_mc_4mv_luma(), and vc1_pred_b_mv().
00200 { 00201 if (a < amin) return amin; 00202 else if (a > amax) return amax; 00203 else return a; 00204 }
| static av_const int16_t av_clip_int16 | ( | int | a | ) | [inline, static] |
clip a signed integer value into the -32768,32767 range
| a | value to clip |
Definition at line 222 of file common.h.
Referenced by adpcm_ct_expand_nibble(), adpcm_decode_frame(), adpcm_ima_expand_nibble(), adpcm_ms_expand_nibble(), adpcm_yamaha_expand_nibble(), adx_decode(), atrac3_decode_frame(), cinaudio_decode_frame(), do_apply_filter(), dpcm_decode_frame(), ff_acelp_high_pass_filter(), ff_acelp_interpolate(), ff_acelp_weighted_vector_sum(), ff_mpa_synth_filter(), float_to_int(), ra144_decode_frame(), saturate_output_float(), vmdaudio_decode_audio(), wma_decode_frame(), and xa_decode().
| static av_const uint8_t av_clip_uint8 | ( | int | a | ) | [inline, static] |
clip a signed integer value into the 0-255 range
| a | value to clip |
Definition at line 211 of file common.h.
Referenced by filter_mb_mbaff_edgecv(), filter_mb_mbaff_edgev(), h264_loop_filter_chroma_c(), h264_loop_filter_luma_c(), horizontal_filter(), ir2_decode_plane(), ir2_decode_plane_inter(), loop_filter_c1(), loop_filter_l1(), p8idct(), rv34_add_4x4_block(), tm2_apply_deltas(), vc1_mspel_mc(), vc1_parse_frame_header(), vc1_parse_frame_header_adv(), vertical_filter(), vp56_edge_filter(), vp6_filter_diag4(), vp6_filter_hv4(), x8_decode_intra_mb(), yuv2nv12XinC(), and yuv2yuvXinC().
| static av_const float av_clipf | ( | float | a, | |
| float | amin, | |||
| float | amax | |||
| ) | [inline, static] |
clip a float value into the amin-amax range
| a | value to clip | |
| amin | minimum value of the clip range | |
| amax | maximum value of the clip range |
Definition at line 235 of file common.h.
Referenced by decode().
00236 { 00237 if (a < amin) return amin; 00238 else if (a > amax) return amax; 00239 else return a; 00240 }
| static av_const int av_log2 | ( | unsigned int | v | ) | [inline, static] |
Definition at line 123 of file common.h.
References ff_log2_tab.
Referenced by AC3_encode_frame(), av_mod_i(), av_normalize_sf(), av_read_packet(), bastardized_rice_decompress(), compute_scale_factors(), decode_q_branch(), decode_subframe(), decode_vol_header(), ebml_id_size(), encode_block(), encode_q_branch(), encode_q_branch2(), encode_subband_c0run(), escape124_decode_frame(), ff_log2(), ff_mpeg1_encode_init(), ff_wma_init(), find_optimal_param(), fps_umf2avr(), get_block_bits(), get_level_prefix(), get_max_p_order(), get_rac_count(), get_se_golomb(), get_tail(), get_ue_golomb(), get_ur_golomb(), get_ur_golomb_jpegls(), headroom(), init_cook_mlt(), log2_tab(), mp_decode_init(), mpeg4_decode_video_packet_header(), MPV_encode_init(), put_symbol(), qdm2_decode_init(), rv20_decode_picture_header(), set_ue_golomb(), shorten_decode_frame(), svq3_decode_slice_header(), unpack_coeffs(), and wma_decode_block().
00124 { 00125 int n = 0; 00126 if (v & 0xffff0000) { 00127 v >>= 16; 00128 n += 16; 00129 } 00130 if (v & 0xff00) { 00131 v >>= 8; 00132 n += 8; 00133 } 00134 n += ff_log2_tab[v]; 00135 00136 return n; 00137 }
| static av_const int av_log2_16bit | ( | unsigned int | v | ) | [inline, static] |
Definition at line 139 of file common.h.
References ff_log2_tab.
Referenced by av_log2_i(), dnxhd_calc_bits_thread(), dnxhd_encode_dc(), encode_dc(), ff_mjpeg_encode_dc(), ff_sqrt(), i2f(), and quant().
00140 { 00141 int n = 0; 00142 if (v & 0xff00) { 00143 v >>= 8; 00144 n += 8; 00145 } 00146 n += ff_log2_tab[v]; 00147 00148 return n; 00149 }
| int64_t av_const ff_gcd | ( | int64_t | a, | |
| int64_t | b | |||
| ) |
Definition at line 51 of file mathematics.c.
References ff_gcd().
Referenced by av_reduce(), av_set_pts_info(), avcodec_string(), decode_main_header(), dump_stream_format(), ff_gcd(), ff_parse_specific_params(), h263_decode_picture_header(), mov_read_ctts(), mov_read_stts(), MPV_encode_init(), and xvid_correct_framerate().
00051 { 00052 if(b) return ff_gcd(b, a%b); 00053 else return a; 00054 }
| static av_pure int ff_get_fourcc | ( | const char * | s | ) | [inline, static] |
converts fourcc string to int
Definition at line 248 of file common.h.
Referenced by avi_read_header(), decode_frame(), decode_vol_header(), ff_h263_decode_frame(), ff_mpeg4_decode_picture_header(), h263_decode_picture_header(), mjpeg_decode_app(), mjpega_dump_header(), mpeg_decode_frame(), parse_ffconfig(), shorten_decode_frame(), tta_decode_init(), and tta_read_header().
00248 { 00249 #ifdef HAVE_AV_CONFIG_H 00250 assert( strlen(s)==4 ); 00251 #endif 00252 00253 return (s[0]) + (s[1]<<8) + (s[2]<<16) + (s[3]<<24); 00254 }
| static av_const int mid_pred | ( | int | a, | |
| int | b, | |||
| int | c | |||
| ) | [inline, static] |
Definition at line 152 of file common.h.
References t.
Referenced by add_median_prediction(), correlate(), correlate_slice_buffered(), decorrelate(), direct_search(), encode_q_branch(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), h263_mv4_search(), h263_pred_motion(), interlaced_search(), loco_predict(), ls_decode_line(), ls_encode_line(), motion_search(), mv_pred_median(), pred_motion(), pred_mv(), predict(), rv34_pred_b_vector(), rv34_pred_mv(), sub_hfyu_median_prediction_c(), sub_hfyu_median_prediction_mmx2(), svq1_decode_motion_vector(), vc1_mc_4mv_chroma(), vc1_pred_b_mv(), vc1_pred_mv(), and wmv2_pred_motion().
00153 { 00154 #ifdef HAVE_CMOV 00155 int i=b; 00156 asm volatile( 00157 "cmp %2, %1 \n\t" 00158 "cmovg %1, %0 \n\t" 00159 "cmovg %2, %1 \n\t" 00160 "cmp %3, %1 \n\t" 00161 "cmovl %3, %1 \n\t" 00162 "cmp %1, %0 \n\t" 00163 "cmovg %1, %0 \n\t" 00164 :"+&r"(i), "+&r"(a) 00165 :"r"(b), "r"(c) 00166 ); 00167 return i; 00168 #elif 0 00169 int t= (a-b)&((a-b)>>31); 00170 a-=t; 00171 b+=t; 00172 b-= (b-c)&((b-c)>>31); 00173 b+= (a-b)&((a-b)>>31); 00174 00175 return b; 00176 #else 00177 if(a>b){ 00178 if(c>b){ 00179 if(c>a) b=a; 00180 else b=c; 00181 } 00182 }else{ 00183 if(b>c){ 00184 if(c>a) b=c; 00185 else b=a; 00186 } 00187 } 00188 return b; 00189 #endif 00190 }
| const uint8_t ff_log2_tab[256] |
Definition at line 40 of file mathematics.c.
Referenced by av_log2(), av_log2_16bit(), decode_frame(), rtsp_read_header(), and seq_decode_op1().
1.5.1