internal.h File Reference

#include <stdint.h>
#include <stddef.h>
#include <assert.h>
#include "config.h"
#include "intreadwrite.h"
#include "bswap.h"

Go to the source code of this file.

Defines

#define NDEBUG
#define attribute_align_arg
#define attribute_used
#define M_PI   3.14159265358979323846
#define INT16_MIN   (-0x7fff-1)
#define INT16_MAX   0x7fff
#define INT32_MIN   (-0x7fffffff-1)
#define INT32_MAX   0x7fffffff
#define UINT32_MAX   0xffffffff
#define INT64_MIN   (-0x7fffffffffffffffLL-1)
#define INT64_MAX   INT64_C(9223372036854775807)
#define UINT64_MAX   UINT64_C(0xFFFFFFFFFFFFFFFF)
#define INT_BIT   64
#define offsetof(T, F)   ((unsigned int)((char *)&((T *)0)->F))
#define LOCAL_MANGLE(a)   #a
#define MANGLE(a)   EXTERN_PREFIX LOCAL_MANGLE(a)
#define dprintf(pctx,...)
#define av_abort()   do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
#define FASTDIV(a, b)   ((a)/(b))
#define MASK_ABS(mask, level)
#define COPY3_IF_LT(x, y, a, b, c, d)
#define malloc   please_use_av_malloc
#define free   please_use_av_free
#define realloc   please_use_av_realloc
#define time   time_is_forbidden_due_to_security_issues
#define rand   rand_is_forbidden_due_to_state_trashing_use_av_random
#define srand   srand_is_forbidden_due_to_state_trashing_use_av_init_random
#define random   random_is_forbidden_due_to_state_trashing_use_av_random
#define sprintf   sprintf_is_forbidden_due_to_security_issues_use_snprintf
#define strcat   strcat_is_forbidden_due_to_security_issues_use_av_strlcat
#define exit   exit_is_forbidden
#define printf   please_use_av_log
#define fprintf   please_use_av_log
#define puts   please_use_av_log
#define perror   please_use_av_log_instead_of_perror
#define CHECKED_ALLOCZ(p, size)

Functions

static int av_log2_16bit (unsigned int v)
static av_const unsigned int ff_sqrt (unsigned int a)
static av_always_inline av_const
long long 
llrint (double x)
static av_always_inline av_const
long int 
lrint (double x)
static av_always_inline av_const
long int 
lrintf (float x)
static av_always_inline av_const
double 
round (double x)
static av_always_inline av_const
float 
roundf (float x)

Variables

const uint32_t ff_inverse [256]
const uint8_t ff_sqrt_tab [256]


Detailed Description

common internal api header.

Definition in file internal.h.


Define Documentation

#define attribute_align_arg

Definition at line 41 of file internal.h.

#define attribute_used

Definition at line 49 of file internal.h.

 
#define av_abort (  )     do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)

Definition at line 140 of file internal.h.

Referenced by ff_rtp_send_aac(), flush_packet(), h_resample_fast(), and rtp_send_samples().

#define CHECKED_ALLOCZ ( p,
size   ) 

Value:

{\
    p= av_mallocz(size);\
    if(p==NULL && (size)!=0){\
        av_log(NULL, AV_LOG_ERROR, "Cannot allocate memory.");\
        goto fail;\
    }\
}

Definition at line 270 of file internal.h.

Referenced by alloc_picture(), alloc_tables(), context_init(), dnxhd_encode_init(), dnxhd_init_qmat(), dnxhd_init_rc(), dnxhd_init_vlc(), init_duplicate_context(), and MPV_common_init().

#define COPY3_IF_LT ( x,
y,
a,
b,
c,
 ) 

Value:

if((y)<(x)){\
     (x)=(y);\
     (a)=(b);\
     (c)=(d);\
}

Definition at line 230 of file internal.h.

#define dprintf ( pctx,
...   ) 

Definition at line 137 of file internal.h.

