FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
avassert.h File Reference

simple assert() macros that are a bit more flexible than ISO C assert(). More...

#include <stdlib.h>
#include "avutil.h"
#include "log.h"

Go to the source code of this file.

Macros

#define av_assert0(cond)
 assert() equivalent, that is always enabled.
 
#define av_assert1(cond)   ((void)0)
 assert() equivalent, that does not lie in speed critical code.
 
#define av_assert2(cond)   ((void)0)
 assert() equivalent, that does lie in speed critical code.
 

Detailed Description

simple assert() macros that are a bit more flexible than ISO C assert().

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file avassert.h.

Macro Definition Documentation

#define av_assert0 (   cond)
Value:
do { \
if (!(cond)) { \
av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \
AV_STRINGIFY(cond), __FILE__, __LINE__); \
abort(); \
} \
} while (0)

assert() equivalent, that is always enabled.

Definition at line 37 of file avassert.h.

Referenced by ac3_eac3_probe(), add_entry(), add_new_samples(), alloc_picture(), allocate_buffers(), amr_read_packet(), ape_decode_frame(), asf_read_pts(), auto_matrix(), av_buffersink_get_buffer_ref(), av_buffersink_get_frame_rate(), av_buffersink_poll_frame(), av_buffersink_read(), av_buffersink_read_samples(), av_free(), av_grow_packet(), av_image_copy_plane(), av_packet_merge_side_data(), av_packet_split_side_data(), av_realloc(), av_rescale_delta(), avcodec_default_reget_buffer(), avcodec_default_release_buffer(), avcodec_encode_video2(), avcodec_get_chroma_sub_sample(), avcodec_get_context_defaults3(), avcodec_version(), avdevice_version(), avfilter_copy_buf_props(), avfilter_get_audio_buffer_ref_from_arrays_channels(), avfilter_link(), avfilter_register(), avfilter_unref_buffer(), avfilter_version(), avformat_match_stream_specifier(), avformat_version(), avi_read_header(), avi_read_packet(), avi_read_seek(), avi_write_counters(), avi_write_ix(), avpriv_color_frame(), avutil_version(), buffer_offset(), build_filter(), build_vlc(), cache_read(), check_input_motion(), codec_get_buffer(), common_init(), compute_bit_allocation(), config_inprops(), config_output(), config_video_output(), configure_input_filter(), configure_output_filter(), copy(), decode_bmv_frame(), decode_channel_map(), decode_chunks(), decode_frame(), decode_i_frame(), decode_init(), decode_init_static(), decode_main_header(), decode_nal_units(), decode_postinit(), decode_slice(), decode_slice_header(), decode_subframe(), decode_update_thread_context(), decode_video(), decode_wmv9(), device_try_init(), dfa_decode_init(), dnxhd_encode_init(), dnxhd_init_vlc(), do_audio_out(), do_video_out(), does_clip(), dv_extract_audio(), dvd_encode_rle(), dvdsub_init(), encode_block(), encode_exp_vlc(), encode_frame(), encode_init(), encode_picture(), encode_picture_lossless(), encode_scale_factors(), encode_slice_header(), encode_superframe(), estimate_best_b_count(), execute_decode_slices(), extend_af(), ff_af_queue_remove(), ff_alloc_packet2(), ff_alsa_extend_reorder_buf(), ff_asf_parse_packet(), ff_ass_add_rect(), ff_avfilter_graph_config_pointers(), ff_bufqueue_get(), ff_default_get_video_buffer(), ff_er_frame_end(), ff_estimate_p_frame_motion(), ff_fix_long_p_mvs(), ff_frame_thread_encoder_init(), ff_free_pool(), ff_free_stream(), ff_h264_decode_init_vlc(), ff_h264_fill_default_ref_list(), ff_h264_pred_init(), ff_h264dsp_init(), ff_init_vlc_sparse(), ff_intrax8_common_init(), ff_kbd_window_init(), ff_lock_avcodec(), ff_lpc_calc_coefs(), ff_mjpeg_decode_frame(), ff_mjpeg_decode_sof(), ff_mjpeg_decode_sos(), ff_mjpeg_encode_picture_header(), ff_mpeg1_encode_picture_header(), ff_mpeg4_encode_picture_header(), ff_mpeg_update_thread_context(), ff_MPV_encode_picture(), ff_msmpeg4_encode_ext_header(), ff_pre_estimate_p_frame_motion(), ff_read_packet(), ff_rm_retrieve_cache(), ff_rv20_encode_picture_header(), ff_slice_buffer_load_line(), ff_snow_common_end(), ff_sws_init_output_funcs(), ff_unlock_avcodec(), ff_vf_get_image(), ff_vf_next_config(), ff_vf_next_put_image(), ff_vp56_decode_frame(), ff_wmv2_encode_picture_header(), ffm_write_header(), ffv1_init_slice_contexts(), filter_frame(), find_and_decode_index(), finish_file(), flv_write_packet(), frame_list_add_frame(), frame_list_remove_samples(), g722_read_header(), generate_joint_tables(), get(), get_available_samples(), get_codecs_sorted(), get_generic_seed(), get_mvdata_interlaced(), gxf_write_mpeg_auxiliary(), h261_decode_frame(), h264_slice_header_init(), http_send_too_busy_reply(), iff_read_header(), iff_read_packet(), init_input_filter(), init_loop_filter(), init_uni_h263_rl_tab(), init_uni_mpeg4_rl_tab(), initFilter(), is16BPS(), is9_OR_10BPS(), isALPHA(), isBE(), isPackedRGB(), isPlanar(), isPlanarRGB(), isPlanarYUV(), isRGB(), isYUV(), join_request_frame(), libschroedinger_encode_frame(), ljpeg_decode_yuv_scan(), main(), matroska_parse_laces(), mkv_write_cues(), mov_text_new_line_cb(), mov_text_text_cb(), mov_write_edts_tag(), mp3_write_xing(), mp_decode_frame(), mpeg1_encode_mb_internal(), mpeg1_encode_sequence_header(), mpeg_decode_mb(), mpeg_decode_slice(), mpegts_write_packet_internal(), mss2_decode_frame(), nut_read_header(), nut_read_timestamp(), nut_write_header(), nut_write_packet(), ogg_read_seek(), oggvorbis_encode_frame(), oggvorbis_encode_init(), ogm_header(), parse_forced_key_frames(), pcm_read_header(), plot_spectrum_column(), png_choose_filter(), postfilter(), postproc_version(), pp_config_props(), print_stats(), push_samples(), put_ebml_num(), put_ebml_size_unknown(), put_ebml_void(), put_swf_end_tag(), qdm2_restore_block(), quantize(), query_formats(), queue_frames(), raw_decode(), read_filter_params(), read_from_packet_buffer(), read_header(), read_seek(), reap_filters(), recode_subtitle(), request_frame(), request_samples(), resample_flush(), resample_init(), rv20_decode_picture_header(), sbr_make_f_master(), segment_list_print_entry(), select_blocksize(), set_af_flag(), set_mv_strides(), store_in_pool(), store_table(), swap_channel_layouts_on_filter(), swap_sample_fmts_on_filter(), swf_read_packet(), swr_convert_internal(), swr_init(), swresample_version(), swri_dither_init(), swri_get_dither(), swri_realloc_audio(), swri_rematrix(), swri_rematrix_init(), sws_init_context(), swScale(), swscale_version(), synth_block_fcb_acb(), synth_block_hardcoded(), transcode_init(), transcode_step(), unref_buffer(), usePal(), vdadec_decode(), vorbis_residue_decode_internal(), write_chunk_header(), write_header(), write_index(), writer_print_section_header(), xmv_process_packet_header(), yae_flush(), yae_load_data(), yae_load_frag(), yae_overlap_add(), yae_reset(), yuv2plane1_16_c_template(), and yuv2planeX_16_c_template().

