Libav
Macros | Functions
internal.h File Reference

common internal API header More...

#include <limits.h>
#include <stdint.h>
#include <stddef.h>
#include <assert.h>
#include "config.h"
#include "attributes.h"
#include "dict.h"
#include "macros.h"
#include "pixfmt.h"
#include "x86/emms.h"
#include "libm.h"

Go to the source code of this file.

Macros

#define NDEBUG
 
#define emms_c()
 
#define attribute_align_arg
 
#define av_export
 
#define FF_DISABLE_DEPRECATION_WARNINGS
 
#define FF_ENABLE_DEPRECATION_WARNINGS
 
#define E1(x)   x
 
#define AV_CHECK_OFFSET(s, m, o)
 
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...)
 
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...)
 
#define LOCAL_ALIGNED(a, t, v, ...)   E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_8(t, v, ...)   LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
 
#define LOCAL_ALIGNED_16(t, v, ...)   LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
 
#define LOCAL_ALIGNED_32(t, v, ...)   LOCAL_ALIGNED(32, t, v, __VA_ARGS__)
 
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)
 
#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)
 
#define NULL_IF_CONFIG_SMALL(x)   x
 Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. More...
 
#define ONLY_IF_THREADS_ENABLED(x)   NULL
 Define a function with only the non-default version specified. More...
 

Functions

