Miscellaneous utility functions related to both encoding and decoding (or neither). More...
Miscellaneous utility functions related to both encoding and decoding (or neither).
Definition at line 170 of file utils.c.
Referenced by apply_param_change(), av_mpeg4_decode_header(), avcodec_open2(), avpriv_dirac_parse_sequence_header(), avs_decode_init(), brpix_decode_frame(), cdxl_decode_frame(), cmv_process_header(), decode_frame(), decode_frame_headers(), decode_init(), dnxhd_decode_frame(), dvdsub_parse_extradata(), dvvideo_decode_frame(), execute_code(), ff_h263_decode_frame(), ff_ivi_decode_frame(), ff_mjpeg_decode_sof(), ff_rv34_decode_frame(), ff_vc1_decode_entry_point(), ff_vc1_decode_sequence_header(), flashsv_decode_frame(), gif_decode_frame(), h261_decode_frame(), h264_slice_header_init(), init_image(), libopenjpeg_decode_frame(), mpeg_decode_postinit(), mpegvideo_extract_headers(), mvc_decode_init(), parse_presentation_segment(), pcx_decode_frame(), process_frame_obj(), ptx_decode_frame(), rv20_decode_picture_header(), sunrast_decode_frame(), svq1_decode_frame(), tgq_decode_frame(), tgv_decode_frame(), theora_header(), tqi_decode_frame(), truemotion1_decode_header(), txd_decode_frame(), update_dimensions(), vp56_size_changed(), vp5_parse_header(), vp6_parse_header(), and vp8_decode().
Put a string representing the codec tag codec_tag in buf.
Definition at line 2019 of file utils.c.
Referenced by avcodec_string(), init_muxer(), main(), print_pix_fmt_fourccs(), and show_stream().
Definition at line 2039 of file utils.c.
Referenced by avformat_find_stream_info(), and dump_stream_format().
Return a name for the specified profile, if available.
Definition at line 2141 of file utils.c.
Referenced by avcodec_string(), and show_stream().
Definition at line 629 of file utils.c.
Referenced by avcodec_get_context_defaults3(), and avcodec_thread_execute().
Referenced by avcodec_get_context_defaults3().
Fill AVFrame audio data and linesize pointers.
The buffer buf must be a preallocated buffer with a size big enough to contain the specified samples amount. The filled AVFrame data pointers will point to this buffer.
AVFrame extended_data channel pointers are allocated if necessary for planar audio.
Definition at line 308 of file utils.c.
Referenced by audio_encode_example(), audio_get_buffer(), pad_last_frame(), and write_audio_frame().
Flush buffers, should be called when seeking or when switching to a different stream.
Definition at line 2177 of file utils.c.
Referenced by audio_decode_frame(), get_video_frame(), rewind_file(), subtitle_thread(), and video_thread().
Definition at line 2217 of file utils.c.
Referenced by avcodec_close(), ff_MPV_common_end(), and frame_thread_free().
Return codec bits per sample.
Definition at line 2302 of file utils.c.
Referenced by adpcm_encode_init(), aiff_write_header(), avformat_find_stream_info(), caf_write_header(), epaf_read_header(), ff_alsa_open(), ff_audio_interleave_init(), ff_mov_read_stsd_entries(), ff_pcm_read_seek(), ff_voc_get_packet(), g722_read_header(), get_aiff_header(), get_bit_rate(), gxf_packet(), iff_read_header(), init_muxer(), ircam_read_header(), mkv_write_tracks(), mov_get_codec_tag(), mov_write_audio_tag(), mov_write_header(), mxf_set_audio_pts(), mxf_write_generic_sound_common(), oma_read_header(), pcm_decode_frame(), pcm_decode_init(), pcm_encode_frame(), pcm_encode_init(), pcm_read_header(), pulse_read_header(), read_header(), rso_read_header(), and show_stream().
Return the PCM codec associated with a sample format.
Definition at line 2281 of file utils.c.
Referenced by lavfi_read_header().
Return codec bits per sample.
Only return non-zero if the bits per sample is exactly correct, not an approximation.
Definition at line 2231 of file utils.c.
Referenced by av_get_audio_frame_duration(), and av_get_bits_per_sample().
Return audio frame duration.
Definition at line 2320 of file utils.c.
Referenced by build_frame_code(), do_streamcopy(), ff_get_audio_frame_size(), get_aiff_header(), rtp_send_ilbc(), and rtp_write_header().
Definition at line 33 of file bitstream_filter.c.
Definition at line 38 of file bitstream_filter.c.
Referenced by init(), new_output_stream(), and Stagefright_init().
Definition at line 61 of file bitstream_filter.c.
Referenced by decode(), init(), Stagefright_decode_frame(), and write_frame().
Definition at line 53 of file bitstream_filter.c.
Referenced by exit_program(), Stagefright_close(), Stagefright_init(), and uninit().
Definition at line 28 of file bitstream_filter.c.
Referenced by show_bsfs().
Reallocate the given block if it is not large enough, otherwise do nothing.
Definition at line 57 of file utils.c.
Referenced by caf_write_packet(), commit_slices(), decode_frame(), decode_slice(), dirac_combine_frame(), ff_add_index_entry(), ff_af_queue_add(), ff_combine_frame(), ff_mms_asf_header_parser(), ff_subtitles_queue_insert(), ff_vaapi_alloc_slice(), ff_vdpau_add_data_chunk(), flac_fifo_read_wrap(), get_stats(), mkv_copy_packet(), mxg_update_cache(), read_frame(), shorten_decode_frame(), and spdif_header_eac3().
Allocate a buffer, reusing the given one if large enough.
Contrary to av_fast_realloc the current buffer contents might not be preserved and on error the old buffer is freed, thus no special handling to avoid memleaks is necessary.
Definition at line 90 of file utils.c.
Referenced by allocate_buffers(), ape_decode_frame(), codec_reinit(), dca_decode_frame(), decode_8(), decode_frame(), decode_i_frame(), decode_p_frame(), ff_h263_decode_frame(), ff_id3v2_parse(), ff_mpeg_update_thread_context(), gif_read_header1(), gif_read_image(), ljpeg_decode_rgb_scan(), mp_decode_frame(), parse_picture_segment(), pmp_packet(), reconfigure_at_keyframe(), spdif_header_dts4(), spdif_write_packet(), submit_packet(), svq3_decode_frame(), tak_decode_frame(), truemotion1_decode_header(), truemotion1_decode_init(), update_md5_sum(), and utvideo_encode_frame().
Same behaviour av_fast_malloc but the buffer has additional FF_INPUT_BUFFER_PADDING_SIZE at the end which will will always be 0.
In addition the whole buffer will initially and after resizes be 0-initialized so that no uninitialized data will ever appear.
Definition at line 95 of file utils.c.
Referenced by cdxl_decode_frame(), cllc_decode_frame(), decode_frame(), ebml_read_binary(), encode_frame(), ff_alloc_packet2(), ff_h264_decode_nal(), ff_mjpeg_find_marker(), init_buffers(), mimic_decode_frame(), mpc7_decode_frame(), tiff_unpack_strip(), and tqi_decode_frame().
Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call.
Definition at line 107 of file utils.c.
Referenced by encode_frame().
Encode extradata length to a buffer.
Used by xiph codecs.
Definition at line 2486 of file utils.c.
Referenced by fixup_vorbis_headers(), oggvorbis_encode_init(), parse_packed_headers(), and put_main_header().
Log a generic warning message about a missing feature.
This function is intended to be used internally by FFmpeg (libavcodec, libavformat, etc.) only, and would normally not be used by applications.
Definition at line 2507 of file utils.c.
Referenced by aac_adtstoasc_filter(), amr_decode_fix_avctx(), amrnb_decode_frame(), amrnb_decode_init(), amrwb_decode_frame(), amrwb_decode_init(), decode_audio_block(), decode_frame(), decode_frame_header(), decode_ga_specific_config(), decode_ics(), decode_init(), decode_packet(), decode_seq_header(), decode_subframe(), epaf_read_header(), ff_eac3_parse_header(), ff_mjpeg_decode_sof(), ff_spdif_read_packet(), ff_vc1_parse_frame_header_adv(), flashsv_decode_frame(), h264_set_parameter_from_sps(), latm_decode_audio_specific_config(), mpc8_decode_init(), ogg_replace_stream(), parse_adts_frame_header(), parse_fmtp(), parse_MP4SLDescrTag(), qt_rtp_parse_packet(), read_sbr_extension(), read_stream_mux_config(), rv10_decode_init(), skeleton_header(), smc_decode_stream(), spdif_get_offset_and_codec(), synth_superframe(), tm2_read_header(), tta_decode_init(), vp6_parse_header(), and write_header().
Log a generic warning message asking for a sample.
This function is intended to be used internally by FFmpeg (libavcodec, libavformat, etc.) only, and would normally not be used by applications.
Referenced by alac_decode_init(), ape_decode_init(), ast_read_header(), atrac1_decode_init(), av_log_missing_feature(), avpriv_adx_decode_header(), avr_read_header(), cdxl_decode_frame(), cinepak_decode(), cook_decode_init(), dca_decode_frame(), dca_exss_parse_header(), dca_parse_frame_header(), dca_subframe_header(), decode_band_hdr(), decode_bytes(), decode_channel_transform(), decode_frame(), decode_frame_headers(), decode_init(), decode_mvc2(), decode_nop(), decode_scalefactors(), decode_sgirle8(), decode_slice_header(), decode_subframe(), decode_wmv9(), determine_bitrate(), ea_read_packet(), execute_code(), ff_compute_band_indexes(), ff_mjpeg_decode_sof(), ff_parse_mpeg2_descriptor(), ff_spdif_read_packet(), get_packet_header(), iff_read_header(), imc_decode_block(), imc_decode_init(), lvf_read_header(), mov_read_mdhd(), mpc7_decode_init(), mtv_read_header(), mv_read_header(), mxf_read_packet_old(), mxf_read_primer_pack(), nist_read_header(), oma_read_header(), paf_vid_decode(), parse_setup_header(), parse_video_var(), pmp_packet(), process_audio_header_eacs(), process_audio_header_elements(), process_ea_header(), process_frame_obj(), ptx_decode_frame(), ra288_decode_init(), read_block_data(), read_frame(), read_header(), read_major_sync(), read_restart_header(), read_table(), rso_read_header(), save_bits(), smjpeg_read_header(), spdif_header_dts(), spdif_header_truehd(), sunrast_decode_frame(), truemotion1_decode_header(), truespeech_decode_init(), unsupported(), vcr1_decode_init(), wsaud_read_header(), xa_decode(), xmv_read_header(), xwd_decode_frame(), xwma_read_header(), and zero12v_decode_init().
If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL, returns the next registered hardware accelerator after hwaccel, or NULL if hwaccel is the last one.
Definition at line 2543 of file utils.c.
Referenced by ff_find_hwaccel().
Register a user provided lock manager supporting the operations specified by AVLockOp.
mutex points to a (void *) where the lockmgr should store/get a pointer to a user allocated mutex. It's NULL upon AV_LOCK_CREATE and != NULL for all other ops.
Get the type of the given codec.
Definition at line 2668 of file utils.c.
Referenced by mkv_query_codec().
Get the name of a codec.
Definition at line 1999 of file utils.c.
Referenced by add_stream(), avcodec_string(), avformat_find_stream_info(), flv_write_header(), flv_write_packet(), get_audio_flags(), init_input_stream(), read_frame_internal(), rtp_write_header(), srt_write_header(), and transcode_init().
Definition at line 2688 of file utils.c.
Referenced by avcodec_close(), avcodec_copy_context(), avcodec_open2(), ff_mp4_read_dec_config_descr(), mpegts_find_stream_type(), mpegts_set_stream_info(), and try_decode_frame().
Definition at line 141 of file utils.c.
Referenced by avcodec_close(), avcodec_find_encoder_by_name(), avcodec_open2(), find_encdec(), next_codec_for_id(), and print_codec().
Definition at line 146 of file utils.c.
Referenced by avcodec_find_decoder_by_name(), avcodec_open2(), find_encdec(), and next_codec_for_id().
Definition at line 2504 of file codec_desc.c.
Referenced by avcodec_get_name(), avcodec_open2(), is_intra_only(), and show_help_muxer().
Iterate over all codec descriptors known to libavcodec.
Definition at line 2514 of file codec_desc.c.
Referenced by avcodec_descriptor_get_by_name(), and get_codecs_sorted().
Definition at line 2523 of file codec_desc.c.
Referenced by find_codec_or_die(), and show_help_codec().