Referenced by asf_get_packet(), asf_read_header(), decode_init(), dnxhd_decode_frame(), dnxhd_decode_header(), ff_mpegaudio_decode_header(), ff_rtp_send_data(), ff_wma_init(), ffm_read_packet(), gif_parse_next_image(), gif_read_extension(), gif_read_header1(), gif_read_image(), h263_decode_picture_header(), huffman_decode(), mace_decode_frame(), mov_build_index(), mov_read_ctts(), mov_read_default(), mov_read_dref(), mov_read_elst(), mov_read_esds(), mov_read_hdlr(), mov_read_header(), mov_read_moof(), mov_read_mvhd(), mov_read_packet(), mov_read_smi(), mov_read_stsc(), mov_read_stsd(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_trun(), mov_seek_stream(), mp4_read_descr(), mp_decode_frame(), mp_decode_layer2(), mp_decode_layer3(), mpeg1_decode_block_intra(), mpeg1_decode_sequence(), mpeg1_encode_block(), mpeg2_decode_block_intra(), mpeg_decode_frame(), mpeg_decode_mb(), mpeg_decode_picture_coding_extension(), mpeg_decode_quant_matrix_extension(), mpeg_decode_sequence_extension(), mpegaudio_parse(), mxf_parse_structural_metadata(), mxf_read_local_tags(), mxf_read_pixel_layout(), read_access_unit(), read_decoding_params(), read_restart_header(), rtcp_send_sr(), rtp_check_and_send_back_rr(), and rtp_write_packet().

#define exit   exit_is_forbidden

Definition at line 258 of file internal.h.

Referenced by add_audio_stream(), add_video_stream(), audio_decode_example(), audio_encode_example(), do_exit(), help(), init_demo(), main(), open_audio(), open_video(), opt_format(), opt_frame_size(), opt_sync(), parse_number_or_die(), parse_options(), parse_time_or_die(), queue_picture(), start_children(), start_multicast(), video_decode_example(), video_encode_example(), write_audio_frame(), and write_video_frame().

#define FASTDIV ( a,
 )     ((a)/(b))

Definition at line 178 of file internal.h.

Referenced by ff_mpeg4_pred_dc(), ff_sqrt(), find_optimal_param(), get_dc(), mpeg4_decode_block(), msmpeg4_pred_dc(), and vorbis_residue_decode().

#define fprintf   please_use_av_log

Definition at line 263 of file internal.h.

Referenced by __attribute__(), add_audio_stream(), add_video_stream(), audio_decode_example(), audio_encode_example(), av_log_default_callback(), Configure(), decode_thread(), do_audio_out(), do_subtitle_out(), do_video_out(), do_video_stats(), doTest(), dump_stream_info(), event_loop(), EXTRACTOR_printKeywords(), EXTRACTOR_removeLibrary(), ff_h263_decode_frame(), flac_error(), getSymbolWithPrefix(), handle_child_exit(), http_vlog(), libextractor_zip_extract(), list_pix_fmts(), loadLibrary(), main(), new_audio_stream(), new_subtitle_stream(), new_video_stream(), open_audio(), open_video(), opt_bitrate(), opt_bsf(), opt_format(), opt_frame_aspect_ratio(), opt_frame_crop_bottom(), opt_frame_crop_left(), opt_frame_crop_right(), opt_frame_crop_top(), opt_frame_pad_bottom(), opt_frame_pad_left(), opt_frame_pad_right(), opt_frame_pad_top(), opt_frame_rate(), opt_frame_size(), opt_input_file(), opt_new_audio_stream(), opt_new_subtitle_stream(), opt_new_video_stream(), opt_output_file(), opt_pass(), opt_preset(), opt_qscale(), opt_sync(), opt_target(), opt_thread_count(), output_packet(), parse_ffconfig(), parse_matrix_coeffs(), parse_number_or_die(), parse_options(), parse_time_or_die(), pgm_save(), pgmyuv_save(), print_error(), printSelectedKeywords(), printSelectedKeywordsBibtex(), printSelectedKeywordsGrepFriendly(), Process(), queue_picture(), show_banner(), stream_component_open(), usage(), video_decode_example(), video_encode_example(), video_open(), write_audio_frame(), write_frame(), and write_video_frame().

#define free   please_use_av_free

Definition at line 242 of file internal.h.

#define INT16_MAX   0x7fff

Definition at line 70 of file internal.h.