#define av_assert1 (   cond)    ((void)0)

assert() equivalent, that does not lie in speed critical code.

These asserts() thus can be enabled without fearing speedloss.

Definition at line 53 of file avassert.h.

Referenced by av_mpeg4_decode_header(), avcodec_decode_subtitle2(), bgr24ToUV_c(), bgr24ToUV_half_c(), bmp_encode_frame(), calc_rice_params(), check_bits_for_superframe(), codebook_trellis_rate(), decode_fixed_sparse(), decode_slice(), decode_slice_header(), dnxhd_calc_bits_thread(), dnxhd_encode_picture(), dnxhd_init_vlc(), dv_decode_video_segment(), encode_block(), encode_exp_vlc(), encode_mb_internal(), escape_FF(), ff_acelp_interpolate(), ff_add_channel_layout(), ff_default_get_audio_buffer(), ff_default_get_video_buffer(), ff_dvvideo_init(), ff_filter_frame(), ff_filter_frame_framed(), ff_h261_encode_mb(), ff_h263_decode_frame(), ff_h263_encode_picture_header(), ff_huffyuv_common_init(), ff_init_block_index(), ff_interleave_add_packet(), ff_mjpeg_encode_picture_trailer(), ff_mlp_read_major_sync(), ff_mpeg1_find_frame_end(), ff_rac_terminate(), ff_rate_estimate_qscale(), ff_rtp_send_xiph(), ff_slice_buffer_release(), ff_thread_video_encode_frame(), filter_frame(), find_scale_factor7(), flush_packet(), flv_write_packet(), guess_mv(), h261_encode_block(), h264_er_decode_mb(), h264_parse(), interlaced_search(), liftS(), matroska_parse_block(), mp_decode_frame(), mp_decode_frame_helper(), mp_decode_layer3(), mxf_write_d10_video_packet(), mxf_write_klv_fill(), new_audio_stream(), packedCopyWrapper(), palToUV_c(), parse_forced_key_frames(), pxr24_uncompress(), radix_count(), resample(), reverse_matrixing(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb64ToUV_c_template(), rgb64ToUV_half_c_template(), sab_diamond_search(), svq1_encode_plane(), swri_resample_TMPL(), sws_scale(), swScale(), try_filter_frame(), unref_buffer(), url_resetbuf(), uyvyToUV_c(), validate_options(), w_c(), wmavoice_decode_packet(), xiph_handle_packet(), and yuy2ToUV_c().

#define av_assert2 (   cond)    ((void)0)

assert() equivalent, that does lie in speed critical code.

Definition at line 63 of file avassert.h.

Referenced by add_yblock(), asv2_encode_block(), asym_quant(), av_mod_i(), av_reduce(), av_rescale_rnd(), avfilter_transform(), avg_no_rnd_vc1_chroma_mc8_c(), avio_w8(), await_references(), bessel(), bit8x8_c(), cmp_direct_inline(), compute_lpc_coefs(), compute_scale_factors(), dct_max8x8_c(), dct_quantize_refine(), dct_quantize_TMPL(), dct_quantize_trellis_c(), dct_sad8x8_c(), dct_unquantize_h263_inter_armv5te(), dct_unquantize_h263_intra_armv5te(), decode_cabac_residual_internal(), decode_line(), decode_luma_residual(), decode_mb_b(), decode_p_block(), decode_residual(), direct_search(), do_hybrid_window(), dv_guess_qnos(), dv_init_enc_block(), encode_block(), encode_frame(), encode_mb_internal(), encode_thread(), epzs_motion_search_internal(), ff_ac3_group_exponents(), ff_acelp_lspd2lpc(), ff_celp_lp_synthesis_filterf(), ff_cos(), ff_emulated_edge_mc(), ff_exp2(), ff_h263_decode_mb(), ff_h263_encode_mb(), ff_h263_find_resync_marker(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_filter_mb_fast(), ff_lpc_calc_coefs(), ff_mpeg4_encode_mb(), ff_print_debug_info2(), ff_snow_pred_block(), fill_decode_caches(), fill_rectangle(), get_4block_rd(), get_bits(), get_block_rd(), get_dc(), get_high_utility_cell(), get_lowest_part_list_y(), get_sbits(), get_symbol2(), get_te0_golomb(), get_te_golomb(), h263_encode_block(), hadamard8_diff8x8_c(), hadamard8_intra8x8_c(), hash(), hl_decode_mb_predict_luma(), hl_motion(), hpel_motion_search(), init_ref(), lpc_apply_welch_window_c(), mc_block(), mcdc(), mpeg1_encode_mb_internal(), mpeg1_encode_motion(), mpeg4_decode_mb(), mpeg_decode_mb(), mpeg_decode_slice(), MPV_decode_mb_internal(), MPV_motion_internal(), MPV_motion_lowres(), mxf_compute_sample_count(), obmc_motion(), output_frame_end(), pred_motion(), predict_slice(), preview_obmc(), process_block(), put_bits(), put_no_rnd_vc1_chroma_mc4_c(), put_no_rnd_vc1_chroma_mc8_c(), put_qscale(), put_rac(), put_sbits(), put_symbol2(), put_vlc_symbol(), qpel_motion_search(), quant_psnr8x8_c(), rd8x8_c(), roqvideo_decode_frame(), sad_hpel_motion_search(), set(), set_te_golomb(), set_ue_golomb(), set_ur_golomb(), set_ur_golomb_jpegls(), show_bits(), skip_put_bytes(), square_root(), sse(), switch_buffer(), swri_noise_shaping_TMPL(), swri_resample_TMPL(), sym_quant(), try_8x8basis_c(), unpack_coeffs(), utvideo_encode_frame(), vc1_mc_4mv_luma(), vc1_pred_mv_intfr(), x8_decode_intra_mb(), x8_get_dc_rlf(), x8_select_ac_table(), x8_setup_spatial_predictor(), and yuv2rgb_full_X_c_template().