21 #ifndef AVFORMAT_INTERNAL_H 
   22 #define AVFORMAT_INTERNAL_H 
   28 #define MAX_URL_SIZE 4096 
   31 #define PROBE_BUF_MIN 2048 
   32 #define PROBE_BUF_MAX (1 << 20) 
   35 #    define hex_dump_debug(class, buf, size) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size) 
   37 #    define hex_dump_debug(class, buf, size) do { if (0) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size); } while(0) 
   84 #define RAW_PACKET_BUFFER_SIZE 2500000 
  105 #define dynarray_add(tab, nb_ptr, elem)\ 
  107     __typeof__(tab) _tab = (tab);\ 
  108     __typeof__(elem) _elem = (elem);\ 
  109     (void)sizeof(**_tab == _elem); \ 
  110     av_dynarray_add(_tab, nb_ptr, _elem);\ 
  113 #define dynarray_add(tab, nb_ptr, elem)\ 
  115     av_dynarray_add((tab), nb_ptr, (elem));\ 
  145 #define NTP_OFFSET 2208988800ULL 
  146 #define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL) 
  170                         const char *dest_addr, 
const char *dest_type,
 
  211 #define SPACE_CHARS " \t\r\n" 
  224                                     int key_len, 
char **dest, 
int *dest_len);
 
  247                               int64_t wanted_timestamp, 
int flags);
 
  253                        int *nb_index_entries,
 
  254                        unsigned int *index_entries_allocated_size,
 
  269                               int64_t 
start, int64_t 
end, 
const char *title);
 
  293                          int64_t target_ts, 
int flags);
 
  306                     int64_t (*read_timestamp)(
struct AVFormatContext *, 
int , int64_t *, int64_t ));
 
  315                       int64_t target_ts, int64_t pos_min,
 
  316                       int64_t pos_max, int64_t pos_limit,
 
  317                       int64_t ts_min, int64_t ts_max,
 
  318                       int flags, int64_t *ts_ret,
 
  319                       int64_t (*read_timestamp)(
struct AVFormatContext *, 
int , int64_t *, int64_t ));
 
  334                          unsigned int pts_num, 
unsigned int pts_den);
 
  431 static inline int ff_rename(
const char *oldpath, 
const char *newpath, 
void *logctx)
 
  434     if (rename(oldpath, newpath) == -1) {
 
static float compare(const AVFrame *haystack, const AVFrame *obj, int offx, int offy)
 
const char const char void * val
 
ptrdiff_t const GLvoid * data
 
static av_always_inline void interleave(IDWTELEM *dst, IDWTELEM *src0, IDWTELEM *src1, int w2, int add, int shift)
 
miscellaneous OS support macros and functions. 
 
static av_cold int end(AVCodecContext *avctx)
 
const OptionDef options[]
 
Callback for checking whether to abort blocking functions. 
 
AVCodecID
Identify the syntax and semantics of the bitstream. 
 
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered. 
 
const AVIOInterruptCB int_cb
 
static float distance(float x, float y, int band)
 
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
 
static void flush(AVCodecContext *avctx)
 
main external API structure. 
 
BYTE int const BYTE int int int height
 
rational number numerator/denominator 
 
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> out
 
AVChromaLocation
Location of chroma samples. 
 
This structure stores compressed data.