#define INT16_MIN   (-0x7fff-1)

Definition at line 66 of file internal.h.

#define INT32_MAX   0x7fffffff

Definition at line 78 of file internal.h.

Referenced by mov_write_mdhd_tag(), mov_write_tkhd_tag(), and output_residual().

#define INT32_MIN   (-0x7fffffff-1)

Definition at line 74 of file internal.h.

#define INT64_MAX   INT64_C(9223372036854775807)

Definition at line 90 of file internal.h.

Referenced by av_gen_search(), av_update_stream_timings(), avi_read_packet(), estimate_best_b_count(), ff_fetch_timestamp(), find_frame_rate_index(), guess_ni_flag(), matroska_ebmlnum_sint(), mov_read_default(), mov_read_header(), mov_read_packet(), parse_options(), read_fps(), rl2_read_packet(), and write_packet().

#define INT64_MIN   (-0x7fffffffffffffffLL-1)

Definition at line 86 of file internal.h.

Referenced by av_rescale_rnd(), av_update_stream_timings(), open_input_stream(), parse_date(), parse_options(), and parse_time_or_die().

#define INT_BIT   64

Definition at line 99 of file internal.h.

Referenced by h263_decode_motion(), mpeg1_encode_motion(), and mpeg_decode_motion().

#define LOCAL_MANGLE (  )     #a

Definition at line 126 of file internal.h.

#define M_PI   3.14159265358979323846

Definition at line 62 of file internal.h.

#define malloc   please_use_av_malloc

Definition at line 240 of file internal.h.

Referenced by __attribute__(), _getopt_initialize(), addKeyword(), addkword(), appendKeyword(), audio_decode_example(), audio_encode_example(), av_malloc(), cmovHandler(), doTest(), Emalloc(), exchange(), EXTRACTOR_addLibrary2(), EXTRACTOR_addLibraryLast2(), EXTRACTOR_binaryDecode(), EXTRACTOR_binaryEncode(), EXTRACTOR_common_cat_unpack(), EXTRACTOR_common_convert_to_utf8(), EXTRACTOR_getKeywords(), EXTRACTOR_loadDefaultLibraries(), findInTags(), formatHelp(), get_path_from_ENV_PREFIX(), get_path_from_PATH(), getKeywords(), getSymbolWithPrefix(), handleASEnd(), history_extract(), iconvHelper(), libextractor_applefile_extract(), libextractor_asf_extract(), libextractor_dvi_extract(), libextractor_filename_extract(), libextractor_gif_extract(), libextractor_html_extract(), libextractor_id3v24_extract(), libextractor_jpeg_extract(), libextractor_lower_extract(), libextractor_mp3_extract(), libextractor_ogg_extract(), libextractor_oo_extract(), libextractor_oo_getmimetype(), libextractor_riff_extract(), libextractor_rpm_extract(), libextractor_thumbnailffmpeg_extract(), libextractor_thumbnailgtk_extract(), libextractor_translit_extract(), libextractor_wav_extract(), libextractor_zip_extract(), main(), mp3parse(), nsfestring(), os_get_installation_path(), parseComment(), parseZZZ(), pgmyuv_save(), printSelectedKeywordsBibtex(), process_COM(), processContentDescription(), processControlTGZ(), processDataAtom(), processIHDR(), processiTXt(), processMediaProperties(), processSentences(), processSO(), processTextTag(), processzTXt(), readASString(), readline(), rmd160_copy(), rmd160_sum_bytes(), rmd160_sum_words(), stndup(), str_splice(), stringDecode(), testKeyword(), video_encode_example(), and xstrndup().

#define MANGLE (  )     EXTERN_PREFIX LOCAL_MANGLE(a)

Definition at line 129 of file internal.h.

Referenced by apply_welch_window_sse2(), bgr24ToUV(), bgr24ToY(), dering(), doVertDefFilter(), ff_flac_compute_autocorr_sse2(), ff_idct_xvid_sse2(), get_cabac_inline(), H264_CHROMA_MC4_TMPL(), hScale(), rgb24tobgr24(), rgb24toyv12(), sad8_4_mmx(), sad8_4_mmx2(), tempNoiseReducer(), uyvyToUV(), vc1_put_hor_16b_shift2_mmx(), vc1_put_shift2_mmx(), vc1_put_ver_16b_shift2_mmx(), vertX1Filter(), yuv2packed1(), yuv2packed2(), yuv2packedX(), yuv420_rgb16(), yuy2ToUV(), and yuy2ToY().