void avpriv_report_missing_feature (void *avc, const char *msg,...) av_printf_format(2
 Log a generic warning message about a missing feature. More...
 
void void avpriv_request_sample (void *avc, const char *msg,...) av_printf_format(2
 Log a generic warning message about a missing feature. More...
 
void void int avpriv_open (const char *filename, int flags,...)
 A wrapper for open() setting O_CLOEXEC. More...
 
int avpriv_set_systematic_pal2 (uint32_t pal[256], enum AVPixelFormat pix_fmt)
 

Detailed Description

common internal API header

Definition in file internal.h.

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 30 of file internal.h.

◆ emms_c

#define emms_c ( )

◆ attribute_align_arg

#define attribute_align_arg

Definition at line 55 of file internal.h.

◆ av_export

#define av_export

Definition at line 62 of file internal.h.

◆ FF_DISABLE_DEPRECATION_WARNINGS

#define FF_DISABLE_DEPRECATION_WARNINGS

Definition at line 77 of file internal.h.

Referenced by a64multi_encode_frame(), a64multi_encode_init(), aac_encode_frame(), alac_encode_init(), av_frame_copy_props(), av_init_packet(), av_packet_copy_props(), av_packet_free_side_data(), av_packet_from_data(), av_packet_rescale_ts(), av_parser_init(), av_write_image_line(), avcodec_close(), avcodec_copy_context(), avcodec_find_best_pix_fmt2(), avcodec_open2(), avformat_find_stream_info(), avformat_new_stream(), avformat_write_header(), bmp_encode_frame(), compute_pkt_fields(), decode_dvd_subtitles(), decode_frame(), display_end_segment(), dnxhd_encode_init(), dnxhd_encode_picture(), dnxhd_load_picture(), do_video_stats(), dvbsub_display_end_segment(), dvvideo_encode_frame(), encode_dvd_subtitles(), encode_frame(), encode_init(), encode_init_ls(), encode_picture_ls(), encode_thread(), ff_blockdsp_init_x86(), ff_decode_frame_props(), ff_er_frame_end(), ff_init_me(), ff_match_2uint16(), ff_mpv_encode_init(), ff_mpv_encode_picture(), ff_mpv_frame_end(), ff_mpv_frame_start(), ff_qsv_encode(), ffmal_copy_frame(), ffv1_encode_frame(), ffv1_encode_init(), flac_encode_frame(), flac_encode_init(), flashsv_encode_frame(), frame_end(), free_stream(), gif_encode_init(), init_muxer(), init_video_param(), is_intra_more_likely(), libschroedinger_decode_frame(), libschroedinger_encode_frame(), libschroedinger_encode_init(), libx265_encode_frame(), ljpeg_encode_bgr(), ljpeg_encode_init(), ljpeg_encode_yuv(), matroska_parse_frame(), mkv_write_packet_internal(), mov_read_dac3(), mov_read_dec3(), mpeg_decode_mb(), mpeg_decode_slice(), mpeg_decode_user_data(), mpeg_field_start(), mpeg_get_pixelformat(), mpv_decode_mb_internal(), nvenc_get_output(), pam_encode_init(), pcx_encode_init(), png_enc_init(), pnm_encode_init(), print_report(), qsv_decode(), qtrle_encode_frame(), queue_attached_pictures(), raw_encode_init(), set_codec_from_probe_data(), slice_end(), storeframe(), sunrast_encode_init(), svc_decode_frame(), svc_encode_init(), svq1_encode_frame(), svq1_encode_plane(), targa_encode_frame(), targa_encode_init(), try_decode_frame(), update_context_from_thread(), utvideo_encode_frame(), utvideo_encode_init(), v410_encode_frame(), v4l2_read_packet(), vpx_init(), X264_frame(), X264_init(), XAVS_frame(), XAVS_init(), xbm_encode_init(), xsub_encode(), xvid_encode_frame(), xvid_encode_init(), and xwd_encode_frame().

◆ FF_ENABLE_DEPRECATION_WARNINGS

#define FF_ENABLE_DEPRECATION_WARNINGS

Definition at line 78 of file internal.h.

Referenced by a64multi_encode_frame(), a64multi_encode_init(), aac_encode_frame(), alac_encode_init(), av_bitstream_filter_filter(), av_dup_packet(), av_frame_copy_props(), av_free_packet(), av_init_packet(), av_log_ask_for_sample(), av_packet_copy_props(), av_packet_rescale_ts(), av_parser_init(), av_picture_copy(), av_picture_pad(), avcodec_close(), avcodec_copy_context(), avcodec_open2(), avformat_find_stream_info(), avformat_new_stream(), avformat_write_header(), bmp_encode_frame(), compute_pkt_fields(), decode_dvd_subtitles(), decode_frame(), display_end_segment(), dnxhd_encode_init(), dnxhd_encode_picture(), dnxhd_load_picture(), do_video_stats(), dvbsub_display_end_segment(), dvvideo_encode_frame(), encode_dvd_subtitles(), encode_frame(), encode_init(), encode_init_ls(), encode_picture_ls(), encode_thread(), ff_blockdsp_init_x86(), ff_decode_frame_props(), ff_er_frame_end(), ff_init_me(), ff_mpv_encode_init(), ff_mpv_encode_picture(), ff_mpv_frame_end(), ff_mpv_frame_start(), ff_qsv_encode(), ffmal_copy_frame(), ffv1_encode_frame(), ffv1_encode_init(), flac_encode_frame(), flac_encode_init(), flashsv_encode_frame(), frame_end(), free_stream(), gif_encode_init(), init_muxer(), init_video_param(), is_intra_more_likely(), libschroedinger_decode_frame(), libschroedinger_encode_frame(), libschroedinger_encode_init(), libx265_encode_frame(), ljpeg_encode_bgr(), ljpeg_encode_init(), ljpeg_encode_yuv(), matroska_parse_frame(), mkv_write_packet_internal(), mov_read_dac3(), mov_read_dec3(), mpeg_decode_mb(), mpeg_decode_slice(), mpeg_decode_user_data(), mpeg_field_start(), mpeg_get_pixelformat(), mpv_decode_mb_internal(), nvenc_get_output(), pam_encode_init(), pcx_encode_init(), png_enc_init(), pnm_encode_init(), print_report(), qsv_decode(), qtrle_encode_frame(), queue_attached_pictures(), raw_encode_init(), set_codec_from_probe_data(), slice_end(), storeframe(), sunrast_encode_init(), svc_decode_frame(), svc_encode_init(), svq1_encode_frame(), svq1_encode_plane(), targa_encode_frame(), targa_encode_init(), try_decode_frame(), update_context_from_thread(), utvideo_encode_frame(), utvideo_encode_init(), v410_encode_frame(), v4l2_read_packet(), vpx_init(), X264_frame(), X264_init(), XAVS_frame(), XAVS_init(), xbm_encode_init(), xsub_encode(), xvid_encode_frame(), xvid_encode_init(), and xwd_encode_frame().

◆ E1

#define E1 (   x)    x

Definition at line 83 of file internal.h.

◆ AV_CHECK_OFFSET

#define AV_CHECK_OFFSET (   s,
  m,
 
)
Value:
struct check_##o { \
int x_##o[offsetof(s, m) == o? 1: -1]; \
}

