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. More...
 
#define av_assert1(cond)   ((void)0)
 assert() equivalent, that does not lie in speed critical code. More...
 
#define av_assert2(cond)   ((void)0)
 assert() equivalent, that does lie in speed critical code. More...
 

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)
#define NULL
Definition: coverity.c:32
#define AV_LOG_PANIC
Something went really wrong and we will crash now.
Definition: log.h:163
#define av_log(a,...)
#define AV_STRINGIFY(s)
Definition: macros.h:36
if(ret< 0)
Definition: vf_mcdeint.c:282

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_lines(), alloc_picture(), allocate_buffers(), analyze_plane(), ape_decode_frame(), apng_write_chunk(), 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_free(), av_grow_packet(), av_image_copy_plane(), av_image_copy_to_buffer(), 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_audio4(), avcodec_decode_video2(), avcodec_encode_audio2(), avcodec_encode_video2(), avcodec_get_chroma_sub_sample(), 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_seek(), avi_write_counters(), avi_write_ix(), avi_write_packet(), avio_close_dir(), avio_open_dir(), avpriv_copy_bits(), avpriv_find_start_code(), avutil_version(), bayer_to_rgb24_wrapper(), bayer_to_yv12_wrapper(), bprint_pascal(), buffer_offset(), build_canonical_huff(), build_def_list(), build_filter(), build_vlc(), bytestream2_init(), bytestream2_init_writer(), cache_read(), cache_seek(), calc_one_scale(), calc_persp_luts(), check_options(), check_video_streams(), color_range(), 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_cv_pixel_buffer(), create_weave_frame(), dca_find_frame_end(), decode_bmv_frame(), decode_cblk(), decode_channel_map(), decode_chunks(), decode_frame(), decode_i_frame(), decode_init(), decode_init_static(), decode_main_header(), 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_decode_header(), dnxhd_encode_init(), dnxhd_init_vlc(), do_audio_out(), do_decode(), do_encode(), do_video_out(), dv_audio_frame_size(), dv_extract_audio(), dvd_encode_rle(), dvdsub_init(), dxva2_hevc_start_frame(), dxva2_transfer_data(), dxva2_vp9_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_entries(), ff_alloc_packet2(), ff_alloc_picture(), ff_alsa_extend_reorder_buf(), ff_AMediaCodec_configure(), ff_AMediaFormat_getBuffer(), ff_AMediaFormat_getFloat(), ff_AMediaFormat_getInt32(), ff_AMediaFormat_getInt64(), ff_AMediaFormat_getString(), ff_AMediaFormat_setBuffer(), ff_AMediaFormat_setFloat(), ff_AMediaFormat_setInt32(), ff_AMediaFormat_setInt64(), ff_AMediaFormat_setString(), ff_AMediaFormat_toString(), ff_big_add(), ff_big_mul(), ff_bufqueue_get(), ff_cfhd_init_vlcs(), ff_check_pixfmt_descriptors(), ff_color_frame(), ff_copy_whiteblacklists(), ff_dca_downmix_to_stereo_fixed(), ff_dca_downmix_to_stereo_float(), ff_default_get_audio_buffer(), ff_end_tag(), ff_er_frame_end(), ff_estimate_p_frame_motion(), ff_fast_malloc(), ff_ffv1_init_slice_contexts(), ff_fill_line_with_color(), 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_generate_window_func(), ff_get_cpu_flags_ppc(), ff_get_format(), ff_get_guid(), ff_get_unscaled_swscale(), ff_h2645_extract_rbsp(), ff_h264_decode_init_vlc(), ff_h264_decode_ref_pic_list_reordering(), ff_h264_decode_slice_header(), ff_h264_execute_decode_slices(), ff_h264_execute_ref_pic_marking(), ff_h264_pred_init(), ff_h264_ref_picture(), ff_h264dsp_init(), ff_init_vlc_sparse(), ff_interleave_add_packet(), 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_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_nvenc_encode_frame(), ff_parse_mpeg2_descriptor(), 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_rl_init_vlc(), ff_rm_retrieve_cache(), ff_rv20_encode_picture_header(), ff_sbr_apply(), ff_seek_frame_binary(), ff_set_fixed_vector(), ff_slice_buffer_load_line(), ff_snow_common_end(), ff_sws_alphablendaway(), ff_sws_init_output_funcs(), ff_thread_ref_frame(), ff_unlock_avcodec(), ff_vaapi_encode2(), ff_vc1_parse_frame_header_adv(), ff_vc1_pred_b_mv(), ff_vdpau_common_end_frame(), ff_video_frame_pool_get(), ff_videotoolbox_avcc_extradata_create(), ff_vp9dsp_init(), ff_wmv2_encode_picture_header(), ffat_get_format_id(), ffio_ensure_seekback(), ffm_append_recommended_configuration(), ffm_write_header(), ffmmal_stop_decoder(), ffserver_opt_preset(), ffserver_parse_config_feed(), ffserver_parse_config_redirect(), ffserver_parse_config_stream(), ffserver_parse_ffconfig(), ffserver_save_avoption(), ffurl_accept(), ffurl_connect(), ffurl_open_whitelist(), fill_buffer(), fill_in_tongue(), fill_picture_entry(), filter_frame(), filter_packet(), filter_slice_rgb(), find_and_decode_index(), finish_file(), flush_packet(), flush_put_bits(), flv_write_packet(), format_duration(), frame_list_add_frame(), frame_list_remove_samples(), framesync_inject_frame(), framesync_sync_level_update(), free_frame(), fsb_read_header(), g722_read_header(), gain_interpolate_func(), generate_joint_tables(), generate_kernel(), geq_config_props(), get(), get_cluster_duration(), get_codecs_sorted(), get_generic_seed(), get_mvdata_interlaced(), get_qminmax(), get_sot(), gif_encode_init(), gif_write_header(), graph_config_pointers(), gsm_parse(), gxf_write_mpeg_auxiliary(), h261_decode_frame(), h261_decode_mb(), h264_decode_frame(), h264_initialise_ref_list(), handle_http_errors(), handle_id3(), handle_p_frame_apng(), handle_packet(), hdcd_envelope(), hdcd_process(), heap_bubble_down(), heap_bubble_up(), hevc_sdp_parse_fmtp_config(), hqx_filter(), http_accept(), http_send_too_busy_reply(), iff_read_header(), iff_read_packet(), init(), init_2d_vlc_rl(), init_context_defaults(), init_dimensions(), init_input_filter(), init_loop_filter(), init_pass2(), init_resampler(), 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(), jpeg2000_decode_packets_po_iteration(), latm_write_frame_header(), lfo_get_value(), libkvazaar_encode(), libvorbis_encode_frame(), libvorbis_encode_init(), ljpeg_decode_yuv_scan(), ls_decode_line(), main(), matroska_parse_laces(), mcdc(), mediacodec_decode_frame(), merge_superframe(), mjpeg_decode_scan_progressive_ac(), mkv_write_cues(), mmap_read_frame(), monochrome_color_location(), 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(), mpegts_write_pes(), mss2_decode_frame(), musx_read_header(), nut_read_header(), nut_read_timestamp(), nut_write_header(), nut_write_packet(), ogg_read_seek(), ogm_header(), opengl_init_context(), output_packet(), parse_ch(), parse_forced_key_frames(), parse_points_str(), parse_read_intervals(), pcm_read_header(), plot_freq(), plot_gamuts(), plot_spectrum_column(), plot_white_point(), png_choose_filter(), postfilter(), postproc_version(), pp_config_props(), print_stats(), process_frame(), process_work_frame(), push_single_pic(), put_cabac_terminate(), put_ebml_num(), put_ebml_size_unknown(), put_ebml_void(), put_payload_parsing_info(), put_swf_end_tag(), qdm2_restore_block(), quantize(), quantize_and_encode_band_cost_NONE(), query_formats(), queue_frames(), ratecontrol_1pass(), raw_decode(), rd_frame(), read16_fft_bin(), read8_fft_bin(), read_filter_params(), read_from_packet_buffer(), read_header(), read_sbr_grid(), read_seek(), ready_residue(), reap_filters(), rebase_put_bits(), rebuild_filter_bank_with_compensation(), receiver_thread(), recode_subtitle(), reget_buffer_internal(), register_range(), release_delayed_buffers(), remove_sps(), request_frame(), request_samples(), resample_flush(), resample_init(), residue_encode(), rgbToRgbWrapper(), rv20_decode_picture_header(), save_bits(), sbr_dequant(), sbr_make_f_master(), scale_vaapi_config_output(), search(), seek_frame_generic(), seg_init(), segment_list_print_entry(), select_blocksize(), set_af_flag(), set_mv_strides(), set_put_bits_buffer_size(), set_work_frame_pts(), setup_classifs(), skip_put_bytes(), smvjpeg_decode_frame(), 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_get_out_samples(), 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(), tcp_accept(), tiff_unpack_strip(), transcode_init(), transcode_step(), try_decode_video_frame(), try_push_frames(), update_frame_pool(), update_gain_history(), update_size(), update_value(), usePal(), vaapi_encode_free(), vaapi_encode_get_next(), vaapi_encode_h264_init_picture_params(), vaapi_encode_h264_init_slice_params(), vaapi_encode_h264_write_pps(), vaapi_encode_h264_write_slice_header2(), vaapi_encode_h264_write_sps(), vaapi_encode_h265_init_picture_params(), vaapi_encode_h265_init_slice_params(), vaapi_encode_h265_write_slice_header2(), vaapi_encode_h265_write_st_ref_pic_set(), vaapi_encode_issue(), vaapi_encode_make_packed_header(), vaapi_encode_make_param_buffer(), vaapi_encode_mangle_end(), vaapi_encode_mjpeg_write_image_header(), vaapi_encode_step(), vaapi_encode_wait(), vaapi_frames_get_constraints(), vaapi_frames_init(), vaapi_pool_alloc(), vaapi_retrieve_data(), vaapi_transfer_get_formats(), validate_avframe_allocation(), vc1_decode_frame(), vcr1_decode_frame(), vdadec_decode(), vectorscope16(), vectorscope8(), vmdaudio_decode_frame(), vp9_alloc_frame(), vp9_superframe_filter(), vtenc_populate_extradata(), 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 speed loss.

