filter_design.txt File Reference

Functions

Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format (the sample packing is implied by the sample format) and sample rate.The lists are not just lists
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR (EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Buffer references ownership and permissions
 
the buffer is automatically deallocated once all corresponding references have been destroyed The characteristics of the data (resolution, sample rate, etc.) are stored in the reference
 
it can be given away to ff_start_frame *A reference passed to ff_filter_frame (or the deprecated ff_start_frame) is given away and must no longer be used.*A reference created with avfilter_ref_buffer belongs to the code that created it.*A reference obtained with ff_get_video_buffer or ff_get_audio_buffer belongs to the code that requested it.*A reference given as return value by the get_video_buffer or get_audio_buffer method is given away and must no longer be used.Link reference fields---------------------The AVFilterLink structure has a few AVFilterBufferRef fields.The cur_buf and out_buf were used with the deprecated start_frame/draw_slice/end_frame API and should no longer be used.src_buf
 
these buffered frames must be flushed immediately if a new input produces new output (Example:frame rate-doubling filter:filter_frame must(1) flush the second copy of the previous frame, if it is still there,(2) push the first copy of the incoming frame,(3) keep the second copy for later.) If the input frame is not enough to produce output
 
 while (!frame_pushed)
 
Note except for filters that can have queued request_frame does not push and as a the filter_frame method will be called and do the work Legacy the filter_frame method was it was made of draw_slice (that could be called several times on distinct parts of the frame) and end_frame
 

Variables

Filter design
 
Filter the word “frame” indicates either a video frame or a group of audio samples
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format negotiation
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output links
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel layout
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a link
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining list
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining again
 
the buffer and buffer reference mechanism is intended to avoid
 
the buffer and buffer reference mechanism is intended to as much as possible
 
the buffer and buffer reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFilterBuffer structures They must not be accessed directly
 
the buffer and buffer reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFilterBuffer structures They must not be accessed but through references stored in AVFilterBufferRef structures Several references can point to the same buffer
 
different references for the same buffer can show different characteristics In particular
 
it can be given away to ff_start_frame *A reference passed to cur_buf_copy and partial_buf are used by libavfilter internally and must not be accessed by filters Reference permissions The AVFilterBufferRef structure has a perms field that describes what the code that owns the reference is allowed to do to the buffer data Different references for the same buffer can have different permissions For video filters that implement the deprecated start_frame draw_slice end_frame API
 
it can be given away to ff_start_frame *A reference passed to cur_buf_copy and partial_buf are used by libavfilter internally and must not be accessed by filters Reference permissions The AVFilterBufferRef structure has a perms field that describes what the code that owns the reference is allowed to do to the buffer data Different references for the same buffer can have different permissions For video filters that implement the deprecated start_frame draw_slice end_frame the permissions only apply to the parts of the buffer that have already been covered by the draw_slice method The value is a binary OR of the following constants
 
this is essentially always true and is there for self documentation * AV_PERM_WRITE
 
this is essentially always true and is there for self documentation without modifying the data in between * AV_PERM_REUSE2
 
this is essentially always true and is there for self documentation without modifying the data in between WRITE and PRESERVE permissions are about sharing the same buffer between several filters to avoid expensive copies without them doing conflicting changes on the data The REUSE and REUSE2 permissions are about special memory for direct rendering For example a buffer directly allocated in video memory must not modified once it is displayed on screen
 
this is essentially always true and is there for self documentation without modifying the data in between WRITE and PRESERVE permissions are about sharing the same buffer between several filters to avoid expensive copies without them doing conflicting changes on the data The REUSE and REUSE2 permissions are about special memory for direct rendering For example a buffer directly allocated in video memory must not modified once it is displayed on or it will cause tearing
 
it will therefore not have the REUSE2 permission The ALIGN permission is about extracting part of the for copy less padding or cropping for example References received on input pads are guaranteed to have all the permissions stated in the min_perms field and none of the permissions stated in the rej_perms References obtained by ff_get_video_buffer and ff_get_audio_buffer are guaranteed to have at least all the permissions requested as argument References created by avfilter_ref_buffer have the same permissions as the original reference minus the ones explicitly masked
 
the mask is usually to keep the same permissions Filters should remove permissions on reference they give to output whenever necessary It can be automatically done by setting the rej_perms field on the output pad Here are a few guidelines corresponding to common situations
 
the mask is usually to keep the same permissions Filters should remove permissions on reference they give to output whenever necessary It can be automatically done by setting the rej_perms field on the output pad Here are a few guidelines corresponding to common then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input Therefore
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an input
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already ready
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If not
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return values
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return
 
if it could not for temporary reasons
 
if it could not because there are no more frames
 
if it could not because there are no more it should return AVERROR_EOF The typical implementation of request_frame for a filter with several inputs will look like that
 
Note except for filters that can have queued request_frame does not push and as a reaction
 
Note except for filters that can have queued request_frame does not push and as a the filter_frame method will be called and do the work Legacy the filter_frame method was split
 
Note except for filters that can have queued request_frame does not push and as a the filter_frame method will be called and do the work Legacy the filter_frame method was it was made of start_frame
 
for audio filters
 

Function Documentation

if it could not for temporary it should return AVERROR ( EAGAIN  )

Referenced by a64_write_header(), a64multi_init_encoder(), aac_decode_frame(), aac_encode_frame(), aac_encode_init(), aasc_decode_init(), add_buffer_ref(), add_doubles_metadata(), add_file(), add_fragment(), add_interval(), add_shorts_metadata(), add_string_metadata(), add_to_queue(), add_tracked_method(), adpcm_decode_init(), adpcm_encode_frame(), adpcm_encode_init(), adts_aac_read_header(), adx_encode_frame(), adx_encode_init(), adx_read_header(), adx_read_packet(), aea_read_header(), aea_read_packet(), afc_read_header(), aiff_read_header(), aiff_write_header(), aiff_write_packet(), al_get_error(), alac_encode_init(), alloc_and_copy(), alloc_buffers(), alloc_picture(), alloc_picture_tables(), alloc_scratch_buffers(), alloc_sequence_buffers(), alloc_sws_context(), allocate_buffers(), allocate_sample_buffers(), amf_parse_object(), amr_decode_fix_avctx(), amr_handle_packet(), amr_read_header(), amr_read_packet(), amr_wb_encode_frame(), amr_wb_encode_init(), apc_read_header(), apc_read_packet(), ape_decode_frame(), ape_decode_init(), ape_read_header(), ape_read_packet(), ape_tag_read_field(), append_entry(), aqt_read_header(), asf_read_picture(), asf_read_seek(), asf_read_stream_properties(), asf_write_header1(), asfrtp_parse_packet(), asink_query_formats(), ass_decode_init(), ass_encode_init(), ass_read_header(), ast_read_header(), ast_write_header(), atrac1_decode_init(), atrac3_decode_init(), audio_decode_frame(), audio_get_buffer(), audio_open(), audio_read_header(), audio_read_packet(), audio_write_header(), audio_write_packet(), aura_decode_init(), auto_matrix(), av_audio_fifo_drain(), av_audio_fifo_read(), av_audio_fifo_write(), av_bprint_alloc(), av_bprint_finalize(), av_buffer_make_writable(), av_buffer_realloc(), av_buffersink_get_frame_flags(), av_buffersink_get_samples(), av_buffersink_set_frame_size(), av_buffersrc_add_frame_flags(), av_buffersrc_add_frame_internal(), av_dict_set(), av_escape(), av_expr_parse(), av_expr_parse_and_eval(), av_fifo_grow(), av_fifo_realloc2(), av_file_map(), av_frame_copy_props(), av_frame_get_buffer(), av_frame_make_writable(), av_frame_ref(), av_get_channel_layout_channel_index(), av_get_output_timestamp(), av_grow_packet(), av_hmac_final(), av_image_alloc(), av_image_check_size(), av_image_copy_to_buffer(), av_image_fill_linesizes(), av_image_fill_pointers(), av_image_get_buffer_size(), av_image_get_linesize(), av_interleaved_write_frame(), av_new_packet(), av_opencl_buffer_read_image(), av_opencl_buffer_write_image(), av_opencl_create_kernel(), av_opencl_get_device_list(), av_opencl_init(), av_opencl_register_kernel_code(), av_opt_get(), av_opt_get_image_size(), av_opt_get_key_value(), av_opt_query_ranges_default(), av_opt_set(), av_opt_set_bin(), av_opt_set_from_string(), av_opt_set_image_size(), av_opt_set_video_rate(), av_packet_from_data(), av_packet_merge_side_data(), av_packet_shrink_side_data(), av_packet_split_side_data(), av_parse_color(), av_parse_time(), av_parse_video_rate(), av_parse_video_size(), av_pix_fmt_count_planes(), av_pix_fmt_get_chroma_sub_sample(), av_probe_input_buffer(), av_read_frame(), av_read_pause(), av_read_play(), av_samples_alloc(), av_samples_alloc_array_and_samples(), av_samples_get_buffer_size(), av_sdp_create(), av_size_mult(), av_strerror(), av_tempfile(), av_usleep(), avcodec_copy_context(), avcodec_decode_audio3(), avcodec_decode_audio4(), avcodec_decode_subtitle2(), avcodec_decode_video2(), avcodec_encode_audio(), avcodec_encode_audio2(), avcodec_encode_video2(), avcodec_fill_audio_frame(), avcodec_get_context_defaults3(), avcodec_open2(), avfilter_config_links(), avfilter_copy_frame_props(), avfilter_graph_create_filter(), avfilter_graph_free(), avfilter_graph_parse(), avfilter_graph_parse2(), avfilter_graph_send_command(), avfilter_init_str(), avfilter_link(), avfilter_process_command(), avfilter_transform(), avformat_alloc_output_context2(), avformat_find_stream_info(), avformat_match_stream_specifier(), avformat_open_input(), avformat_queue_attached_pictures(), avformat_seek_file(), avi_read_header(), avi_read_tag(), avi_write_header(), avi_write_ix(), avi_write_packet(), avio_get_str(), avio_pause(), avio_seek(), avio_seek_time(), avio_size(), avpriv_set_systematic_pal2(), avpriv_vsnprintf(), avr_read_header(), avresample_build_matrix(), avresample_get_matrix(), avresample_open(), avresample_set_channel_mapping(), avresample_set_compensation(), avresample_set_matrix(), avs_read_audio_packet(), avs_read_packet(), avs_read_video_packet(), avui_decode_frame(), avui_encode_init(), bfi_read_header(), bfi_read_packet(), bluray_open(), bluray_read(), bluray_seek(), bmp_decode_frame(), bmv_read_header(), bmv_read_packet(), build_filter(), bytestream2_seek(), bytestream2_seek_p(), caca_write_header(), cache_read(), cache_seek(), caf_write_packet(), cbr_bit_allocation(), cdata_read_header(), cdg_decode_frame(), cdg_decode_init(), cdg_tile_block(), cdxl_decode_frame(), cdxl_read_packet(), celt_header(), channelmap_config_input(), channelmap_filter_frame(), channelmap_init(), che_configure(), check_timecode(), cin_read_frame_header(), cin_read_header(), cinepak_decode_init(), cinvideo_decode_init(), cllc_decode_frame(), cmdutils_read_file(), cmv_decode_init(), cng_decode_init(), cng_encode_init(), codec_reinit(), codecctl_int(), command(), common_init(), compact_init(), compile_kernel_file(), compute_pkt_fields2(), concat_open(), concat_read_header(), concat_seek(), concatenate_packet(), config_audio_output(), config_input(), config_input_props(), config_output(), config_output_props(), config_props(), config_props_input(), config_props_output(), config_video_output(), configure_audio_filters(), configure_filtergraph(), cook_decode_init(), copy_chapters(), copy_from(), copy_moof(), copy_packet_data(), cpia_decode_init(), create_audio_stream(), create_filter(), create_map(), create_vorbis_context(), crypto_open2(), data_open(), daud_header(), daud_packet(), dc1394_read_common(), dca_decode_frame(), decimate_init(), decode(), decode_8(), decode_audio(), decode_block(), decode_codestream(), decode_frame(), decode_i_frame(), decode_init(), decode_init_thread_copy(), decode_main_header(), decode_p_frame(), decode_packet(), decode_pic(), decode_pic_hdr(), decode_picture_header(), decode_slice(), decode_stream_header(), decode_subframe_lpc(), decode_text_chunk(), decode_thread(), decode_update_thread_context(), decode_video(), decode_wave_header(), decode_zbuf(), decoder_init(), device_init(), device_open(), device_try_init(), dfa_decode_init(), dfa_read_header(), dfa_read_packet(), dh_is_valid_public_key(), dilate_init(), do_adobe_auth(), do_llnw_auth(), do_tls_poll(), dpcm_decode_frame(), dpcm_decode_init(), draw_glyphs(), draw_text(), dshow_add_device(), dshow_cycle_pins(), dshow_open_device(), dshow_read_header(), dshow_read_packet(), dshow_set_audio_buffer_size(), dtshd_read_header(), dv1394_read_header(), dv1394_read_packet(), dv_read_header(), dv_read_packet(), dvdsub_parse_extradata(), dvvideo_init_encoder(), dxa_read_header(), dxa_read_packet(), dyn_buf_write(), ea_read_header(), ea_read_packet(), ebml_parse_elem(), ebml_read_ascii(), ebml_read_binary(), ebml_read_master(), ebml_read_num(), eightsvx_decode_frame(), encode_dvd_subtitles(), encode_frame(), encode_init(), encode_intervals(), encode_picture_ls(), epaf_read_header(), escape130_decode_init(), estimate_timings_from_pts(), eval_function(), expand_function(), expand_text(), expand_tseq(), extract_header(), Faac_encode_init(), fbdev_read_header(), fbdev_read_packet(), ff_ac3_float_mdct_init(), ff_ac3_validate_metadata(), ff_add_index_entry(), ff_add_param_change(), ff_af_queue_add(), ff_alloc_packet2(), ff_alloc_picture(), ff_alsa_extend_reorder_buf(), ff_alsa_open(), ff_alsa_xrun_recover(), ff_amf_read_string(), ff_asf_get_packet(), ff_ass_add_rect(), ff_ass_subtitle_header(), ff_audio_data_combine(), ff_audio_data_copy(), ff_audio_data_init(), ff_audio_data_read_from_fifo(), ff_audio_data_realloc(), ff_audio_data_set_channels(), ff_audio_mix_get_matrix(), ff_audio_mix_set_matrix(), ff_audio_resample(), ff_avc_write_annexb_extradata(), ff_avfilter_graph_config_pointers(), ff_bgmc_init(), ff_cavs_init(), ff_ccitt_unpack(), ff_celt_error_to_averror(), ff_combine_frame(), ff_dh_compute_shared_secret_key(), ff_dh_generate_public_key(), ff_dh_write_public_key(), ff_draw_init(), ff_fill_rgba_map(), ff_filter_alloc(), ff_filter_frame_framed(), ff_flv_decode_picture_header(), ff_frame_thread_encoder_init(), ff_h263_decode_frame(), ff_h263_decode_init(), ff_h263_handle_packet(), ff_h264_alloc_tables(), ff_huffyuv_alloc_temp(), ff_id3v2_parse_apic(), ff_id3v2_write_apic(), ff_init_buffer_info(), ff_interleave_add_packet(), ff_interleave_new_audio_packet(), ff_ivi_init_planes(), ff_ivi_init_tiles(), ff_j2k_dwt_init(), ff_j2k_init_component(), ff_load_image(), ff_lock_avcodec(), ff_lpc_init(), ff_mjpeg_find_marker(), ff_mov_add_hinted_packet(), ff_mov_init_hinting(), ff_mov_read_stsd_entries(), ff_mov_write_packet(), ff_mp4_read_dec_config_descr(), ff_mpeg_update_thread_context(), ff_MPV_encode_init(), ff_mpv_export_qp_table(), ff_mpv_frame_size_alloc(), ff_mss12_decode_init(), ff_network_close(), ff_network_wait_fd(), ff_network_wait_fd_timeout(), ff_opencl_transform(), ff_opus_error_to_averror(), ff_parse_channel_layout(), ff_parse_fmtp(), ff_parse_pixel_format(), ff_parse_sample_format(), ff_parse_sample_rate(), ff_parse_time_base(), ff_pcm_read_packet(), ff_raw_audio_read_header(), ff_raw_read_partial_packet(), ff_raw_video_read_header(), ff_read_packet(), ff_rm_retrieve_cache(), ff_rtmp_calc_digest(), ff_rtmp_packet_create(), ff_rtmp_packet_read(), ff_rtmp_packet_read_internal(), ff_rtmpe_gen_pub_key(), ff_rtp_chain_mux_open(), ff_rtp_parse_packet(), ff_rtsp_open_transport_ctx(), ff_rtsp_setup_output_streams(), ff_scale_image(), ff_slice_buffer_init(), ff_sndio_open(), ff_snow_common_init_after_header(), ff_spdif_read_packet(), ff_srtp_set_crypto(), ff_subtitles_queue_seek(), ff_thread_ref_frame(), ff_thread_video_encode_frame(), ff_udp_set_remote_url(), ff_vda_create_decoder(), ff_vdpau_add_buffer(), ff_voc_get_packet(), ff_vp56_init_context(), ff_wms_parse_sdp_a_line(), ff_xvid_rate_control_init(), ffio_fdopen(), ffio_rewind_with_probe_data(), ffio_set_buf_size(), ffm2_read_header(), ffm_is_avail_data(), ffm_read_header(), ffm_read_packet(), ffm_read_write_index(), ffm_write_header(), ffm_write_write_index(), ffurl_get_multi_file_handle(), ffurl_read(), ffurl_read_complete(), ffurl_seek(), ffurl_shutdown(), ffurl_write(), ffv1_allocate_initial_states(), ffv1_init_slice_contexts(), ffv1_init_slice_state(), ffv1_init_slices_state(), fieldmatch_init(), file_check(), file_read(), file_write(), film_read_header(), film_read_packet(), filter_frame(), filter_frame_main(), filter_frame_over(), filter_query_formats(), find_headers_search_validate(), find_reorder_func(), flac_encode_init(), flac_read_header(), flac_write_block_comment(), flac_write_header(), flashsv_decode_frame(), flashsv_encode_frame(), flashsv_encode_init(), flat_init(), flic_read_header(), flic_read_packet(), floor_encode(), flush(), flush_frames(), flv_data_packet(), flv_get_extradata(), flv_queue_extradata(), flv_read_header(), flv_read_packet(), flv_write_header(), flv_write_packet(), fourxm_read_header(), fourxm_read_packet(), frame_list_add_frame(), frame_thread_init(), frei0r_init(), frm_read_header(), g722_encode_init(), g722_read_header(), g723_1_init(), g726_reset(), g729_read_header(), generate_dither_noise(), geq_filter_frame(), geq_init(), get_audio_buffer(), get_audio_flags(), get_buffer(), get_buffer2(), get_buffer_internal(), get_channel(), get_channel_idx(), get_chunk_header(), get_coc(), get_cod(), get_codec_data(), get_cookies(), get_cox(), get_device_list(), get_format(), get_format_from_sample_fmt(), get_http_header_data(), get_input_packet_mt(), get_key(), get_metadata(), get_packet(), get_pix_fmt_depth(), get_private_data(), get_qcc(), get_qcx(), get_sindex(), get_siz(), get_sockaddr(), get_sot(), get_stats(), get_tag(), get_tcp_server_response(), get_video_buffer(), get_video_private_data(), gif_decode_frame(), gif_decode_init(), gif_encode_frame(), gif_encode_init(), gif_image_write_image(), gif_read_header(), gif_read_image(), gif_read_packet(), gif_write_header(), gif_write_packet(), gopher_connect(), grab_read_header(), grab_read_packet(), graph_check_validity(), graph_config_formats(), gsm_read_header(), gsm_read_packet(), guess_channel_layout(), gxf_write_header(), h263_handle_packet(), h264_handle_packet(), h264_mp4toannexb_filter(), h264_slice_header_init(), handle_chunk_type(), handle_connection(), handle_file(), handle_notify(), handle_packets(), hls_mux_init(), hls_open(), hls_read_header(), hls_read_seek(), hls_start(), hls_write_header(), http_get_file_handle(), http_open_cnx(), http_prepare_data(), http_receive_data(), http_send_data(), http_server(), ico_check_attributes(), ico_write_header(), ico_write_packet(), id3v2_put_ttag(), idcin_read_header(), idcin_read_packet(), iec61883_read_header(), iec61883_receive_task(), if(), iff_read_header(), iff_read_packet(), ilbc_decode_init(), ilbc_encode_init(), ilbc_parse_fmtp(), ilbc_parse_sdp_line(), ilbc_read_header(), ilbc_read_packet(), ilbc_write_header(), image_get_linesize(), img_read_header(), img_read_packet(), ingenient_read_packet(), init(), init_audio(), init_buffers(), init_bundles(), init_context_frame(), init_convert_timestamp(), init_cook_mlt(), init_dict(), init_er(), init_filter_param(), init_frames(), init_input_stream(), init_input_threads(), init_mdct_win(), init_muxer(), init_noise(), init_opencl_env(), init_pattern_from_file(), init_pattern_from_string(), init_report(), init_stream(), init_table_pools(), init_tile(), init_tiles(), init_video(), input_thread(), interpolate(), ipmovie_read_header(), ipmovie_read_packet(), ipvideo_decode_init(), ircam_read_header(), ircam_write_header(), ism_flush(), ism_seek(), ism_write_header(), iss_read_header(), iss_read_packet(), ivf_write_header(), jacosub_read_header(), join_config_output(), join_init(), join_request_frame(), jpeg_parse_packet(), lag_decode_frame(), latm_decode_audio_specific_config(), latm_parse_packet(), lavfi_read_header(), lavfi_read_packet(), libcelt_dec_init(), libopenjpeg_encode_frame(), libopenjpeg_encode_init(), libopus_configure_encoder(), libopus_decode_init(), libopus_encode_init(), libquvi_probe(), libquvi_read_header(), libschroedinger_decode_frame(), libshine_encode_init(), link_filter_inouts(), list_standards(), lmlm4_read_header(), lmlm4_read_packet(), load_font_file(), load_glyph(), load_mask(), load_path(), load_textfile(), loas_read_header(), lvf_read_header(), lxf_read_header(), lxf_read_packet(), main(), matroska_decode_buffer(), matroska_parse_frame(), matroska_parse_laces(), matroska_parse_rm_audio(), matroska_read_header(), mca(), md5_close(), md5_finish(), md5_open(), microdvd_read_header(), mimic_decode_frame(), mimic_decode_init(), mimic_init_thread_copy(), mjpeg2jpeg_filter(), mkv_add_cuepoint(), mkv_add_seekhead_entry(), mkv_write_attachments(), mkv_write_codecprivate(), mkv_write_header(), mkv_write_packet(), mkv_write_packet_internal(), mkv_write_tracks(), mmap_init(), mmap_read_frame(), mmap_release_buffer(), mmap_start(), mmf_rate(), mmf_read_header(), mms_open(), mms_read(), mmsh_open_internal(), mmsh_seek(), modplug_load_metadata(), modplug_read_header(), modplug_read_packet(), mov_metadata_raw(), mov_open_dref(), mov_read_cmov(), mov_read_covr(), mov_read_ctts(), mov_read_dref(), mov_read_dvc1(), mov_read_extradata(), mov_read_ftyp(), mov_read_glbl(), mov_read_hdlr(), mov_read_sbgp(), mov_read_stco(), mov_read_stps(), mov_read_strf(), mov_read_stsc(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_trak(), mov_read_trex(), mov_read_trun(), mov_read_wave(), mov_text_decode_frame(), mov_text_encode_frame(), mov_text_encode_init(), mov_write_dvc1_structs(), mov_write_header(), mov_write_tmcd_tag(), movie_common_init(), movie_push_frame(), mp3_read_header(), mp3lame_encode_frame(), mp3lame_encode_init(), mp_decode_frame(), MPA_encode_init(), mpc7_decode_frame(), mpc8_read_header(), mpc8_read_packet(), mpc_read_header(), mpc_read_packet(), mpeg_field_start(), mpeg_mux_init(), mpeg_parse_packet(), mpegps_read_packet(), mpegps_read_pes_header(), mpegts_handle_packet(), mpegts_init(), mpegts_push_data(), mpegts_raw_read_packet(), mpegts_read_packet(), mpegts_set_stream_info(), mpegts_write_header(), mpegts_write_packet_internal(), mpl2_decode_frame(), mpl2_read_header(), mpsub_read_header(), msnwc_tcp_read_header(), mss2_decode_init(), mss3_decode_init(), mss4_decode_init(), mtv_read_header(), mv_read_header(), mv_read_packet(), mv_read_seek(), mvc_decode_init(), mxf_add_metadata_set(), mxf_compute_index_tables(), mxf_compute_ptses_fake_index(), mxf_decrypt_triplet(), mxf_get_sorted_table_segments(), mxf_parse_structural_metadata(), mxf_read_content_storage(), mxf_read_generic_descriptor(), mxf_read_index_entry_array(), mxf_read_local_tags(), mxf_read_material_package(), mxf_read_partition_pack(), mxf_read_primer_pack(), mxf_read_sequence(), mxf_read_source_package(), mxf_read_utf16_string(), mxf_set_audio_pts(), mxf_timestamp_to_str(), mxf_uid_to_str(), mxf_write_header(), mxg_read_header(), mxg_read_packet(), mxg_update_cache(), mxpeg_check_dimensions(), mxpeg_decode_frame(), mxpeg_decode_mxm(), nc_read_header(), nc_read_packet(), nist_read_header(), noise(), normalize_double(), nsv_parse_NSVf_header(), nut_read_header(), nut_write_header(), nut_write_packet(), nuv_header(), nuv_packet(), ogg_buffer_page(), ogg_build_flac_headers(), ogg_build_opus_headers(), ogg_build_speex_headers(), ogg_new_stream(), ogg_read_page(), ogg_write_header(), oggvorbis_encode_init(), oma_read_header(), oma_read_packet(), oma_write_header(), open_input(), open_input_file(), open_null_ctx(), open_output_file(), open_slave(), open_stream(), opt_channel_layout(), opt_codec(), opt_filter_complex(), opt_filter_complex_script(), opt_format(), opt_sameq(), opt_show_entries(), opt_target(), opus_header(), output_frame(), packetizer_read(), pad_last_frame(), paf_vid_init(), parse_channel_name(), parse_command(), parse_command_line(), parse_commands(), parse_expr(), parse_factor(), parse_file(), parse_fmtp_config(), parse_fragment(), parse_frames(), parse_inputs(), parse_interval(), parse_intervals(), parse_iplconvkernel(), parse_key_value_pair(), parse_keyframes_index(), parse_maps(), parse_MP4DecConfigDescrTag(), parse_named_def(), parse_optgroup(), parse_option(), parse_options(), parse_outputs(), parse_packed_headers(), parse_packet(), parse_picture(), parse_playlist(), parse_points_str(), parse_primary(), parse_psfile(), parse_rule(), parse_setup_header(), parse_string(), parse_subexpr(), parse_sws_flags(), parse_synth_channel(), parse_synth_channel_bell(), parse_synth_channel_sine(), parse_synth_channel_spin(), parse_term(), parse_time_sequence(), parse_times(), parse_volume(), pcm_decode_frame(), pcm_decode_init(), pcm_encode_init(), pcm_read_header(), pcx_decode_frame(), pick_format(), pjs_read_header(), pmp_header(), pmp_packet(), png_dec_init(), pnm_decode_frame(), pnm_encode_frame(), pp_config_props(), pp_filter_frame(), pp_process_command(), predictor_calc_error(), process_command(), process_frame_obj(), process_input(), process_line(), process_options(), prores_encode_init(), pulse_read_header(), pulse_read_packet(), push_samples(), put_codeword(), put_main_header(), pva_read_header(), pva_read_packet(), pvf_read_header(), pxr24_uncompress(), qcp_read_header(), qdm2_parse_config(), qdm2_parse_packet(), qt_rtp_parse_packet(), qtrle_encode_init(), query_codec(), query_formats(), queue_frames(), r3d_read_rdvo(), r3d_read_red1(), raw_decode(), raw_init_decoder(), rawvideo_read_header(), rdt_parse_sdp_line(), read_audio_mux_element(), read_data_packet(), read_desc_chunk(), read_frame(), read_frame_internal(), read_from_fifo(), read_header(), read_kuki_chunk(), read_line(), read_number(), read_packet(), read_part_of_packet(), read_seek(), read_shape_from_file(), read_specific_config(), read_tag(), read_tfra(), read_whole_file(), ready_codebook(), ready_residue(), real_seek(), realloc_buffer(), realtext_read_header(), reap_filters(), recode_subtitle(), reconfigure_at_keyframe(), request_frame(), resample(), residue_encode(), ret_str(), retry_transfer_wrapper(), return_audio_frame(), return_frame(), rl2_decode_init(), rl2_read_header(), rl2_read_packet(), rm_assemble_video_frame(), rm_read_audio_stream_info(), rm_read_extradata(), rm_read_header(), rm_read_packet(), roq_decode_init(), roq_dpcm_encode_init(), roq_encode_init(), roq_read_header(), roq_read_packet(), rpl_read_header(), rpl_read_packet(), rso_read_header(), rtmp_calc_swf_verification(), rtmp_calc_swfhash(), rtmp_handshake(), rtmp_http_open(), rtmp_http_read(), rtmp_http_write(), rtmp_open(), rtmp_read_seek(), rtmp_receive_hs_packet(), rtmp_send_hs_packet(), rtmp_server_handshake(), rtmp_write(), rtmp_write_amf_data(), rtp_get_multi_file_handle(), rtp_open(), rtp_parse_mp4_au(), rtp_parse_packet_internal(), rtp_read(), rtp_send_samples(), rtp_write_header(), rtp_write_packet(), rtsp_read_announce(), rtsp_read_header(), rtsp_read_packet(), rtsp_read_request(), rtsp_send_reply(), rtsp_write_packet(), rv34_decoder_alloc(), sami_read_header(), sap_fetch_packet(), sap_read_header(), sap_write_header(), sap_write_packet(), sbg_read_header(), sbg_read_packet(), sbg_read_seek2(), scale_double(), sctp_open(), sctp_wait_fd(), sctp_write(), sdl_write_header(), sdp_parse_fmtp_config_h264(), seek_frame_generic(), seg_write_header(), segment_end(), segment_mux_init(), select_reference_stream(), select_voice(), send_command_packet(), send_silence(), seq_fill_buffer(), seq_init_frame_buffers(), seq_read_header(), seq_read_packet(), set_channel_info(), set_format(), set_param(), set_params(), set_segment_filename(), set_string_binary(), sgirle_decode_init(), shift_data(), shorten_decode_frame(), siff_parse_vbv1(), siff_read_packet(), smacker_read_header(), smacker_read_packet(), smjpeg_read_header(), smjpeg_write_header(), smka_decode_frame(), smka_decode_init(), smooth_init(), smush_read_header(), smush_read_packet(), sol_read_packet(), source_config_props(), source_init(), source_request_frame(), sox_read_header(), spdif_header_aac(), spdif_header_dts(), spdif_header_dts4(), spdif_header_eac3(), spdif_write_header(), spdif_write_packet(), srt_encode_frame(), srt_read_header(), srt_write_header(), Stagefright_decode_frame(), Stagefright_init(), start_jack(), str_read_header(), str_read_packet(), stream_toggle_pause(), sub2video_prepare(), submit_stats(), subviewer1_read_header(), subviewer_read_header(), sunrast_decode_frame(), sunrast_encode_init(), svq1_decode_frame(), svq1_decode_init(), svq3_decode_frame(), svq3_decode_init(), svq3_parse_packet(), swf_probe(), swf_read_header(), swf_read_packet(), swf_write_header(), swr_init(), swr_set_channel_mapping(), swr_set_compensation(), swr_set_matrix(), swri_dither_init(), swri_realloc_audio(), sws_init_context(), tag_tree_decode(), tak_decode_frame(), tak_parse(), tak_read_header(), targa_encode_frame(), tcp_open(), tedcaptions_read_header(), tee_write_header(), tee_write_packet(), text_decode_frame(), tgv_decode_frame(), thp_read_header(), thp_read_packet(), thread_get_buffer_internal(), tiff_decode_tag(), tiff_unpack_strip(), tls_open(), tmv_read_header(), tqi_decode_frame(), transcode(), transcode_from_filter(), transcode_init(), transcode_step(), try_decode_frame(), try_filter_frame(), try_filter_next_frame(), try_seek(), tscc2_decode_init(), tta_decode_init(), tta_read_header(), twin_decode_frame(), twolame_encode_init(), txd_read_header(), udp_get_file_handle(), udp_open(), udp_read(), udp_set_multicast_sources(), udp_set_url(), update_context_from_user(), update_dimensions(), update_frame_pool(), update_md5_sum(), url_alloc_for_protocol(), url_open_dyn_buf_internal(), utvideo_encode_frame(), utvideo_encode_init(), v308_decode_frame(), v308_encode_init(), v408_decode_frame(), v408_encode_init(), v410_decode_frame(), v410_encode_init(), v4l2_read_header(), v4l2_set_parameters(), v4l_mm_read_picture(), validate_options(), vble_decode_init(), vc1t_read_packet(), vcr1_decode_frame(), vda_h264_decode_slice(), vfw_read_header(), vfw_read_packet(), vid_read_packet(), video_get_buffer(), vivo_read_header(), vmd_read_header(), vmd_read_packet(), vmdaudio_decode_frame(), vmdaudio_decode_init(), voc_read_header(), voc_write_header(), vorbis_encode_frame(), vorbis_error_to_averror(), vorbis_header(), vorbis_parse_id_hdr(), vorbis_parse_setup_hdr_codebooks(), vorbis_parse_setup_hdr_floors(), vorbis_parse_setup_hdr_mappings(), vorbis_parse_setup_hdr_modes(), vorbis_parse_setup_hdr_residues(), vp8_alloc_frame(), vp8_broken_sequence(), vp8_encode(), vp8_handle_packet(), vp8_init_frames(), vp8_ref_frame(), vplayer_read_header(), vpx_init(), vqa_decode_init(), vqf_read_header(), vqf_read_packet(), wavesynth_decode(), wavesynth_init(), wavesynth_parse_extradata(), wavpack_decode_frame(), wc3_read_header(), wc3_read_packet(), webvtt_read_header(), wma_decode_init(), write_frame(), write_header(), write_number(), write_packet(), write_streamheader(), writer_open(), writer_register(), ws_snd_decode_frame(), wsaud_read_header(), wsaud_read_packet(), wsvqa_read_header(), wsvqa_read_packet(), wv_read_header(), wv_read_packet(), wv_read_seek(), x11grab_read_header(), X264_init(), xa_read_header(), xan_decode_frame(), xan_decode_init(), XAVS_init(), xface_decode_init(), xface_encode_frame(), xface_encode_init(), xiph_handle_packet(), xiph_parse_fmtp_pair(), xml_init(), xmv_fetch_audio_packet(), xmv_fetch_new_packet(), xmv_fetch_video_packet(), xmv_process_packet_header(), xmv_read_header(), xwd_encode_frame(), xwma_read_header(), y216_decode_frame(), y41p_decode_frame(), y41p_encode_init(), yae_flush(), yae_load_data(), yae_load_frag(), yae_overlap_add(), yae_reset(), yae_set_tempo(), yop_read_header(), yuv4_decode_frame(), yuv4_encode_init(), yuv4_read_header(), yuv4_read_packet(), zerocodec_decode_init(), and zip_uncompress().

the buffer is automatically deallocated once all corresponding references have been destroyed The characteristics of the data ( resolution  ,
sample  rate,
etc.   
)
Note except for filters that can have queued request_frame does not push and as a the filter_frame method will be called and do the work Legacy the filter_frame method was it was made of draw_slice ( that could be called several times on distinct parts of the  frame)
these buffered frames must be flushed immediately if a new input produces new output ( Example:frame rate-doubling filter:filter_frame must(1) flush the second copy of the previous  frame,
if it is still  there,
(2) push the first copy of the incoming  frame,
(3) keep the second copy for  later. 
)
while ( frame_pushed)

Definition at line 247 of file filter_design.txt.

Variable Documentation

Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining again

Definition at line 23 of file filter_design.txt.

Referenced by decode_nal_units().

Note except for filters that can have queued request_frame does not push and as a the filter_frame method will be called and do the work Legacy API
Initial value:
==========
Until libavfilter 3.23

Definition at line 112 of file filter_design.txt.

this is essentially always true and is there for self documentation without modifying the data in between* AV_PERM_REUSE2

Definition at line 126 of file filter_design.txt.

this is essentially always true and is there for self documentation* AV_PERM_WRITE

Definition at line 126 of file filter_design.txt.

Referenced by av_buffersrc_add_frame_internal().

the buffer and buffer reference mechanism is intended to avoid

Definition at line 45 of file filter_design.txt.

it can be given away to ff_start_frame* A reference passed to cur_buf_copy and partial_buf are used by libavfilter internally and must not be accessed by filters Reference permissions The AVFilterBufferRef structure has a perms field that describes what the code that owns the reference is allowed to do to the buffer data Different references for the same buffer can have different permissions For video filters that implement the deprecated start_frame draw_slice end_frame the permissions only apply to the parts of the buffer that have already been covered by the draw_slice method The value is a binary OR of the following constants

Definition at line 112 of file filter_design.txt.

Filter design
Initial value:
=============
This document explains guidelines that should be observed (or ignored with
good reason) when writing filters for libavfilter.
In this document
for audio filters
if it could not because there are no more it should return AVERROR_EOF The typical implementation of request_frame for a filter with several inputs will look like that
or(d) export
or the Software in violation of any applicable export control laws in any jurisdiction Except as provided by mandatorily applicable UPF has no obligation to provide you with source code to the Software In the event Software contains any source unless expressly licensed for other it is provided solely for reference purposes pursuant to the terms of this License Source code may not be redistributed unless expressly provided for in this License INTELLECTUAL AND INDUSTRIAL PROPERTY RIGHTS Title to Software and all associated intellectual and industrial property rights is retained by UPF and or its licensors UPF warrants that the copyright in the Software is owned by it or licensed to it and that it has the power and authority to grant the Licence You shall keep intact all patent or trademark notices and all notices that refer to the Software and the Licence and to the disclaimer of warranties DISCLAIMER OF WARRANTY This Software is a work in progress It is not a finished work and may therefore contain defects or bugs inherent to this type of software development For this reason

Definition at line 2 of file filter_design.txt.

the buffer and buffer reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFilterBuffer structures They must not be accessed directly

Definition at line 45 of file filter_design.txt.

these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a filter
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an input
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its inputs
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel layout
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a link
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio links

Definition at line 12 of file filter_design.txt.

Referenced by extract_inout(), heap_bubble_down(), and heap_bubble_up().

Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported list
it will therefore not have the REUSE2 permission The ALIGN permission is about extracting part of the for copy less padding or cropping for example References received on input pads are guaranteed to have all the permissions stated in the min_perms field and none of the permissions stated in the rej_perms References obtained by ff_get_video_buffer and ff_get_audio_buffer are guaranteed to have at least all the permissions requested as argument References created by avfilter_ref_buffer have the same permissions as the original reference minus the ones explicitly masked

Definition at line 144 of file filter_design.txt.

Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format negotiation
Initial value:
==================
The query_formats method should set
static int query_formats(AVFilterContext *ctx)
Definition: af_aconvert.c:73

Definition at line 12 of file filter_design.txt.

these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If not

Definition at line 216 of file filter_design.txt.

different references for the same buffer can show different characteristics In particular

Definition at line 56 of file filter_design.txt.

the buffer and buffer reference mechanism is intended to as much as possible

Definition at line 45 of file filter_design.txt.

Note except for filters that can have queued request_frame does not push and as a reaction

Definition at line 258 of file filter_design.txt.

these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already ready

Definition at line 216 of file filter_design.txt.

if it could not for temporary reasons

Definition at line 236 of file filter_design.txt.

return

Definition at line 216 of file filter_design.txt.

Referenced by xan_wc3_copy_pixel_run().

Filter the word “frame” indicates either a video frame or a group of audio samples

Definition at line 2 of file filter_design.txt.

Referenced by aac_decode_frame_int(), aac_encode_frame(), adpcm_decode_frame(), adpcm_encode_frame(), adx_decode_frame(), adx_encode_frame(), alac_entropy_coder(), alac_linear_predictor(), amr_decode_fix_avctx(), amr_wb_encode_frame(), apply_window_and_mdct(), audio_encode_example(), avisynth_read_packet_audio(), cinaudio_decode_frame(), cng_encode_frame(), conv(), cook_decode_frame(), decode_frame(), decode_residuals(), encode_frame(), evrc_decode_frame(), Faac_encode_frame(), ff_get_audio_buffer(), ff_mpa_synth_filter(), ff_mpadsp_apply_window_mips_fixed(), ff_timefilter_eval(), filter_frame(), flac_decorrelate_indep_c(), flac_decorrelate_ls_c(), flac_decorrelate_ms_c(), flac_decorrelate_rs_c(), frame_list_remove_samples(), g722_encode_frame(), g726_reset(), get_packet_header(), gsm_decode_frame(), libgsm_decode_frame(), libgsm_encode_frame(), mace_decode_frame(), mov_build_index(), mov_read_custom_metadata(), MPA_encode_frame(), mxf_write_d10_audio_packet(), oggvorbis_decode_frame(), oggvorbis_encode_frame(), pcm_bluray_decode_frame(), pcm_decode_frame(), pcm_encode_frame(), postfilter(), predictor_calc_error(), r3d_read_reda(), ra144_decode_frame(), ra144_encode_frame(), read_packet(), rematrix_channels(), request_frame(), residue_encode(), sample_queue_push(), setup_array(), sipr_decode_frame(), smka_decode_frame(), synth_superframe(), synthfilt_build_sb_samples(), tak_decode_frame(), truespeech_decode_frame(), tta_decode_frame(), update_md5_sum(), vorbis_encode_frame(), wavpack_decode_block(), wma_decode_superframe(), write_element(), ws_snd_decode_frame(), wv_unpack_mono(), and wv_unpack_stereo().

this is essentially always true and is there for self documentation without modifying the data in between WRITE and PRESERVE permissions are about sharing the same buffer between several filters to avoid expensive copies without them doing conflicting changes on the data The REUSE and REUSE2 permissions are about special memory for direct rendering For example a buffer directly allocated in video memory must not modified once it is displayed on screen
the mask is usually to keep the same permissions Filters should remove permissions on reference they give to output whenever necessary It can be automatically done by setting the rej_perms field on the output pad Here are a few guidelines corresponding to common situations

Definition at line 198 of file filter_design.txt.

Note except for filters that can have queued request_frame does not push and as a the filter_frame method will be called and do the work Legacy the filter_frame method was split
Note except for filters that can have queued request_frame does not push and as a the filter_frame method will be called and do the work Legacy the filter_frame method was it was made of start_frame

Definition at line 263 of file filter_design.txt.

Referenced by get_qscale(), and seg_write_packet().

this is essentially always true and is there for self documentation without modifying the data in between WRITE and PRESERVE permissions are about sharing the same buffer between several filters to avoid expensive copies without them doing conflicting changes on the data The REUSE and REUSE2 permissions are about special memory for direct rendering For example a buffer directly allocated in video memory must not modified once it is displayed on or it will cause tearing

Definition at line 126 of file filter_design.txt.

Note that

Definition at line 237 of file filter_design.txt.

these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input Therefore

Definition at line 216 of file filter_design.txt.

these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return values