Definition at line 88 of file internal.h.

◆ LOCAL_ALIGNED_A

#define LOCAL_ALIGNED_A (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)
uint8_t
#define FFALIGN(x, a)
Definition: macros.h:48

Definition at line 92 of file internal.h.

◆ LOCAL_ALIGNED_D

#define LOCAL_ALIGNED_D (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v
#define DECLARE_ALIGNED(n, t, v)
Definition: mem.h:58

Definition at line 96 of file internal.h.

◆ LOCAL_ALIGNED

#define LOCAL_ALIGNED (   a,
  t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))

◆ LOCAL_ALIGNED_8

#define LOCAL_ALIGNED_8 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(8, t, v, __VA_ARGS__)

Definition at line 105 of file internal.h.

Referenced by apply_obmc(), dv_encode_video_segment(), and h264_filter_mb_fast_internal().

◆ LOCAL_ALIGNED_16

#define LOCAL_ALIGNED_16 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(16, t, v, __VA_ARGS__)

◆ LOCAL_ALIGNED_32

#define LOCAL_ALIGNED_32 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(32, t, v, __VA_ARGS__)

Definition at line 117 of file internal.h.

Referenced by check_mc().

◆ FF_ALLOC_OR_GOTO

#define FF_ALLOC_OR_GOTO (   ctx,
  p,
  size,
  label 
)
Value:
{\
p = av_malloc(size);\
if (!(p) && (size) != 0) {\
av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
goto label;\
}\
}
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:62
int size
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:124
AVFormatContext * ctx
Definition: movenc.c:48

Definition at line 120 of file internal.h.

Referenced by adpcm_encode_frame(), adpcm_encode_init(), allocate_buffers(), allocate_sample_buffers(), ape_decode_init(), ff_h264_slice_context_init(), ff_iir_filter_init_coeffs(), init_context_frame(), init_mdct_win(), initFilter(), and sws_init_context().

◆ FF_ALLOCZ_OR_GOTO

#define FF_ALLOCZ_OR_GOTO (   ctx,
  p,
  size,
  label 
)
Value:
{\
if (!(p) && (size) != 0) {\
av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
goto label;\
}\
}
int size
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:124
AVFormatContext * ctx
Definition: movenc.c:48
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:211

Definition at line 129 of file internal.h.

Referenced by alloc_buffers(), allocate_buffers(), allocate_sample_buffers(), dnxhd_encode_init(), dnxhd_init_qmat(), dnxhd_init_rc(), dnxhd_init_vlc(), ff_h264_alloc_tables(), ff_h264_slice_context_init(), ff_iir_filter_init_coeffs(), ff_mpeg_framesize_alloc(), ff_mpv_common_init(), ff_mpv_encode_init(), init_context_frame(), init_duplicate_context(), initFilter(), and sws_init_context().

◆ NULL_IF_CONFIG_SMALL

#define NULL_IF_CONFIG_SMALL (   x)    x

◆ ONLY_IF_THREADS_ENABLED

#define ONLY_IF_THREADS_ENABLED (   x)    NULL

Define a function with only the non-default version specified.

On systems with ELF shared libraries, all symbols exported from Libav libraries are tagged with the name and major version of the library to which they belong. If a function is moved from one library to another, a wrapper must be retained in the original location to preserve binary compatibility.

Functions defined with this macro will never be used to resolve symbols by the build-time linker.

Parameters
typereturn type of function
namename of function
argsargument list of function
verversion tag to assign function Return NULL if a threading library has not been enabled. Used to disable threading functions in AVCodec definitions when not needed.

Definition at line 188 of file internal.h.

Referenced by ff_vp8_decode_init(), and vp3_init_thread_copy().