#define MASK_ABS ( mask,
level   ) 

Value:

Definition at line 214 of file internal.h.

Referenced by dnxhd_init_vlc(), and mpeg1_encode_block().

#define NDEBUG

Definition at line 30 of file internal.h.

#define offsetof ( T,
 )     ((unsigned int)((char *)&((T *)0)->F))

Definition at line 114 of file internal.h.

Referenced by avfilter_insert_inpad(), and avfilter_insert_outpad().

#define perror   please_use_av_log_instead_of_perror

Definition at line 267 of file internal.h.

Referenced by audio_open(), do_video_stats(), doTest(), init_demo(), main(), parse_ffconfig(), and socket_open_listen().

#define printf   please_use_av_log

Definition at line 261 of file internal.h.

Referenced by __attribute__(), audio_decode_example(), audio_decode_frame(), audio_encode_example(), av_estimate_timings(), avi_load_index(), avi_read_header(), bit_alloc(), compute_bit_allocation(), compute_scale_factors(), dct_error(), dct_quantize_refine(), decode_nal(), do_exit(), doTest(), dv_decode_ac(), dv_decode_video_segment(), ff_combine_frame(), ff_estimate_p_frame_motion(), ff_rate_estimate_qscale(), ff_wmv2_decode_picture_header(), ff_wmv2_encode_mb(), flush_packet(), formatHelp(), funny_diamond_search(), get_keywords_for_file(), hadamard8_diff8x8_c(), handleAtom(), help(), http_connect(), http_prepare_data(), idct248_error(), libextractor_applefile_extract(), libextractor_thumbnailffmpeg_extract(), libextractor_tiff_extract(), main(), mpeg4_decode_sprite_trajectory(), mpegps_read_dts(), mpegvideo_parse(), opt_show_help(), output_packet(), output_picture2(), parse_amf(), print_sdp(), Process(), process_line(), processDataAtom(), processMetadata(), qpel_motion_search(), read_huffman_tables(), rm_read_header(), rtsp_cmd_play(), rtsp_send_cmd(), rtsp_skip_packet(), sdp_parse_line(), selfTest(), show_formats(), show_help(), show_help_options(), show_license(), show_version(), stream_read(), stream_seek(), synchronize_audio(), tcp_read_packet(), test_motion(), test_plugins(), testLoadPlugins(), var_diamond_search(), video_decode_example(), video_encode_example(), video_image_display(), video_refresh_timer(), wma_lsp_to_curve_init(), wmv2_decode_inter_block(), and yuv2rgb_altivec_init_tables().

#define puts   please_use_av_log

Definition at line 265 of file internal.h.

#define rand   rand_is_forbidden_due_to_state_trashing_use_av_random

Definition at line 248 of file internal.h.

Referenced by main().

#define random   random_is_forbidden_due_to_state_trashing_use_av_random

Definition at line 252 of file internal.h.

Referenced by dct_error(), fill_random(), frandom(), idct248_error(), and main().

#define realloc   please_use_av_realloc

Definition at line 244 of file internal.h.

Referenced by av_realloc(), get_path_from_ENV_PREFIX(), get_path_from_PATH(), getKeywords(), libextractor_lower_extract(), and libextractor_translit_extract().

#define sprintf   sprintf_is_forbidden_due_to_security_issues_use_snprintf

Definition at line 254 of file internal.h.

Referenced by get_path_from_PATH(), libextractor_it_extract(), libextractor_mp3_extract(), libextractor_nsf_extract(), libextractor_nsfe_info_extract(), libextractor_pdf_extract(), libextractor_rpm_extract(), libextractor_sid_extract(), libextractor_xm_extract(), and processtIME().

#define srand   srand_is_forbidden_due_to_state_trashing_use_av_init_random

Definition at line 250 of file internal.h.

