FFmpeg
 All Data Structures Namespaces 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.

Examples:
muxing.c, and transcode_aac.c.

Definition at line 37 of file avassert.h.

Referenced by a64multi_encode_frame(), ac3_eac3_probe(), add_codec(), add_entry(), alloc_buffers(), alloc_frame(), alloc_picture(), allocate_buffers(), analyze_plane(), ape_decode_frame(), apply_color_indexing_transform(), asf_parse_packet(), asf_write_packet(), assign_bits(), audio_frame_cksum(), audio_get_buffer(), auto_matrix(), av_buffersink_get_frame_rate(), av_buffersink_poll_frame(), av_free(), av_grow_packet(), av_image_copy_plane(), av_int_list_length_for_size(), av_packet_merge_side_data(), av_packet_split_side_data(), av_parser_parse2(), av_realloc(), av_rescale_delta(), av_utf8_decode(), av_write_uncoded_frame_internal(), av_write_uncoded_frame_query(), avcodec_copy_context(), avcodec_decode_video2(), avcodec_default_reget_buffer(), avcodec_default_release_buffer(), avcodec_encode_video2(), avcodec_get_chroma_sub_sample(), avcodec_get_context_defaults3(), avcodec_version(), avdevice_capabilities_create(), avdevice_capabilities_free(), avdevice_free_list_devices(), avdevice_list_devices(), avdevice_version(), avfilter_link(), avfilter_register(), 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(), avpriv_find_start_code(), avutil_version(), buffer_offset(), build_canonical_huff(), build_def_list(), build_filter(), build_vlc(), bytestream2_init(), bytestream2_init_writer(), cache_read(), cache_seek(), calc_one_scale(), commit_bitstream_and_slice_buffer(), compute_bit_allocation(), config_input(), config_output(), config_video_output(), configure_input_filter(), configure_output_filter(), copy(), copy_backptr(), copy_picture_field(), create_weave_frame(), data_queue_dequeue(), decode_bmv_frame(), decode_cblk(), decode_channel_map(), decode_chunks(), decode_frame(), decode_i_frame(), decode_init(), decode_init_static(), decode_main_header(), decode_nal_units(), decode_p_block(), decode_postinit(), decode_sb(), decode_slice(), decode_slice_header(), decode_subframe(), decode_wmv9(), delete_region_display_list(), device_try_init(), dfa_decode_init(), dnxhd_encode_init(), dnxhd_init_vlc(), do_audio_out(), do_video_out(), dummy_destruct_packet(), dv_audio_frame_size(), dv_extract_audio(), dvd_encode_rle(), dvdsub_init(), dxva2_get_buffer(), dxva2_hevc_start_frame(), encode_block(), encode_exp_vlc(), encode_frame(), encode_init(), encode_mb_hq(), encode_picture(), encode_q_branch(), encode_scale_factors(), encode_slice_header(), encode_superframe(), estimate_best_b_count(), extend_af(), ff_add_index_entry(), ff_af_queue_remove(), ff_alloc_packet2(), ff_alloc_picture(), ff_alsa_extend_reorder_buf(), ff_avfilter_graph_config_pointers(), ff_big_add(), ff_big_mul(), ff_bufqueue_get(), ff_check_pixfmt_descriptors(), ff_copy_whitelists(), ff_dca_exss_parse_header(), ff_default_get_audio_buffer(), ff_end_tag(), ff_er_frame_end(), ff_estimate_p_frame_motion(), ff_find_last_ts(), ff_fix_long_p_mvs(), ff_flac_parse_picture(), ff_frame_thread_encoder_init(), ff_framesync_next(), ff_framesync_process_frame(), ff_free_stream(), ff_gen_search(), ff_generate_wave_table(), ff_get_format(), ff_get_guid(), ff_get_unscaled_swscale(), ff_h264_decode_init(), ff_h264_decode_init_vlc(), ff_h264_decode_ref_pic_list_reordering(), ff_h264_execute_decode_slices(), ff_h264_execute_ref_pic_marking(), ff_h264_fill_default_ref_list(), ff_h264_pred_init(), ff_h264_ref_picture(), ff_h264_update_thread_context(), ff_h264dsp_init(), ff_init_vlc_rl(), ff_init_vlc_sparse(), ff_interleave_add_packet(), ff_intrax8_common_init(), ff_kbd_window_init(), ff_lock_avcodec(), ff_lpc_calc_coefs(), ff_lzw_encode_init(), 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_ref_picture(), ff_mpeg_update_thread_context(), ff_mpv_encode_picture(), ff_mpv_export_qp_table(), ff_mpv_frame_start(), ff_msmpeg4_encode_ext_header(), ff_pre_estimate_p_frame_motion(), ff_pulse_audio_connect_context(), ff_pulse_audio_disconnect_context(), ff_put_guid(), ff_rate_control_init(), ff_rate_estimate_qscale(), ff_read_packet(), ff_request_frame(), ff_rm_retrieve_cache(), ff_rv20_encode_picture_header(), ff_seek_frame_binary(), ff_slice_buffer_load_line(), ff_snow_common_end(), ff_sws_init_output_funcs(), ff_thread_ref_frame(), ff_unlock_avcodec(), ff_vc1_mc_4mv_luma(), ff_vc1_parse_frame_header_adv(), ff_vc1_pred_b_mv(), ff_vdpau_common_end_frame(), ff_wmv2_encode_picture_header(), ffio_ensure_seekback(), ffm_append_recommended_configuration(), ffm_write_header(), ffserver_opt_preset(), ffserver_parse_config_feed(), ffserver_parse_config_redirect(), ffserver_parse_config_stream(), ffserver_parse_ffconfig(), ffserver_save_avoption(), ffv1_init_slice_contexts(), fill_buffer(), fill_picture_entry(), filter_frame(), filter_packet(), filter_slice_rgb(), find_and_decode_index(), finish_file(), flush_packet(), flv_write_packet(), frame_list_add_frame(), frame_list_remove_samples(), framesync_inject_frame(), framesync_sync_level_update(), g722_read_header(), generate_joint_tables(), get(), get_available_samples(), get_cluster_duration(), get_codecs_sorted(), get_generic_seed(), get_mvdata_interlaced(), get_qminmax(), gif_encode_init(), gif_write_header(), gxf_write_mpeg_auxiliary(), h261_decode_frame(), h261_decode_mb(), h264_decode_frame(), handle_id3(), handle_packet(), heap_bubble_down(), heap_bubble_up(), hevc_sdp_parse_fmtp_config(), hls_write_header(), hqx_filter(), http_send_too_busy_reply(), iff_read_header(), iff_read_packet(), init(), init_2d_vlc_rl(), init_dimensions(), init_input_filter(), init_loop_filter(), init_pass2(), init_resampler(), init_thread_copy(), init_uni_h261_rl_tab(), init_uni_h263_rl_tab(), init_uni_mpeg4_rl_tab(), initFilter(), interpolate(), is16BPS(), is9_OR_10BPS(), isALPHA(), isBE(), isPackedRGB(), isPlanar(), isPlanarRGB(), isPlanarYUV(), isRGB(), isYUV(), ivi_mc(), libvorbis_encode_frame(), libvorbis_encode_init(), ljpeg_decode_yuv_scan(), main(), matroska_parse_laces(), mcdc(), md5_finish(), mjpeg_decode_scan_progressive_ac(), mkv_write_cues(), mmap_read_frame(), mov_text_new_line_cb(), mov_text_text_cb(), mov_write_colr_tag(), mov_write_edts_tag(), mov_write_gama_tag(), mp3_write_xing(), mp_decode_frame(), mpeg1_encode_mb_internal(), mpeg1_encode_sequence_header(), mpeg_decode_mb(), mpeg_decode_slice(), mpeg_mux_end(), mpegts_write_packet_internal(), mss2_decode_frame(), nut_read_header(), nut_read_timestamp(), nut_write_header(), nut_write_packet(), nvenc_encode_frame(), ogg_read_seek(), ogm_header(), opengl_init_context(), output_packet(), parse_forced_key_frames(), parse_points_str(), parse_read_intervals(), pcm_read_header(), plot_spectrum_column(), png_choose_filter(), postfilter(), postproc_version(), pp_config_props(), print_stats(), process_frame(), put_ebml_num(), put_ebml_size_unknown(), put_ebml_void(), put_payload_parsing_info(), put_swf_end_tag(), qdm2_restore_block(), quantize(), query_formats(), queue_frames(), ratecontrol_1pass(), raw_decode(), rd_frame(), read_filter_params(), read_from_packet_buffer(), read_header(), read_seek(), ready_residue(), reap_filters(), rebase_put_bits(), recode_subtitle(), reget_buffer_internal(), release_delayed_buffers(), request_frame(), request_samples(), resample_flush(), resample_init(), residue_encode(), return_audio_frame(), rgbToRgbWrapper(), rv20_decode_picture_header(), save_bits(), sbr_make_f_master(), seek_frame_generic(), seg_write_header(), segment_list_print_entry(), select_blocksize(), set_af_flag(), set_mv_strides(), setup_classifs(), split_box(), store_table(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), swap_channel_layouts_on_filter(), swap_sample_fmts_on_filter(), swf_read_packet(), swr_convert(), swr_convert_internal(), swr_init(), swresample_version(), swri_dither_init(), swri_get_dither(), swri_realloc_audio(), swri_rematrix(), swri_rematrix_init(), sws_alloc_context(), sws_init_context(), swscale(), swscale_version(), synth_block_fcb_acb(), synth_block_hardcoded(), tag_tree_size(), tiff_unpack_strip(), transcode_init(), transcode_step(), update_frame_pool(), update_size(), update_thread_context(), usePal(), vc1_decode_frame(), vcr1_decode_frame(), vdadec_decode(), vdpau_get_buffer(), vmdaudio_decode_frame(), wavpack_encode_block(), write_audio_frame(), write_chunk_header(), write_header(), write_index(), write_packet(), write_palette(), writer_print_section_header(), xface_encode_frame(), xmv_process_packet_header(), xvid_encode_init(), 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 avcodec_decode_subtitle2(), bgr24ToUV_c(), bgr24ToUV_half_c(), bmp_encode_frame(), calc_rice_params(), check_bits_for_superframe(), codebook_trellis_rate(), compand_delay(), decode_fixed_sparse(), decode_mode(), decode_slice(), dnxhd_calc_bits_thread(), dnxhd_encode_picture(), dnxhd_init_vlc(), dv_decode_video_segment(), encode_block(), encode_exp_vlc(), encode_mb_internal(), encode_q_branch(), ff_acelp_interpolate(), ff_add_channel_layout(), ff_dvvideo_init(), ff_filter_frame(), ff_framesync_add_frame(), ff_h261_encode_mb(), ff_h263_decode_frame(), ff_h263_encode_picture_header(), ff_h264_decode_slice_header(), ff_huffyuv_common_init(), ff_init_block_index(), ff_interleave_add_packet(), ff_mjpeg_encode_picture_trailer(), ff_mjpeg_escape_FF(), ff_mlp_read_major_sync(), ff_mpeg1_find_frame_end(), ff_mpv_encode_picture(), ff_rac_terminate(), ff_rate_estimate_qscale(), ff_rtp_send_xiph(), ff_seek_frame_binary(), ff_slice_buffer_release(), ff_thread_video_encode_frame(), ff_vc1_pred_mv_intfr(), filter_frame(), flush_packet(), flv_write_packet(), get_4block_rd(), get_exponent_dynamic(), guess_mv(), h261_encode_block(), h264_er_decode_mb(), h264_parse(), interlaced_search(), jpeg2000_read_main_headers(), liftS(), matroska_parse_block(), mp_decode_frame(), mp_decode_frame_helper(), mp_decode_layer3(), mpeg4_decode_header(), mxf_write_d10_video_packet(), mxf_write_klv_fill(), nut_write_trailer(), packedCopyWrapper(), palToUV_c(), parse_forced_key_frames(), process_frame(), pullup_get_frame(), radix_count(), request_frame(), 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(), set_frame_distances(), sub2video_push_ref(), svq1_encode_plane(), sws_scale(), swscale(), update_thread_context(), url_resetbuf(), uyvyToUV_c(), validate_options(), w_c(), wmavoice_decode_packet(), xiph_handle_packet(), yuy2ToUV_c(), and yvy2ToUV_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(), apply_obmc(), apply_pitch_filters(), asv2_encode_block(), asym_quant(), av_fifo_drain(), av_mod_i(), av_mul_sf(), av_normalize1_sf(), av_reduce(), av_resample(), av_rescale_rnd(), avfilter_transform(), avformat_write_header(), avg_no_rnd_vc1_chroma_mc4_c(), avg_no_rnd_vc1_chroma_mc8_c(), avio_w8(), await_references(), bessel(), bit8x8_c(), check_4block_inter(), check_block(), check_intra_mode(), cmp_direct_inline(), cmp_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_inter_c(), dct_unquantize_h263_intra_armv5te(), dct_unquantize_h263_intra_c(), decode_b(), decode_cabac_residual_internal(), decode_gain_and_index(), decode_line(), decode_lspf(), decode_luma_residual(), decode_mb_b(), decode_mode(), decode_residual(), decode_sb_mem(), direct_search(), do_hybrid_window(), dv_guess_qnos(), dv_init_enc_block(), encode_block(), encode_frame(), encode_mb_internal(), encode_q_branch(), encode_subband_c0run(), encode_thread(), epzs_motion_search_internal(), ff_ac3_group_exponents(), ff_acelp_lspd2lpc(), ff_celp_lp_synthesis_filterf(), ff_check_pixfmt_descriptors(), ff_cos(), ff_emulated_edge_mc(), ff_exp2(), ff_get_format(), ff_h263_decode_mb(), ff_h263_encode_mb(), 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(), frame_start(), get_4block_rd(), get_bits(), get_bits_le(), get_block_rd(), get_dc(), get_high_utility_cell(), get_lowest_part_list_y(), get_qPy_pred(), get_sbits(), get_symbol2(), get_te0_golomb(), get_te_golomb(), get_xbits(), h263_encode_block(), hadamard8_diff8x8_c(), hadamard8_intra8x8_c(), hash(), hl_decode_mb_predict_luma(), hl_motion(), hpel_motion_search(), init_ref(), inter_recon(), loopfilter_sb(), lpc_apply_welch_window_c(), mc_block(), mov_write_trak_tag(), 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(), opus_decode_frame(), output_frame_end(), pred_motion(), pred_spatial_direct_motion(), predict_slice(), preview_obmc(), process_block(), put_bits(), put_codeword(), 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(), sym_quant(), tm2_read_deltas(), try_8x8basis_c(), try_8x8basis_TMPL(), unpack_coeffs(), utvideo_encode_frame(), write_packet(), writeCode(), x8_decode_intra_mb(), x8_get_dc_rlf(), x8_select_ac_table(), x8_setup_spatial_predictor(), yuv2rgb_write(), and yuv2rgb_write_full().