Definition at line 53 of file avassert.h.

Referenced by any_vscale(), asf_read_pts(), av_frame_move_ref(), av_frame_ref(), av_parser_parse2(), av_q2intfloat(), avcodec_decode_subtitle2(), avfilter_graph_request_oldest(), avi_write_ix(), bgr24ToUV_c(), bgr24ToUV_half_c(), bmp_encode_frame(), calc_rice_params(), check_bits_for_superframe(), chs_assemble_freq_bands(), cng_encode_frame(), codebook_trellis_rate(), compand_delay(), copy_picture_range(), 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(), encode_window_bands_info(), extract_audio(), 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_mqc_flush_to(), 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(), filter_frame_fixed(), filter_frame_float(), flac_read_timestamp(), flush_packet(), flv_write_packet(), g729_parse(), 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_coding_header(), parse_forced_key_frames(), parse_subframe_audio(), process_frame(), pullup_get_frame(), quantize_band_cost_cached(), 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(), scale_down_mix(), search_for_quantizers_twoloop(), set_frame_distances(), sub2video_push_ref(), svq1_encode_plane(), sws_scale(), undo_down_mix(), 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 apply_obmc(), apply_pitch_filters(), asv2_encode_block(), asym_quant(), av_fifo_drain(), av_fifo_generic_peek_at(), 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(), bit8x8_c(), check_4block_inter(), check_block(), check_image_pointers(), check_intra_mode(), cmp_direct_inline(), cmp_inline(), compute_lpc_coefs(), compute_scale_factors(), cqueue_dequeue(), cqueue_enqueue(), cqueue_peek(), cqueue_pop(), create_filtergraph(), 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_cblk(), 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_avg_h264_chroma_mc2_msa(), ff_avg_h264_chroma_mc4_msa(), ff_avg_h264_chroma_mc8_msa(), ff_celp_lp_synthesis_filterf(), ff_check_pixfmt_descriptors(), ff_cos(), ff_dct_unquantize_h263_inter_mmi(), ff_dct_unquantize_h263_inter_msa(), ff_dct_unquantize_h263_intra_mmi(), ff_dct_unquantize_h263_intra_msa(), ff_dct_unquantize_mpeg1_inter_mmi(), ff_dct_unquantize_mpeg1_intra_mmi(), 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_put_h264_chroma_mc2_msa(), ff_put_h264_chroma_mc4_msa(), ff_put_h264_chroma_mc8_msa(), ff_snow_pred_block(), fill_decode_caches(), fill_rectangle(), filter_plane_cols(), filter_plane_rows(), 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_pred(), jpeg2000_decode_packet(), 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(), pix_fmt_match(), 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_rac(), put_sbits(), put_symbol2(), put_vlc_symbol(), qpel_motion_search(), quant_psnr8x8_c(), rd8x8_c(), rgb2yuv(), rgb2yuv_fsb(), ring_drain(), ring_generic_read(), ring_generic_write(), roqvideo_decode_frame(), sad_hpel_motion_search(), sbr_sum_square_c(), set(), set_te_golomb(), set_ue_golomb(), set_ur_golomb(), set_ur_golomb_jpegls(), show_bits(), skip_put_bytes(), square_root(), sse(), switch_buffer(), swr_convert(), swri_noise_shaping_TMPL(), swri_resample(), sws_init_context(), sym_quant(), tm2_read_deltas(), try_8x8basis_c(), try_8x8basis_TMPL(), unpack_coeffs(), update_prob(), write_packet(), writeCode(), x8_decode_intra_mb(), x8_get_dc_rlf(), x8_select_ac_table(), x8_setup_spatial_predictor(), yuv2422_2_c_template(), yuv2mono_2_c_template(), yuv2rgb(), yuv2rgb_2_c_template(), yuv2rgb_full_2_c_template(), yuv2rgb_write(), yuv2rgb_write_full(), yuv2rgba64_2_c_template(), yuv2rgba64_full_2_c_template(), yuv2ya8_2_c(), and yuv2yuv().