#define strcat   strcat_is_forbidden_due_to_security_issues_use_av_strlcat

Definition at line 256 of file internal.h.

Referenced by __attribute__(), EXTRACTOR_loadDefaultLibraries(), get_path_from_ENV_PREFIX(), get_path_from_PATH(), libextractor_asf_extract(), libextractor_hash_md5_extract(), libextractor_hash_rmd160_extract(), libextractor_hash_sha1_extract(), libextractor_ogg_extract(), libextractor_oo_extract(), libextractor_rpm_extract(), main(), os_get_installation_path(), and processSentences().

#define time   time_is_forbidden_due_to_security_issues

Definition at line 246 of file internal.h.

Referenced by ctime1(), ff_h263_decode_frame(), handle_child_exit(), load_input_picture(), main(), matroska_parse_index(), mov_read_elst(), opt_vstats(), parse_date(), Process(), rtsp_reply_header(), and start_children().

#define UINT32_MAX   0xffffffff

Definition at line 82 of file internal.h.

Referenced by calc_rice_params(), encode_residual(), mov_write_stco_tag(), and mov_write_trailer().

#define UINT64_MAX   UINT64_C(0xFFFFFFFFFFFFFFFF)

Definition at line 94 of file internal.h.


Function Documentation

static int av_log2_16bit ( unsigned int  v  )  [inline, static]

static av_const unsigned int ff_sqrt ( unsigned int  a  )  [inline, static]

Definition at line 185 of file internal.h.

References av_log2_16bit(), c, FASTDIV, and ff_sqrt_tab.

Referenced by draw_arrow(), encode_q_branch(), ff_estimate_p_frame_motion(), get_visual_weight(), roq_dpcm_table_init(), and t_sqrt().

00186 {
00187     unsigned int b;
00188 
00189     if(a<255) return (ff_sqrt_tab[a+1]-1)>>4;
00190     else if(a<(1<<12)) b= ff_sqrt_tab[a>>4 ]>>2;
00191 #ifndef CONFIG_SMALL
00192     else if(a<(1<<14)) b= ff_sqrt_tab[a>>6 ]>>1;
00193     else if(a<(1<<16)) b= ff_sqrt_tab[a>>8 ]   ;
00194 #endif
00195     else{
00196         int s= av_log2_16bit(a>>16)>>1;
00197         unsigned int c= a>>(s+2);
00198         b= ff_sqrt_tab[c>>(s+8)];
00199         b= FASTDIV(c,b) + (b<<s);
00200     }
00201 
00202     return b - (a<b*b);
00203 }

static av_always_inline av_const long long llrint ( double  x  )  [static]

Definition at line 280 of file internal.h.

Referenced by av_set_number(), and decode_init().

00281 {
00282     return rint(x);
00283 }

static av_always_inline av_const long int lrint ( double  x  )  [static]

Definition at line 287 of file internal.h.

00288 {
00289     return rint(x);
00290 }

static av_always_inline av_const long int lrintf ( float  x  )  [static]

Definition at line 294 of file internal.h.

Referenced by av_audio_convert(), av_build_filter(), build_basis(), do_audio_out(), do_video_out(), ff_faandct(), ff_faandct248(), ff_xvid_rate_control_init(), init_qexp(), p8idct(), print_report(), quantize_lpc_coefs(), saturate_output_float(), and wma_decode_frame().

00295 {
00296     return (int)(rint(x));
00297 }

static av_always_inline av_const double round ( double  x  )  [static]

Definition at line 301 of file internal.h.

00302 {
00303     return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
00304 }

static av_always_inline av_const float roundf ( float  x  )  [static]

Definition at line 308 of file internal.h.

Referenced by xvid_correct_framerate().

00309 {
00310     return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
00311 }


Variable Documentation

const uint32_t ff_inverse[256]

Definition at line 107 of file dsputil.c.

Referenced by dct_quantize(), msmpeg4_pred_dc(), and vorbis_residue_decode().

const uint8_t ff_sqrt_tab[256]

Definition at line 29 of file mathematics.c.

Referenced by ff_sqrt().


Generated on Thu Nov 20 08:45:29 2008 for libextractor by  doxygen 1.5.1