Function Documentation

◆ avpriv_report_missing_feature()

void avpriv_report_missing_feature ( void avc,
const char *  msg,
  ... 
)

◆ avpriv_request_sample()

void void avpriv_request_sample ( void avc,
const char *  msg,
  ... 
)

Log a generic warning message about a missing feature.

Additionally request that a sample showcasing the feature be uploaded.

Parameters
[in]avca pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct
[in]msgstring containing the name of the missing feature

Referenced by aac_decode_er_frame(), alac_decode_init(), amrnb_decode_frame(), amrwb_decode_frame(), ape_decode_init(), cdxl_decode_frame(), cinepak_decode(), cook_decode_init(), coupling_strategy(), dca_subframe_footer(), decode_band_hdr(), decode_bytes(), decode_channel_transform(), decode_element(), decode_frame(), decode_frame_headers(), decode_ga_specific_config(), decode_ics(), decode_init(), decode_mvc2(), decode_nal_units(), decode_nop(), decode_packet(), decode_registered_user_data_closed_caption(), decode_scalefactors(), decode_subframe(), decode_wmv9(), decode_yuv_frame(), determine_bitrate(), dss_read_header(), dxva2_mpeg2_decode_slice(), encode_frame(), execute_code(), ff_adx_decode_header(), ff_dca_exss_parse_header(), ff_dca_xll_decode_header(), ff_eac3_parse_header(), ff_h264_decode_seq_parameter_set(), ff_mjpeg_decode_sos(), ff_opus_parse_extradata(), ff_parse_mpeg2_descriptor(), flashsv_decode_frame(), g2m_decode_frame(), get_cox(), get_packet_header(), get_siz(), get_sot(), h264_field_start(), hq_decode_frame(), imc_decode_init(), jpeg2000_decode_packet(), jpeg2000_decode_packets(), latm_decode_audio_specific_config(), load_buffer(), magy_decode_frame(), magy_decode_slice(), mimic_decode_frame(), mov_build_index(), mov_read_mdhd(), mpc7_decode_init(), mpc8_decode_init(), mtv_read_header(), mv_read_header(), mxf_parse_structural_metadata(), mxf_read_packet_old(), mxf_read_primer_pack(), oma_read_header(), paf_video_decode(), parse_fmtp(), parse_setup_header(), parse_video_var(), pix_decode_frame(), process_frame_obj(), ptx_decode_frame(), qdm2_decode_init(), qt_rtp_parse_packet(), read_block_data(), read_frame(), read_header(), read_kuki_chunk(), read_major_sync(), read_restart_header(), read_sbr_extension(), read_stream_mux_config(), read_table(), rso_read_header(), rv10_decode_init(), rv10_decode_picture_header(), save_bits(), set_channel_layout(), smc_decode_stream(), smjpeg_read_header(), spdif_get_offset_and_codec(), spdif_header_dts(), spdif_header_truehd(), spdif_read_packet(), sunrast_decode_frame(), synth_superframe(), tak_decode_frame(), tdsc_load_cursor(), tdsc_parse_dtsm(), tiff_unpack_fax(), tm2_read_header(), truemotion1_decode_header(), truespeech_decode_init(), vp7_decode_frame_header(), vp8_decode_frame_header(), vqa_decode_init(), wsaud_read_header(), xmv_read_header(), xwd_decode_frame(), and xwma_read_header().

◆ avpriv_open()

void void int avpriv_open ( const char *  filename,
int  flags,
  ... 
)

A wrapper for open() setting O_CLOEXEC.

Definition at line 66 of file file_open.c.

Referenced by av_file_map(), bktr_init(), device_open(), dv1394_read_header(), fbdev_read_header(), ff_oss_audio_open(), ff_tempfile(), file_check(), and read_random().

◆ avpriv_set_systematic_pal2()

int avpriv_set_systematic_pal2 ( uint32_t  pal[256],
enum AVPixelFormat  pix_fmt 
)

Definition at line 142 of file imgutils.c.

Referenced by av_image_alloc(), bmp_encode_frame(), raw_init_decoder(), and video_get_buffer().