FFmpeg
|
common internal api header. More...
#include <stdint.h>
#include "libavutil/buffer.h"
#include "libavutil/channel_layout.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
#include "config.h"
Go to the source code of this file.
Data Structures | |
struct | FramePool |
struct | DecodeSimpleContext |
struct | DecodeFilterContext |
struct | AVCodecInternal |
struct | AVCodecDefault |
Macros | |
#define | FF_CODEC_CAP_INIT_THREADSAFE (1 << 0) |
The codec does not modify any global variables in the init function, allowing to call the init function without locking any global mutexes. More... | |
#define | FF_CODEC_CAP_INIT_CLEANUP (1 << 1) |
The codec allows calling the close function for deallocation even if the init function returned a failure. More... | |
#define | FF_CODEC_CAP_SETS_PKT_DTS (1 << 2) |
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually. More... | |
#define | FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM (1 << 3) |
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame setting. More... | |
#define | FF_CODEC_CAP_EXPORTS_CROPPING (1 << 4) |
The decoder sets the cropping fields in the output frames manually. More... | |
#define | FF_CODEC_CAP_SLICE_THREAD_HAS_MF (1 << 5) |
Codec initializes slice-based threading with a main function. More... | |
#define | ff_tlog(ctx,...) do { } while(0) |
#define | FF_SANE_NB_CHANNELS 64U |
#define | FF_SIGNBIT(x) ((x) >> CHAR_BIT * sizeof(x) - 1) |
#define | STRIDE_ALIGN 8 |
#define | FF_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE) |
Maximum size in bytes of extradata. More... | |
Functions | |
int | ff_match_2uint16 (const uint16_t(*tab)[2], int size, int a, int b) |
Return the index into tab at which {a,b} match elements {[0],[1]} of tab. More... | |
unsigned int | avpriv_toupper4 (unsigned int x) |
int | ff_init_buffer_info (AVCodecContext *s, AVFrame *frame) |
does needed setup of pkt_pts/pos and such for (re)get_buffer(); More... | |
void | ff_color_frame (AVFrame *frame, const int color[4]) |
int | ff_lock_avcodec (AVCodecContext *log_ctx, const AVCodec *codec) |
int | ff_unlock_avcodec (const AVCodec *codec) |
int | avpriv_lock_avformat (void) |
int | avpriv_unlock_avformat (void) |
int | ff_alloc_packet2 (AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size) |
Check AVPacket size and/or allocate data. More... | |
attribute_deprecated int | ff_alloc_packet (AVPacket *avpkt, int size) |
static av_always_inline int64_t | ff_samples_to_time_base (AVCodecContext *avctx, int64_t samples) |
Rescale from sample rate to AVCodecContext.time_base. More... | |
static av_always_inline float | ff_exp2fi (int x) |
2^(x) for integer x More... | |
int | ff_get_buffer (AVCodecContext *avctx, AVFrame *frame, int flags) |
Get a buffer for a frame. More... | |
int | ff_reget_buffer (AVCodecContext *avctx, AVFrame *frame) |
Identical in function to av_frame_make_writable(), except it uses ff_get_buffer() to allocate the buffer when needed. More... | |
int | ff_thread_can_start_frame (AVCodecContext *avctx) |
int | avpriv_h264_has_num_reorder_frames (AVCodecContext *avctx) |
int | ff_codec_open2_recursive (AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) |
Call avcodec_open2 recursively by decrementing counter, unlocking mutex, calling the function and then restoring again. More... | |
int | avpriv_bprint_to_extradata (AVCodecContext *avctx, struct AVBPrint *buf) |
Finalize buf into extradata and set its size appropriately. More... | |
const uint8_t * | avpriv_find_start_code (const uint8_t *p, const uint8_t *end, uint32_t *state) |
int | avpriv_codec_get_cap_skip_frame_fill_param (const AVCodec *codec) |
int | ff_set_dimensions (AVCodecContext *s, int width, int height) |
Check that the provided frame dimensions are valid and set them on the codec context. More... | |
int | ff_set_sar (AVCodecContext *avctx, AVRational sar) |
Check that the provided sample aspect ratio is valid and set it on the codec context. More... | |
int | ff_side_data_update_matrix_encoding (AVFrame *frame, enum AVMatrixEncoding matrix_encoding) |
Add or update AV_FRAME_DATA_MATRIXENCODING side data. More... | |
int | ff_packet_split_and_drop_side_data (AVPacket *pkt) |
int | ff_get_format (AVCodecContext *avctx, const enum AVPixelFormat *fmt) |
Select the (possibly hardware accelerated) pixel format. More... | |
int | ff_decode_frame_props (AVCodecContext *avctx, AVFrame *frame) |
Set various frame properties from the codec context / packet data. More... | |
AVCPBProperties * | ff_add_cpb_side_data (AVCodecContext *avctx) |
Add a CPB properties side data to an encoding context. More... | |
int | ff_side_data_set_encoder_stats (AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type) |
int | ff_alloc_a53_sei (const AVFrame *frame, size_t prefix_len, void **data, size_t *sei_size) |
Check AVFrame for A53 side data and allocate and fill SEI message with A53 info. More... | |
int64_t | ff_guess_coded_bitrate (AVCodecContext *avctx) |
Get an estimated video bitrate based on frame size, frame rate and coded bits per pixel. More... | |
Variables | |
const uint8_t | ff_log2_run [41] |
volatile int | ff_avcodec_locked |
common internal api header.
Definition in file internal.h.
#define FF_CODEC_CAP_INIT_THREADSAFE (1 << 0) |
The codec does not modify any global variables in the init function, allowing to call the init function without locking any global mutexes.
Definition at line 40 of file internal.h.
Referenced by ff_lock_avcodec(), and ff_unlock_avcodec().
#define FF_CODEC_CAP_INIT_CLEANUP (1 << 1) |
The codec allows calling the close function for deallocation even if the init function returned a failure.
Without this capability flag, a codec does such cleanup internally when returning failures from the init function and does not expect the close function to be called at all.
Definition at line 48 of file internal.h.
#define FF_CODEC_CAP_SETS_PKT_DTS (1 << 2) |
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually.
If the flag is set, decode.c won't overwrite this field. If it's unset, decode.c tries to guess the pkt_dts field from the input AVPacket.
Definition at line 55 of file internal.h.
Referenced by decode_simple_internal().
#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM (1 << 3) |
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame setting.
Definition at line 60 of file internal.h.
Referenced by avpriv_codec_get_cap_skip_frame_fill_param().
#define FF_CODEC_CAP_EXPORTS_CROPPING (1 << 4) |
The decoder sets the cropping fields in the output frames manually.
If this cap is set, the generic code will initialize output frame dimensions to coded rather than display values.
Definition at line 66 of file internal.h.
Referenced by get_buffer_internal().
#define FF_CODEC_CAP_SLICE_THREAD_HAS_MF (1 << 5) |
Codec initializes slice-based threading with a main function.
Definition at line 70 of file internal.h.
Referenced by ff_slice_thread_init().
#define ff_tlog | ( | ctx, | |
... | |||
) | do { } while(0) |
Definition at line 75 of file internal.h.
Referenced by avi_sync(), decode_format80(), decode_residual(), decode_slice(), fetch_diagonal_mv(), ff_filter_frame(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_filter_mb(), ff_tlog_link(), ff_tlog_ref(), ff_wma_init(), filter_mb_dir(), h263p_decode_umotion(), h264_initialise_ref_list(), h264_probe(), ipvideo_decode_block_opcode_0x2(), ipvideo_decode_block_opcode_0x3(), ipvideo_decode_block_opcode_0x4(), ipvideo_decode_block_opcode_0x5(), ipvideo_decode_block_opcode_0x6_16(), ipvideo_decode_format_06_opcodes(), ipvideo_decode_format_11_opcodes(), mpeg2_decode_block_intra(), mpeg4_decode_block(), mpeg_decode_mb(), pred_16x8_motion(), pred_8x16_motion(), pred_intra_mode(), pred_motion(), pred_non_zero_count(), pred_pskip_motion(), rv10_decode_packet(), wma_decode_block(), wma_decode_frame(), and wma_decode_superframe().
#define FF_SANE_NB_CHANNELS 64U |
Definition at line 90 of file internal.h.
Referenced by avcodec_open2(), epaf_read_header(), ff_init_buffer_info(), genh_read_header(), ircam_read_header(), parse_strk(), pvf_read_header(), read_header(), and xvag_read_header().
#define FF_SIGNBIT | ( | x | ) | ((x) >> CHAR_BIT * sizeof(x) - 1) |
Definition at line 92 of file internal.h.
Referenced by dnxhd_10bit_dct_quantize(), inter_predict(), mv_pred_direct(), and scale_mv().
#define STRIDE_ALIGN 8 |
Definition at line 99 of file internal.h.
Referenced by avcodec_align_dimensions2(), load_input_picture(), and update_frame_pool().
#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE) |
Maximum size in bytes of extradata.
This value was chosen such that every bit of the buffer is addressable by a 32-bit signed integer as used by get_bits.
Definition at line 260 of file internal.h.
Referenced by avcodec_open2(), ffm2_read_header(), and ffm_read_header().
Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
If there is no such matching pair then size is returned.
Definition at line 1907 of file utils.c.
Referenced by ff_h263_encode_picture_header(), ff_mpv_encode_init(), and svq1_write_header().
Definition at line 2052 of file utils.c.
Referenced by ff_codec_get_id(), ff_mpv_decode_init(), mpeg_decode_frame(), and validate_codec_tag().
int ff_init_buffer_info | ( | AVCodecContext * | s, |
AVFrame * | frame | ||
) |
does needed setup of pkt_pts/pos and such for (re)get_buffer();
Definition at line 1483 of file decode.c.
Referenced by ff_decode_frame_props(), reget_buffer_internal(), and thread_get_buffer_internal().
Definition at line 512 of file utils.c.
Referenced by h264_frame_start().
int ff_lock_avcodec | ( | AVCodecContext * | log_ctx, |
const AVCodec * | codec | ||
) |
Definition at line 1992 of file utils.c.
Referenced by avcodec_open2(), and ff_codec_open2_recursive().
Definition at line 2018 of file utils.c.
Referenced by avcodec_open2(), ff_codec_open2_recursive(), and ff_lock_avcodec().
Definition at line 2034 of file utils.c.
Referenced by avisynth_read_close(), avisynth_read_header(), cleanup(), ff_gnutls_deinit(), ff_gnutls_init(), ff_openssl_deinit(), ff_openssl_init(), and write_header().
Definition at line 2043 of file utils.c.
Referenced by avisynth_read_close(), avisynth_read_header(), cleanup(), ff_gnutls_deinit(), ff_gnutls_init(), ff_openssl_deinit(), ff_openssl_init(), and write_header().
int ff_alloc_packet2 | ( | AVCodecContext * | avctx, |
AVPacket * | avpkt, | ||
int64_t | size, | ||
int64_t | min_size | ||
) |
Check AVPacket size and/or allocate data.
Encoders supporting AVCodec.encode2() can use this as a convenience to ensure the output packet data is large enough, whether provided by the user or allocated in this function.
avctx | the AVCodecContext of the encoder |
avpkt | the AVPacket If avpkt->data is already set, avpkt->size is checked to ensure it is large enough. If avpkt->data is NULL, a new buffer is allocated. avpkt->size is set to the specified size. All other AVPacket fields will be reset with av_init_packet(). |
size | the minimum required packet size |
min_size | This is a hint to the allocation algorithm, which indicates to what minimal size the caller might later shrink the packet to. Encoders often allocate packets which are larger than the amount of data that is written into them as the exact amount is not known at the time of allocation. min_size represents the size a packet might be shrunk to by the caller. Can be set to 0. setting this roughly correctly allows the allocation code to choose between several allocation strategies to improve speed slightly. |
Definition at line 32 of file encode.c.
Referenced by a64multi_encode_frame(), aac_encode_frame(), adpcm_encode_frame(), adx_encode_frame(), alac_encode_frame(), amr_wb_encode_frame(), avui_encode_frame(), bmp_encode_frame(), cinepak_encode_frame(), cng_encode_frame(), dnxhd_encode_picture(), dvvideo_encode_frame(), encode_apng(), encode_frame(), encode_nals(), encode_picture_ls(), encode_png(), encode_superframe(), ff_alloc_packet(), ff_mpv_encode_picture(), ffat_encode(), fits_encode_frame(), flac_encode_frame(), flashsv2_encode_frame(), flashsv_encode_frame(), g722_encode_frame(), g723_1_encode_frame(), gif_encode_frame(), hap_encode(), ilbc_encode_frame(), libgsm_encode_frame(), libopenjpeg_encode_frame(), libopus_encode(), libshine_encode_frame(), libvorbis_encode_frame(), libwebp_anim_encode_frame(), libwebp_encode_frame(), ljpeg_encode_frame(), mlp_encode_frame(), mp3lame_encode_frame(), MPA_encode_frame(), omx_encode_frame(), opus_encode_frame(), pam_encode_frame(), pcm_encode_frame(), pcx_encode_frame(), pnm_encode_frame(), process_output_surface(), prores_encode_frame(), qtrle_encode_frame(), ra144_encode_frame(), raw_encode(), roq_dpcm_encode_frame(), roq_encode_frame(), s302m_encode2_frame(), storeframe(), sunrast_encode_frame(), svc_encode_frame(), svq1_encode_frame(), targa_encode_frame(), tta_encode_frame(), twolame_encode_frame(), utvideo_encode_frame(), v308_encode_frame(), v408_encode_frame(), v410_encode_frame(), vorbis_encode_frame(), vtenc_cm_to_avpacket(), wavpack_encode_frame(), XAVS_frame(), xbm_encode_frame(), xface_encode_frame(), xvid_encode_frame(), xwd_encode_frame(), y41p_encode_frame(), and yuv4_encode_frame().
attribute_deprecated int ff_alloc_packet | ( | AVPacket * | avpkt, |
int | size | ||
) |
Definition at line 73 of file encode.c.
Referenced by libkvazaar_encode(), and libx265_encode_frame().
|
static |
Rescale from sample rate to AVCodecContext.time_base.
Definition at line 295 of file internal.h.
Referenced by amr_wb_encode_frame(), avcodec_encode_audio2(), encode_frame(), encode_superframe(), ff_af_queue_remove(), flac_encode_frame(), g722_encode_frame(), libvorbis_encode_frame(), MPA_encode_frame(), tta_encode_frame(), twolame_encode_frame(), and wavpack_encode_frame().
|
static |
2^(x) for integer x
Definition at line 308 of file internal.h.
Referenced by init_band_stepsize(), and sbr_dequant().
int ff_get_buffer | ( | AVCodecContext * | avctx, |
AVFrame * | frame, | ||
int | flags | ||
) |
Get a buffer for a frame.
This is a wrapper around AVCodecContext.get_buffer() and should be used instead calling get_buffer() directly.
Definition at line 1669 of file decode.c.
Referenced by ac3_decode_frame(), adpcm_decode_frame(), adx_decode_frame(), alloc_frame(), amrnb_decode_frame(), amrwb_decode_frame(), ape_decode_frame(), atrac1_decode_frame(), atrac3_decode_frame(), atrac3al_decode_frame(), atrac3p_decode_frame(), aura_decode_frame(), avui_decode_frame(), bfi_decode_frame(), binkaudio_receive_frame(), bitpacked_decode_yuv422p10(), bmp_decode_frame(), bmv_aud_decode_frame(), cdg_decode_frame(), cdxl_decode_frame(), cinaudio_decode_frame(), cmv_decode_frame(), cng_decode_frame(), cook_decode_frame(), copy_frame(), copy_output(), cuvid_output_frame(), cyuv_decode_frame(), dds_decode(), decode_frame(), decode_pic(), decode_tag(), dfa_decode_frame(), dpcm_decode_frame(), dss_sp_decode_frame(), dvvideo_decode_frame(), dxtory_decode_v1_410(), dxtory_decode_v1_420(), dxtory_decode_v1_444(), dxtory_decode_v1_rgb(), dxtory_decode_v2(), eightsvx_decode_frame(), escape124_decode_frame(), escape130_decode_frame(), evrc_decode_frame(), execute_code(), fdk_aac_decode_frame(), ff_dca_lbr_filter_frame(), ff_dca_xll_filter_frame(), ff_ivi_decode_frame(), ff_mjpeg_decode_sof(), ff_snow_common_init_after_header(), ff_snow_get_buffer(), ff_thread_get_buffer(), ff_twinvq_decode_frame(), ff_vp56_decode_frame(), ffat_decode(), ffmal_copy_frame(), filter_frame(), filter_frame_fixed(), filter_frame_float(), fits_decode_frame(), frame_configure_elements(), g2m_decode_frame(), g722_decode_frame(), g723_1_decode_frame(), gdv_decode_frame(), get_buffer(), get_buffer_with_edge(), gif_decode_frame(), gsm_decode_frame(), hnm_decode_frame(), hq_decode_frame(), hqa_decode_frame(), idcin_decode_frame(), ilbc_decode_frame(), imc_decode_frame(), ipvideo_decode_frame(), ipvideo_decode_init(), libcelt_dec_decode(), libgsm_decode_frame(), libopus_decode(), librsvg_decode_frame(), libspeex_decode_frame(), m101_decode_frame(), mace_decode_frame(), mediacodec_wrap_sw_buffer(), mp_decode_frame(), mpc7_decode_frame(), mpc8_decode_frame(), mss2_decode_frame(), mvc_decode_frame(), mxpeg_decode_frame(), oggvorbis_decode_frame(), on2avc_decode_frame(), opus_decode_packet(), output_data(), paf_audio_decode(), pcm_bluray_decode_frame(), pcm_decode_frame(), pcm_dvd_decode_frame(), pcx_decode_frame(), pix_decode_frame(), pnm_decode_frame(), ptx_decode_frame(), qcelp_decode_frame(), qdm2_decode_frame(), qdmc_decode_frame(), ra144_decode_frame(), ra288_decode_frame(), reget_buffer_internal(), rl2_decode_frame(), roq_encode_frame(), s302m_decode_frame(), sgirle_decode_frame(), shorten_decode_frame(), sipr_decode_frame(), smka_decode_frame(), speedhq_decode_frame(), submit_frame(), submit_packet(), sunrast_decode_frame(), svc_decode_frame(), svq1_decode_frame(), svq1_encode_frame(), synth_superframe(), tdsc_decode_frame(), tgq_decode_frame(), tgv_decode_frame(), thread_get_buffer_internal(), tmv_decode_frame(), tqi_decode_frame(), truemotion2rt_decode_frame(), truespeech_decode_frame(), txd_decode_frame(), v308_decode_frame(), v408_decode_frame(), v410_decode_frame(), vcr1_decode_frame(), vmdaudio_decode_frame(), vmdvideo_decode_frame(), vorbis_decode_frame(), vpx_decode(), vqa_decode_frame(), wavesynth_decode(), wma_decode_superframe(), wmapro_decode_packet(), ws_snd_decode_frame(), xan_decode_frame(), xbm_decode_frame(), xface_decode_frame(), xma_decode_init(), xma_decode_packet(), xpm_decode_frame(), xwd_decode_frame(), y216_decode_frame(), y41p_decode_frame(), yuv4_decode_frame(), zero12v_decode_frame(), and zerocodec_decode_frame().
int ff_reget_buffer | ( | AVCodecContext * | avctx, |
AVFrame * | frame | ||
) |
Identical in function to av_frame_make_writable(), except it uses ff_get_buffer() to allocate the buffer when needed.
Definition at line 1718 of file decode.c.
Referenced by aasc_decode_frame(), avs_decode_frame(), bethsoftvid_decode_frame(), cdg_decode_frame(), cinepak_decode_frame(), cinvideo_decode_frame(), clv_decode_frame(), cpia_decode_frame(), decode_frame(), fic_decode_frame(), flashsv_decode_frame(), flic_decode_frame_15_16BPP(), flic_decode_frame_24BPP(), flic_decode_frame_8BPP(), gif_decode_frame(), ir2_decode_frame(), mm_decode_frame(), mp_decode_frame(), msrle_decode_frame(), mss1_decode_frame(), mss2_decode_frame(), mss3_decode_frame(), mss4_decode_frame(), msvideo1_decode_frame(), paf_video_decode(), qtrle_decode_frame(), roq_decode_frame(), rpza_decode_frame(), rscc_decode_frame(), screenpresso_decode_frame(), seqvideo_decode_frame(), smc_decode_frame(), truemotion1_decode_frame(), tscc2_decode_frame(), ulti_decode_frame(), xan_decode_frame(), and yop_decode_frame().
int ff_thread_can_start_frame | ( | AVCodecContext * | avctx | ) |
Definition at line 881 of file pthread_frame.c.
Referenced by ff_mpv_frame_start(), and h264_frame_start().
int avpriv_h264_has_num_reorder_frames | ( | AVCodecContext * | avctx | ) |
Definition at line 60 of file h264dec.c.
Referenced by has_decode_delay_been_guessed().
int ff_codec_open2_recursive | ( | AVCodecContext * | avctx, |
const AVCodec * | codec, | ||
AVDictionary ** | options | ||
) |
Call avcodec_open2 recursively by decrementing counter, unlocking mutex, calling the function and then restoring again.
Assumes the mutex is already locked
Definition at line 615 of file utils.c.
Referenced by init(), smvjpeg_decode_init(), and tdsc_init().
int avpriv_bprint_to_extradata | ( | AVCodecContext * | avctx, |
struct AVBPrint * | buf | ||
) |
Finalize buf into extradata and set its size appropriately.
Definition at line 2142 of file utils.c.
Referenced by dvdsub_init().
Referenced by avi_read_packet(), cavs_decode_frame(), cavsvideo_probe(), decode_chunks(), extract_extradata_mpeg4(), extract_extradata_vc1(), ff_mpeg1_find_frame_end(), ff_mpeg4video_split(), ff_rtp_send_mpegvideo(), find_next_marker(), find_start_code(), h264_split(), hevc_split(), mpeg_decode_slice(), mpegts_write_packet_internal(), mpegvideo_extract_headers(), mpegvideo_probe(), mxf_parse_h264_frame(), slice_decode_thread(), and vc1_split().
Definition at line 588 of file utils.c.
Referenced by try_decode_frame(), and try_decode_video_frame().
int ff_set_dimensions | ( | AVCodecContext * | s, |
int | width, | ||
int | height | ||
) |
Check that the provided frame dimensions are valid and set them on the codec context.
Definition at line 211 of file utils.c.
Referenced by alloc_buffers(), apply_param_change(), avcodec_open2(), avcodec_set_dimensions(), avs_decode_init(), bmp_decode_frame(), cdxl_decode_frame(), cfhd_decode(), cmv_process_header(), decode_frame(), decode_frame_headers(), decode_header(), decode_idat_chunk(), decode_init(), decode_seq_header(), dirac_decode_data_unit(), dnxhd_decode_frame(), dvdsub_parse_extradata(), dvvideo_decode_frame(), execute_code(), ff_h263_decode_frame(), ff_ivi_decode_frame(), ff_mjpeg_decode_sof(), ff_pnm_decode_header(), ff_rv34_decode_frame(), ff_vc1_decode_entry_point(), ff_vc1_decode_sequence_header(), ff_vp56_decode_frame(), ffmal_update_format(), fits_decode_frame(), flashsv_decode_frame(), g2m_decode_frame(), get_siz(), gif_decode_frame(), h261_decode_frame(), init_image(), libopenjpeg_decode_frame(), librsvg_decode_frame(), magy_decode_frame(), mediacodec_dec_parse_format(), mimic_decode_frame(), mpeg4_decode_header(), mpegvideo_extract_headers(), mvc_decode_init(), parse_presentation_segment(), pcx_decode_frame(), pix_decode_frame(), pixlet_decode_frame(), process_frame_obj(), ptx_decode_frame(), rv20_decode_picture_header(), seqvideo_decode_init(), smvjpeg_decode_frame(), sunrast_decode_frame(), svc_decode_frame(), svq1_decode_frame(), tdsc_parse_tdsf(), tgq_decode_frame(), tgv_decode_frame(), tqi_decode_frame(), truemotion1_decode_header(), truemotion2rt_decode_header(), txd_decode_frame(), update_dimensions(), update_size(), v4l2_handle_event(), vp56_size_changed(), vp5_parse_header(), vp6_parse_header(), vp8_lossless_decode_frame(), vpx_decode(), xbm_decode_frame(), and xpm_decode_frame().
int ff_set_sar | ( | AVCodecContext * | avctx, |
AVRational | sar | ||
) |
Check that the provided sample aspect ratio is valid and set it on the codec context.
Definition at line 226 of file utils.c.
Referenced by decode_frame(), decode_header(), decode_sequence_header_adv(), dirac_decode_data_unit(), dvvideo_decode_frame(), export_stream_params(), ff_h263_decode_frame(), h264_slice_header_init(), and truemotion1_decode_header().
int ff_side_data_update_matrix_encoding | ( | AVFrame * | frame, |
enum AVMatrixEncoding | matrix_encoding | ||
) |
Add or update AV_FRAME_DATA_MATRIXENCODING side data.
Definition at line 241 of file utils.c.
Referenced by ac3_decode_frame(), ff_dca_core_filter_frame(), ff_dca_lbr_filter_frame(), ff_dca_xll_filter_frame(), and output_data().
Definition at line 483 of file avpacket.c.
Referenced by avcodec_decode_subtitle2(), and decode_simple_internal().
int ff_get_format | ( | AVCodecContext * | avctx, |
const enum AVPixelFormat * | fmt | ||
) |
Select the (possibly hardware accelerated) pixel format.
This is a wrapper around AVCodecContext.get_format() and should be used instead of calling get_format() directly.
Definition at line 1184 of file decode.c.
Referenced by cuvid_decode_init(), decode_init(), ff_mediacodec_dec_init(), ff_qsv_process_data(), ff_thread_get_format(), ffmmal_init_decoder(), h263_get_format(), submit_packet(), and vc1_decode_init().
int ff_decode_frame_props | ( | AVCodecContext * | avctx, |
AVFrame * | frame | ||
) |
Set various frame properties from the codec context / packet data.
Definition at line 1591 of file decode.c.
Referenced by cuvid_output_frame(), ffmal_copy_frame(), get_buffer_internal(), raw_decode(), reget_buffer_internal(), and wrapped_avframe_decode().
AVCPBProperties* ff_add_cpb_side_data | ( | AVCodecContext * | avctx | ) |
Add a CPB properties side data to an encoding context.
Definition at line 2212 of file utils.c.
Referenced by ff_mpv_encode_init(), nvenc_setup_encoder(), qsv_retrieve_enc_params(), svc_encode_init(), vpx_init(), and X264_init().
int ff_side_data_set_encoder_stats | ( | AVPacket * | pkt, |
int | quality, | ||
int64_t * | error, | ||
int | error_count, | ||
int | pict_type | ||
) |
Definition at line 697 of file avpacket.c.
Referenced by dnxhd_encode_picture(), encode_frame(), ff_mpv_encode_picture(), process_output_surface(), storeframe(), svq1_encode_frame(), X264_frame(), XAVS_frame(), and xvid_encode_frame().
Check AVFrame for A53 side data and allocate and fill SEI message with A53 info.
frame | Raw frame to get A53 side data from |
prefix_len | Number of bytes to allocate before SEI message |
data | Pointer to a variable to store allocated memory Upon return the variable will hold NULL on error or if frame has no A53 info. Otherwise it will point to prefix_len uninitialized bytes followed by *sei_size SEI message |
sei_size | Pointer to a variable to store generated SEI message length |
'GA94' is standard in North America for ATSC, but hard coding this style may not be the right thing to do – other formats do exist. This information is not available in the side_data so we are going with this right now.
Definition at line 2411 of file utils.c.
Referenced by qsv_h264_set_encode_ctrl(), vtenc_send_frame(), and X264_frame().
int64_t ff_guess_coded_bitrate | ( | AVCodecContext * | avctx | ) |
Get an estimated video bitrate based on frame size, frame rate and coded bits per pixel.
Definition at line 2454 of file utils.c.
Referenced by encode_init(), raw_encode_init(), v308_encode_init(), v408_encode_init(), v410_encode_init(), and y41p_encode_init().
const uint8_t ff_log2_run[41] |
Definition at line 39 of file bitstream.c.
Referenced by decode_line_TMPL(), encode_line_TMPL(), ls_decode_line(), ls_encode_line(), and ls_encode_run().
volatile int ff_avcodec_locked |
Definition at line 116 of file utils.c.
Referenced by ff_lock_avcodec(), and ff_unlock_avcodec().