avcodec.h File Reference


Detailed Description

external API header

Definition in file avcodec.h.

Go to the source code of this file.

Classes

struct  RcOverride
struct  AVPanScan
 Pan Scan area. More...
struct  AVFrame
 Audio Video Frame. More...
struct  AVCodecContext
 main external API structure More...
struct  AVCodec
 AVCodec. More...
struct  AVPicture
 four components are given, that's all. More...
struct  AVPaletteControl
struct  AVSubtitleRect
struct  AVSubtitle
struct  AVCodecParserContext
struct  AVCodecParser
struct  AVBitStreamFilterContext
struct  AVBitStreamFilter

Typedefs

typedef struct AVPaletteControl attribute_deprecated
typedef struct ReSampleContext ReSampleContext

Enumerations

enum  CodecID {
  CODEC_ID_NONE, CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO, CODEC_ID_MPEG2VIDEO_XVMC,
  CODEC_ID_MPEG2VIDEO_XVMC_VLD, CODEC_ID_MPEG2VIDEO_DVDV, CODEC_ID_H261, CODEC_ID_H263,
  CODEC_ID_RV10, CODEC_ID_RV20, CODEC_ID_MJPEG, CODEC_ID_MJPEGB,
  CODEC_ID_LJPEG, CODEC_ID_SP5X, CODEC_ID_JPEGLS, CODEC_ID_MPEG4,
  CODEC_ID_RAWVIDEO, CODEC_ID_MSMPEG4V1, CODEC_ID_MSMPEG4V2, CODEC_ID_MSMPEG4V3,
  CODEC_ID_WMV1, CODEC_ID_WMV2, CODEC_ID_H263P, CODEC_ID_H263I,
  CODEC_ID_FLV1, CODEC_ID_SVQ1, CODEC_ID_SVQ3, CODEC_ID_DVVIDEO,
  CODEC_ID_HUFFYUV, CODEC_ID_CYUV, CODEC_ID_H264, CODEC_ID_INDEO3,
  CODEC_ID_VP3, CODEC_ID_THEORA, CODEC_ID_ASV1, CODEC_ID_ASV2,
  CODEC_ID_FFV1, CODEC_ID_4XM, CODEC_ID_VCR1, CODEC_ID_CLJR,
  CODEC_ID_MDEC, CODEC_ID_ROQ, CODEC_ID_INTERPLAY_VIDEO, CODEC_ID_XAN_WC3,
  CODEC_ID_XAN_WC4, CODEC_ID_RPZA, CODEC_ID_CINEPAK, CODEC_ID_WS_VQA,
  CODEC_ID_MSRLE, CODEC_ID_MSVIDEO1, CODEC_ID_IDCIN, CODEC_ID_8BPS,
  CODEC_ID_SMC, CODEC_ID_FLIC, CODEC_ID_TRUEMOTION1, CODEC_ID_VMDVIDEO,
  CODEC_ID_MSZH, CODEC_ID_ZLIB, CODEC_ID_QTRLE, CODEC_ID_SNOW,
  CODEC_ID_TSCC, CODEC_ID_ULTI, CODEC_ID_QDRAW, CODEC_ID_VIXL,
  CODEC_ID_QPEG, CODEC_ID_XVID, CODEC_ID_PNG, CODEC_ID_PPM,
  CODEC_ID_PBM, CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PAM,
  CODEC_ID_FFVHUFF, CODEC_ID_RV30, CODEC_ID_RV40, CODEC_ID_VC1,
  CODEC_ID_WMV3, CODEC_ID_LOCO, CODEC_ID_WNV1, CODEC_ID_AASC,
  CODEC_ID_INDEO2, CODEC_ID_FRAPS, CODEC_ID_TRUEMOTION2, CODEC_ID_BMP,
  CODEC_ID_CSCD, CODEC_ID_MMVIDEO, CODEC_ID_ZMBV, CODEC_ID_AVS,
  CODEC_ID_SMACKVIDEO, CODEC_ID_NUV, CODEC_ID_KMVC, CODEC_ID_FLASHSV,
  CODEC_ID_CAVS, CODEC_ID_JPEG2000, CODEC_ID_VMNC, CODEC_ID_VP5,
  CODEC_ID_VP6, CODEC_ID_VP6F, CODEC_ID_TARGA, CODEC_ID_DSICINVIDEO,
  CODEC_ID_TIERTEXSEQVIDEO, CODEC_ID_TIFF, CODEC_ID_GIF, CODEC_ID_FFH264,
  CODEC_ID_DXA, CODEC_ID_DNXHD, CODEC_ID_THP, CODEC_ID_SGI,
  CODEC_ID_C93, CODEC_ID_BETHSOFTVID, CODEC_ID_PTX, CODEC_ID_TXD,
  CODEC_ID_VP6A, CODEC_ID_AMV, CODEC_ID_VB, CODEC_ID_PCM_S16LE = 0x10000,
  CODEC_ID_PCM_S16BE, CODEC_ID_PCM_U16LE, CODEC_ID_PCM_U16BE, CODEC_ID_PCM_S8,
  CODEC_ID_PCM_U8, CODEC_ID_PCM_MULAW, CODEC_ID_PCM_ALAW, CODEC_ID_PCM_S32LE,
  CODEC_ID_PCM_S32BE, CODEC_ID_PCM_U32LE, CODEC_ID_PCM_U32BE, CODEC_ID_PCM_S24LE,
  CODEC_ID_PCM_S24BE, CODEC_ID_PCM_U24LE, CODEC_ID_PCM_U24BE, CODEC_ID_PCM_S24DAUD,
  CODEC_ID_PCM_ZORK, CODEC_ID_ADPCM_IMA_QT = 0x11000, CODEC_ID_ADPCM_IMA_WAV, CODEC_ID_ADPCM_IMA_DK3,
  CODEC_ID_ADPCM_IMA_DK4, CODEC_ID_ADPCM_IMA_WS, CODEC_ID_ADPCM_IMA_SMJPEG, CODEC_ID_ADPCM_MS,
  CODEC_ID_ADPCM_4XM, CODEC_ID_ADPCM_XA, CODEC_ID_ADPCM_ADX, CODEC_ID_ADPCM_EA,
  CODEC_ID_ADPCM_G726, CODEC_ID_ADPCM_CT, CODEC_ID_ADPCM_SWF, CODEC_ID_ADPCM_YAMAHA,
  CODEC_ID_ADPCM_SBPRO_4, CODEC_ID_ADPCM_SBPRO_3, CODEC_ID_ADPCM_SBPRO_2, CODEC_ID_ADPCM_THP,
  CODEC_ID_ADPCM_IMA_AMV, CODEC_ID_ADPCM_EA_R1, CODEC_ID_ADPCM_EA_R3, CODEC_ID_ADPCM_EA_R2,
  CODEC_ID_ADPCM_IMA_EA_SEAD, CODEC_ID_ADPCM_IMA_EA_EACS, CODEC_ID_ADPCM_EA_XAS, CODEC_ID_AMR_NB = 0x12000,
  CODEC_ID_AMR_WB, CODEC_ID_RA_144 = 0x13000, CODEC_ID_RA_288, CODEC_ID_ROQ_DPCM = 0x14000,
  CODEC_ID_INTERPLAY_DPCM, CODEC_ID_XAN_DPCM, CODEC_ID_SOL_DPCM, CODEC_ID_MP2 = 0x15000,
  CODEC_ID_MP3, CODEC_ID_AAC, LIBAVCODEC_VERSION_INT, CODEC_ID_AC3,
  CODEC_ID_DTS, CODEC_ID_VORBIS, CODEC_ID_DVAUDIO, CODEC_ID_WMAV1,
  CODEC_ID_WMAV2, CODEC_ID_MACE3, CODEC_ID_MACE6, CODEC_ID_VMDAUDIO,
  CODEC_ID_SONIC, CODEC_ID_SONIC_LS, CODEC_ID_FLAC, CODEC_ID_MP3ADU,
  CODEC_ID_MP3ON4, CODEC_ID_SHORTEN, CODEC_ID_ALAC, CODEC_ID_WESTWOOD_SND1,
  CODEC_ID_GSM, CODEC_ID_QDM2, CODEC_ID_COOK, CODEC_ID_TRUESPEECH,
  CODEC_ID_TTA, CODEC_ID_SMACKAUDIO, CODEC_ID_QCELP, CODEC_ID_WAVPACK,
  CODEC_ID_DSICINAUDIO, CODEC_ID_IMC, CODEC_ID_MUSEPACK7, CODEC_ID_MLP,
  CODEC_ID_GSM_MS, CODEC_ID_ATRAC3, CODEC_ID_VOXWARE, CODEC_ID_APE,
  CODEC_ID_NELLYMOSER, CODEC_ID_MUSEPACK8, CODEC_ID_DVD_SUBTITLE = 0x17000, CODEC_ID_DVB_SUBTITLE,
  CODEC_ID_TEXT, CODEC_ID_XSUB, CODEC_ID_MPEG2VBI, CODEC_ID_DVB_VBI,
  CODEC_ID_DSMCC_B, CODEC_ID_MPEG2TS = 0x20000
}
 Identifies the syntax and semantics of the bitstream. More...
enum  CodecType {
  CODEC_TYPE_UNKNOWN = -1, CODEC_TYPE_VIDEO, CODEC_TYPE_AUDIO, CODEC_TYPE_DATA,
  CODEC_TYPE_SUBTITLE, CODEC_TYPE_NB
}
enum  SampleFormat {
  SAMPLE_FMT_NONE = -1, SAMPLE_FMT_U8, SAMPLE_FMT_S16, SAMPLE_FMT_S24,
  SAMPLE_FMT_S32, SAMPLE_FMT_FLT
}
enum  Motion_Est_ID {
  ME_ZERO = 1, ME_FULL, ME_LOG, ME_PHODS,
  ME_EPZS, ME_X1, ME_HEX, ME_UMH,
  ME_ITER
}
enum  AVDiscard {
  AVDISCARD_NONE = -16, AVDISCARD_DEFAULT = 0, AVDISCARD_NONREF = 8, AVDISCARD_BIDIR = 16,
  AVDISCARD_NONKEY = 32, AVDISCARD_ALL = 48
}

Functions

ReSampleContextaudio_resample_init (int output_channels, int input_channels, int output_rate, int input_rate)
int audio_resample (ReSampleContext *s, short *output, short *input, int nb_samples)
void audio_resample_close (ReSampleContext *s)
struct AVResampleContextav_resample_init (int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff)
 Initializes an audio resampler.
int av_resample (struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx)
 resamples.
void av_resample_compensate (struct AVResampleContext *c, int sample_delta, int compensation_distance)
 Compensates samplerate/timestamp drift.
void av_resample_close (struct AVResampleContext *c)
attribute_deprecated
ImgReSampleContext
img_resample_init (int output_width, int output_height, int input_width, int input_height)
attribute_deprecated
ImgReSampleContext
img_resample_full_init (int owidth, int oheight, int iwidth, int iheight, int topBand, int bottomBand, int leftBand, int rightBand, int padtop, int padbottom, int padleft, int padright)
attribute_deprecated void img_resample (struct ImgReSampleContext *s, AVPicture *output, const AVPicture *input)
attribute_deprecated void img_resample_close (struct ImgReSampleContext *s)
int avpicture_alloc (AVPicture *picture, int pix_fmt, int width, int height)
 Allocate memory for a picture.
void avpicture_free (AVPicture *picture)
 Free a picture previously allocated by avpicture_alloc().
int avpicture_fill (AVPicture *picture, uint8_t *ptr, int pix_fmt, int width, int height)
 Fill in the AVPicture fields.
int avpicture_layout (const AVPicture *src, int pix_fmt, int width, int height, unsigned char *dest, int dest_size)
int avpicture_get_size (int pix_fmt, int width, int height)
 Calculate the size in bytes that a picture of the given width and height would occupy if stored in the given picture format.
void avcodec_get_chroma_sub_sample (int pix_fmt, int *h_shift, int *v_shift)
const char * avcodec_get_pix_fmt_name (int pix_fmt)
void avcodec_set_dimensions (AVCodecContext *s, int width, int height)
enum PixelFormat avcodec_get_pix_fmt (const char *name)
unsigned int avcodec_pix_fmt_to_codec_tag (enum PixelFormat p)
int avcodec_get_pix_fmt_loss (int dst_pix_fmt, int src_pix_fmt, int has_alpha)
 Computes what kind of losses will occur when converting from one specific pixel format to another.
int avcodec_find_best_pix_fmt (int pix_fmt_mask, int src_pix_fmt, int has_alpha, int *loss_ptr)
 Finds the best pixel format to convert to given a certain source pixel format.
void avcodec_pix_fmt_string (char *buf, int buf_size, int pix_fmt)
 Print in buf the string corresponding to the pixel format with number pix_fmt, or an header if pix_fmt is negative.
int img_get_alpha_info (const AVPicture *src, int pix_fmt, int width, int height)
 Tell if an image really has transparent alpha values.
attribute_deprecated int img_convert (AVPicture *dst, int dst_pix_fmt, const AVPicture *src, int pix_fmt, int width, int height)
 convert among pixel formats
int avpicture_deinterlace (AVPicture *dst, const AVPicture *src, int pix_fmt, int width, int height)
unsigned avcodec_version (void)
unsigned avcodec_build (void)
void avcodec_init (void)
 Initializes libavcodec.
void register_avcodec (AVCodec *format)
AVCodecavcodec_find_encoder (enum CodecID id)
 Finds a registered encoder with a matching codec ID.
AVCodecavcodec_find_encoder_by_name (const char *name)
 Finds a registered encoder with the specified name.
AVCodecavcodec_find_decoder (enum CodecID id)
 Finds a registered decoder with a matching codec ID.
AVCodecavcodec_find_decoder_by_name (const char *name)
 Finds a registered decoder with the specified name.
void avcodec_string (char *buf, int buf_size, AVCodecContext *enc, int encode)
void avcodec_get_context_defaults (AVCodecContext *s)
 Sets the fields of the given AVCodecContext to default values.
void avcodec_get_context_defaults2 (AVCodecContext *s, enum CodecType)
 THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!
AVCodecContextavcodec_alloc_context (void)
 Allocates an AVCodecContext and sets its fields to default values.
AVCodecContextavcodec_alloc_context2 (enum CodecType)
 THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!
void avcodec_get_frame_defaults (AVFrame *pic)
 Sets the fields of the given AVFrame to default values.
AVFrameavcodec_alloc_frame (void)
 Allocates an AVFrame and sets its fields to default values.
int avcodec_default_get_buffer (AVCodecContext *s, AVFrame *pic)
void avcodec_default_release_buffer (AVCodecContext *s, AVFrame *pic)
int avcodec_default_reget_buffer (AVCodecContext *s, AVFrame *pic)
void avcodec_align_dimensions (AVCodecContext *s, int *width, int *height)
int avcodec_check_dimensions (void *av_log_ctx, unsigned int w, unsigned int h)
 Checks if the given dimension of a picture is valid, meaning that all bytes of the picture can be addressed with a signed int.
enum PixelFormat avcodec_default_get_format (struct AVCodecContext *s, const enum PixelFormat *fmt)
int avcodec_thread_init (AVCodecContext *s, int thread_count)
void avcodec_thread_free (AVCodecContext *s)
 Free what has been allocated by avcodec_thread_init().
int avcodec_thread_execute (AVCodecContext *s, int(*func)(AVCodecContext *c2, void *arg2), void **arg, int *ret, int count)
int avcodec_default_execute (AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void **arg, int *ret, int count)
int avcodec_open (AVCodecContext *avctx, AVCodec *codec)
 Initializes the AVCodecContext to use the given AVCodec.
attribute_deprecated int avcodec_decode_audio (AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, uint8_t *buf, int buf_size)
int avcodec_decode_audio2 (AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, uint8_t *buf, int buf_size)
 Decodes an audio frame from buf into samples.
int avcodec_decode_video (AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, uint8_t *buf, int buf_size)
 Decodes a video frame from buf into picture.
int avcodec_decode_subtitle (AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const uint8_t *buf, int buf_size)
int avcodec_parse_frame (AVCodecContext *avctx, uint8_t **pdata, int *data_size_ptr, uint8_t *buf, int buf_size)
int avcodec_encode_audio (AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples)
 Encodes an audio frame from samples into buf.
int avcodec_encode_video (AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVFrame *pict)
 Encodes a video frame from pict into buf.
int avcodec_encode_subtitle (AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
int avcodec_close (AVCodecContext *avctx)
void avcodec_register_all (void)
 Register all the codecs, parsers and bitstream filters which were enabled at configuration time.
void avcodec_flush_buffers (AVCodecContext *avctx)
 Flush buffers, should be called when seeking or when switching to a different stream.
void avcodec_default_free_buffers (AVCodecContext *s)
char av_get_pict_type_char (int pict_type)
 Returns a single letter to describe the given picture type pict_type.
int av_get_bits_per_sample (enum CodecID codec_id)
 Returns codec bits per sample.
int av_get_bits_per_sample_format (enum SampleFormat sample_fmt)
 Returns sample format bits per sample.
void av_register_codec_parser (AVCodecParser *parser)
AVCodecParserContextav_parser_init (int codec_id)
int av_parser_parse (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts)
int av_parser_change (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
void av_parser_close (AVCodecParserContext *s)
void av_register_bitstream_filter (AVBitStreamFilter *bsf)
AVBitStreamFilterContextav_bitstream_filter_init (const char *name)
int av_bitstream_filter_filter (AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
void av_bitstream_filter_close (AVBitStreamFilterContext *bsf)
void * av_fast_realloc (void *ptr, unsigned int *size, unsigned int min_size)
 Reallocates the given block if it is not large enough, otherwise it does nothing.
attribute_deprecated void av_free_static (void)
 Frees all static arrays and resets their pointers to 0.
attribute_deprecated void * av_mallocz_static (unsigned int size)
 Allocation of static arrays.
void av_picture_copy (AVPicture *dst, const AVPicture *src, int pix_fmt, int width, int height)
 Copy image 'src' to 'dst'.
int av_picture_crop (AVPicture *dst, const AVPicture *src, int pix_fmt, int top_band, int left_band)
 Crop image top and left side.
int av_picture_pad (AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color)
 Pad image.
attribute_deprecated void img_copy (AVPicture *dst, const AVPicture *src, int pix_fmt, int width, int height)
attribute_deprecated int img_crop (AVPicture *dst, const AVPicture *src, int pix_fmt, int top_band, int left_band)
attribute_deprecated int img_pad (AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color)
unsigned int av_xiphlacing (unsigned char *s, unsigned int v)
void avcodec_default_decode_cc_dvd (AVCodecContext *c, const uint8_t *buf, int buf_size)
void avcodec_default_decode_cc_atsc (AVCodecContext *c, const uint8_t *buf, int buf_size)
const char * codec_id_string (enum CodecID codec_id)
 returns a human readable string for the CodecID enum.
const char * codec_type_string (enum CodecType codec_type)
 returns a human readable string for the CodecType enum.
int av_parse_video_frame_size (int *width_ptr, int *height_ptr, const char *str)
 Parses str and put in width_ptr and height_ptr the detected values.
int av_parse_video_frame_rate (AVRational *frame_rate, const char *str)
 Parses str and put in frame_rate the detected values.

Variables

AVCodecfirst_avcodec
AVCodecParserav_first_parser


Typedef Documentation

Deprecated:
Use the software scaler (swscale) instead.

Definition at line 2306 of file avcodec.h.

Definition at line 2288 of file avcodec.h.


Enumeration Type Documentation

enum CodecID

Identifies the syntax and semantics of the bitstream.

The principle is roughly: Two decoders with the same ID can decode the same streams. Two encoders with the same ID can encode compatible streams. There may be slight deviations from the principle due to implementation details.

If you add a codec ID to this list, add it so that 1. no value of a existing codec ID changes (that would break ABI), 2. it is as close as possible to similar codecs.

Enumerator:
CODEC_ID_NONE 
CODEC_ID_MPEG1VIDEO 
CODEC_ID_MPEG2VIDEO 
CODEC_ID_MPEG2VIDEO_XVMC 
CODEC_ID_MPEG2VIDEO_XVMC_VLD 
CODEC_ID_MPEG2VIDEO_DVDV 
CODEC_ID_H261 
CODEC_ID_H263 
CODEC_ID_RV10 
CODEC_ID_RV20 
CODEC_ID_MJPEG 
CODEC_ID_MJPEGB 
CODEC_ID_LJPEG 
CODEC_ID_SP5X 
CODEC_ID_JPEGLS 
CODEC_ID_MPEG4 
CODEC_ID_R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_ID_DVD_SUBTITLE 
CODEC_ID_DVB_SUBTITLE 
CODEC_ID_TEXT 
CODEC_ID_XSUB 
CODEC_ID_MPEG2VBI 
CODEC_ID_DVB_VBI 
CODEC_ID_DSMCC_B 
CODEC_ID_MPEG2TS 

Definition at line 58 of file avcodec.h.

enum CodecType

Enumerator:
CODEC_TYPE_UNKNOWN 
CODEC_TYPE_VIDEO 
CODEC_TYPE_AUDIO 
CODEC_TYPE_DATA 
CODEC_TYPE_SUBTITLE 
CODEC_TYPE_NB 

Definition at line 302 of file avcodec.h.

Enumerator:
SAMPLE_FMT_NONE 
SAMPLE_FMT_U8  unsigned 8 bits
SAMPLE_FMT_S16  signed 16 bits
SAMPLE_FMT_S24  signed 24 bits
SAMPLE_FMT_S32  signed 32 bits
SAMPLE_FMT_FLT  float

Definition at line 313 of file avcodec.h.

Enumerator:
ME_ZERO 
ME_FULL 
ME_LOG 
ME_PHODS 
ME_EPZS 
ME_X1 
ME_HEX 
ME_UMH 
ME_ITER 

Definition at line 341 of file avcodec.h.

enum AVDiscard

Enumerator:
AVDISCARD_NONE  discard nothing
AVDISCARD_DEFAULT  discard useless packets like 0 size packets in avi
AVDISCARD_NONREF  discard all non reference
AVDISCARD_BIDIR  discard all bidirectional frames
AVDISCARD_NONKEY  discard all frames except keyframes
AVDISCARD_ALL  discard all

Definition at line 353 of file avcodec.h.


Function Documentation

ReSampleContext* audio_resample_init ( int  output_channels,
int  input_channels,
int  output_rate,
int  input_rate 
)

Definition at line 129 of file resample.c.

int audio_resample ( ReSampleContext s,
short *  output,
short *  input,
int  nb_samples 
)

Definition at line 172 of file resample.c.

void audio_resample_close ( ReSampleContext s  ) 

Definition at line 244 of file resample.c.

struct AVResampleContext* av_resample_init ( int  out_rate,
int  in_rate,
int  filter_size,
int  phase_shift,
int  linear,
double  cutoff 
) [read]

Initializes an audio resampler.

Note, if either rate is not an integer then simply scale both rates up so they are.

Definition at line 182 of file resample2.c.

Referenced by audio_resample_init().

int av_resample ( AVResampleContext c,
short *  dst,
short *  src,
int *  consumed,
int  src_size,
int  dst_size,
int  update_ctx 
)

resamples.

Parameters:
src an array of unconsumed samples
consumed the number of samples of src which have been consumed are returned here
src_size the number of unconsumed samples available
dst_size the amount of space in samples available in dst
update_ctx if this is 0 then the context wont be modified, that way several channels can be resampled with the same context
Returns:
the number of samples written in dst or -1 if an error occured

Definition at line 236 of file resample2.c.

Referenced by audio_resample().

void av_resample_compensate ( AVResampleContext c,
int  sample_delta,
int  compensation_distance 
)

Compensates samplerate/timestamp drift.

The compensation is done by changing the resampler parameters, so no audible clicks or similar distortions ocur

Parameters:
compensation_distance distance in output samples over which the compensation should be performed
sample_delta number of output samples which should be output less
example: av_resample_compensate(c, 10, 500) here instead of 510 samples only 500 samples would be output

note, due to rounding the actual compensation might be slightly different, especially if the compensation_distance is large and the in_rate used during init is small

Definition at line 221 of file resample2.c.

Referenced by av_resample().

void av_resample_close ( struct AVResampleContext c  ) 

Definition at line 204 of file resample2.c.

Referenced by audio_resample_close().

attribute_deprecated ImgReSampleContext* img_resample_init ( int  output_width,
int  output_height,
int  input_width,
int  input_height 
)

attribute_deprecated ImgReSampleContext* img_resample_full_init ( int  owidth,
int  oheight,
int  iwidth,
int  iheight,
int  topBand,
int  bottomBand,
int  leftBand,
int  rightBand,
int  padtop,
int  padbottom,
int  padleft,
int  padright 
)

Deprecated:
Use the software scaler (swscale) instead.

Definition at line 434 of file imgresample.c.

Referenced by img_resample_init(), main(), and Transcode::TranscodeFile().

attribute_deprecated void img_resample ( struct ImgReSampleContext s,
AVPicture output,
const AVPicture input 
)

attribute_deprecated void img_resample_close ( struct ImgReSampleContext s  ) 

int avpicture_alloc ( AVPicture picture,
int  pix_fmt,
int  width,
int  height 
)

Allocate memory for a picture.

Call avpicture_free to free it.

Parameters:
picture the picture to be filled in
pix_fmt the format of the picture
width the width of the picture
height the height of the picture
Returns:
zero if successful, a negative value if not

Definition at line 2192 of file imgconvert.c.

Referenced by img_convert(), TemplateMatcher::nuppelVideoPlayerInited(), PGMConverter::nuppelVideoPlayerInited(), qtrle_encode_init(), readTemplate(), TemplateFinder::resetBuffers(), CannyEdgeDetector::resetBuffers(), and template_alloc().

void avpicture_free ( AVPicture picture  ) 

int avpicture_fill ( AVPicture picture,
uint8_t *  ptr,
int  pix_fmt,
int  width,
int  height 
)

Fill in the AVPicture fields.

The fields of the given AVPicture are filled in by using the 'ptr' address which points to the image data buffer. Depending on the specified picture format, one or multiple image data pointers and line sizes will be set. If a planar format is specified, several pointers will be set pointing to the different picture planes and the line sizes of the different planes will be stored in the lines_sizes array.

Parameters:
picture AVPicture whose fields are to be filled in
ptr Buffer which will contain or contains the actual image data
pix_fmt The format in which the picture data is stored.
width the width of the image in pixels
height the height of the image in pixels
Returns:
size of the image data in bytes

Definition at line 429 of file imgconvert.c.

Referenced by avcodec_default_get_buffer(), avpicture_alloc(), avpicture_get_size(), copy_frame(), MHIBitmap::CreateFromMPEG(), NuppelDecoder::DecodeFrame(), NuppelVideoPlayer::DisplayNormalFrame(), ThumbFinder::getFrameImage(), PGMConverter::getImage(), NuppelVideoPlayer::GetScreenGrabAtFrame(), grabThumbnail(), pgm_fill(), VideoOutputDX::PrepareFrame(), VideoOutputD3D::PrepareFrame(), VideoOutputXv::PrepareFrameMem(), Webcam::ProcessFrame(), raw_decode(), VideoOutput::ResizeVideo(), VideoOutput::ShowPip(), VideoOutputIvtv::ShowPip(), sws_scale(), Transcode::TranscodeFile(), and OpenGLVideo::UpdateInputFrame().

int avpicture_layout ( const AVPicture src,
int  pix_fmt,
int  width,
int  height,
unsigned char *  dest,
int  dest_size 
)

Definition at line 581 of file imgconvert.c.

Referenced by raw_encode().

int avpicture_get_size ( int  pix_fmt,
int  width,
int  height 
)

Calculate the size in bytes that a picture of the given width and height would occupy if stored in the given picture format.

Parameters:
pix_fmt the given picture format
width the width of the image
height the height of the image
Returns:
Image data size in bytes

Definition at line 634 of file imgconvert.c.

Referenced by avpicture_alloc(), avpicture_layout(), dc1394_read_header(), pam_encode_frame(), PCMDEF(), pnm_encode_frame(), pnm_parse(), raw_init_decoder(), sws_scale(), targa_encode_frame(), v4l2_read_header(), and yuv4_read_packet().

void avcodec_get_chroma_sub_sample ( int  pix_fmt,
int *  h_shift,
int *  v_shift 
)

const char* avcodec_get_pix_fmt_name ( int  pix_fmt  ) 

Definition at line 390 of file imgconvert.c.

Referenced by avcodec_string().

void avcodec_set_dimensions ( AVCodecContext s,
int  width,
int  height 
)

enum PixelFormat avcodec_get_pix_fmt ( const char *  name  ) 

Definition at line 398 of file imgconvert.c.

unsigned int avcodec_pix_fmt_to_codec_tag ( enum PixelFormat  p  ) 

Definition at line 58 of file libavcodec/raw.c.

Referenced by av_find_stream_info(), and raw_init_encoder().

int avcodec_get_pix_fmt_loss ( int  dst_pix_fmt,
int  src_pix_fmt,
int  has_alpha 
)

Computes what kind of losses will occur when converting from one specific pixel format to another.

When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. These losses can involve loss of chroma, but also loss of resolution, loss of color depth, loss due to the color space conversion, loss of the alpha bits or loss due to color quantization. avcodec_get_fix_fmt_loss() informs you about the various types of losses which will occur when converting from one pixel format to another.

Parameters:
[in] dst_pix_fmt destination pixel format
[in] src_pix_fmt source pixel format
[in] has_alpha Whether the source pixel format alpha channel is used.
Returns:
Combination of flags informing you what kind of losses will occur.

Definition at line 640 of file imgconvert.c.

Referenced by avcodec_find_best_pix_fmt(), and avcodec_find_best_pix_fmt1().

int avcodec_find_best_pix_fmt ( int  pix_fmt_mask,
int  src_pix_fmt,
int  has_alpha,
int *  loss_ptr 
)

Finds the best pixel format to convert to given a certain source pixel format.

When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. avcodec_find_best_pix_fmt() searches which of the given pixel formats should be used to suffer the least amount of loss. The pixel formats from which it chooses one, are determined by the pix_fmt_mask parameter.

 src_pix_fmt = PIX_FMT_YUV420P;
 pix_fmt_mask = (1 << PIX_FMT_YUV422P) || (1 << PIX_FMT_RGB24);
 dst_pix_fmt = avcodec_find_best_pix_fmt(pix_fmt_mask, src_pix_fmt, alpha, &loss);

Parameters:
[in] pix_fmt_mask bitmask determining which pixel format to choose from
[in] src_pix_fmt source pixel format
[in] has_alpha Whether the source pixel format alpha channel is used.
[out] loss_ptr Combination of flags informing you what kind of losses will occur.
Returns:
The best pixel format to convert to or -1 if none was found.

Definition at line 763 of file imgconvert.c.

void avcodec_pix_fmt_string ( char *  buf,
int  buf_size,
int  pix_fmt 
)

Print in buf the string corresponding to the pixel format with number pix_fmt, or an header if pix_fmt is negative.

Parameters:
[in] buf the buffer where to write the string
[in] buf_size the size of buf
[in] pix_fmt the number of the pixel format to print the corresponding info string, or a negative value to print the corresponding header. Meaningful values for obtaining a pixel format info vary from 0 to PIX_FMT_NB -1.

Definition at line 408 of file imgconvert.c.

int img_get_alpha_info ( const AVPicture src,
int  pix_fmt,
int  width,
int  height 
)

Tell if an image really has transparent alpha values.

Returns:
ored mask of FF_ALPHA_xxx constants

Definition at line 2600 of file imgconvert.c.

attribute_deprecated int img_convert ( AVPicture dst,
int  dst_pix_fmt,
const AVPicture src,
int  pix_fmt,
int  width,
int  height 
)

int avpicture_deinterlace ( AVPicture dst,
const AVPicture src,
int  pix_fmt,
int  width,
int  height 
)

unsigned avcodec_version ( void   ) 

Definition at line 1237 of file libavcodec/utils.c.

unsigned avcodec_build ( void   ) 

Definition at line 1242 of file libavcodec/utils.c.

void avcodec_init ( void   ) 

Initializes libavcodec.

Warning:
This function must be called before any other libavcodec function.

Definition at line 1258 of file libavcodec/utils.c.

Referenced by av_register_all(), H263Container::H263Container(), SignalMonitor::Init(), main(), NuppelDecoder::NuppelDecoder(), and RecorderBase::RecorderBase().

void register_avcodec ( AVCodec format  ) 

Definition at line 129 of file libavcodec/utils.c.

AVCodec* avcodec_find_encoder ( enum CodecID  id  ) 

Finds a registered encoder with a matching codec ID.

Parameters:
id CodecID of the requested encoder
Returns:
An encoder if one was found, NULL otherwise.

Definition at line 1027 of file libavcodec/utils.c.

Referenced by asf_write_header1(), audio_encode_example(), avcodec_string(), MPEG2fixup::BuildFrame(), encode_mp2_audio(), estimate_best_b_count(), H263Container::H263StartEncoder(), AudioOutputDigitalEncoder::Init(), and video_encode_example().

AVCodec* avcodec_find_encoder_by_name ( const char *  name  ) 

Finds a registered encoder with the specified name.

Parameters:
name name of the requested encoder
Returns:
An encoder if one was found, NULL otherwise.

Definition at line 1039 of file libavcodec/utils.c.

Referenced by NuppelVideoRecorder::SetupAVCodecVideo().

AVCodec* avcodec_find_decoder ( enum CodecID  id  ) 

AVCodec* avcodec_find_decoder_by_name ( const char *  name  ) 

Finds a registered decoder with the specified name.

Parameters:
name name of the requested decoder
Returns:
A decoder if one was found, NULL otherwise.

Definition at line 1063 of file libavcodec/utils.c.

void avcodec_string ( char *  buf,
int  buf_size,
AVCodecContext enc,
int  encode 
)

Definition at line 1075 of file libavcodec/utils.c.

Referenced by av_find_stream_info(), dump_stream_format(), and getFileInfo().

void avcodec_get_context_defaults ( AVCodecContext s  ) 

Sets the fields of the given AVCodecContext to default values.

Parameters:
s The AVCodecContext of which the fields should be set to default values.

Definition at line 814 of file libavcodec/utils.c.

void avcodec_get_context_defaults2 ( AVCodecContext s,
enum  CodecType 
)

THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!

Definition at line 774 of file libavcodec/utils.c.

Referenced by avcodec_alloc_context2(), and avcodec_get_context_defaults().

AVCodecContext* avcodec_alloc_context ( void   ) 

AVCodecContext* avcodec_alloc_context2 ( enum  CodecType  ) 

THIS FUNCTION IS NOT YET PART OF THE PUBLIC API! we WILL change its arguments and name a few times!

Definition at line 804 of file libavcodec/utils.c.

Referenced by avcodec_alloc_context().

void avcodec_get_frame_defaults ( AVFrame pic  ) 

Sets the fields of the given AVFrame to default values.

Parameters:
pic The AVFrame of which the fields should be set to default values.

Definition at line 822 of file libavcodec/utils.c.

Referenced by avcodec_alloc_frame(), bmp_decode_init(), bmp_encode_init(), common_init(), encode_init(), estimate_best_b_count(), gif_decode_init(), H263Container::H263StartEncoder(), png_dec_init(), png_enc_init(), ptx_init(), sgi_init(), targa_init(), tiff_init(), and txd_init().

AVFrame* avcodec_alloc_frame ( void   ) 

int avcodec_default_get_buffer ( AVCodecContext s,
AVFrame pic 
)

void avcodec_default_release_buffer ( AVCodecContext s,
AVFrame pic 
)

int avcodec_default_reget_buffer ( AVCodecContext s,
AVFrame pic 
)

Definition at line 363 of file libavcodec/utils.c.

Referenced by avcodec_get_context_defaults2().

void avcodec_align_dimensions ( AVCodecContext s,
int *  width,
int *  height 
)

Definition at line 158 of file libavcodec/utils.c.

Referenced by avcodec_default_get_buffer().

int avcodec_check_dimensions ( void *  av_log_ctx,
unsigned int  w,
unsigned int  h 
)

enum PixelFormat avcodec_default_get_format ( struct AVCodecContext s,
const enum PixelFormat fmt 
)

Definition at line 405 of file libavcodec/utils.c.

Referenced by avcodec_get_context_defaults2().

int avcodec_thread_init ( AVCodecContext s,
int  thread_count 
)

void avcodec_thread_free ( AVCodecContext s  ) 

Free what has been allocated by avcodec_thread_init().

Must be called after decoding has finished, especially do not call while avcodec_thread_execute() is running.

Free what has been allocated by avcodec_thread_init().

must be called after decoding has finished, especially do not call while avcodec_thread_execute() is running

Definition at line 78 of file beosthread.c.

Referenced by avcodec_close(), avcodec_thread_init(), and NuppelVideoRecorder::KillChildren().

int avcodec_thread_execute ( AVCodecContext s,
int(*)(AVCodecContext *c2, void *arg2)  func,
void **  arg,
int *  ret,
int  count 
)

Definition at line 95 of file beosthread.c.

Referenced by avcodec_thread_init().

int avcodec_default_execute ( AVCodecContext c,
int(*)(AVCodecContext *c2, void *arg2)  func,
void **  arg,
int *  ret,
int  count 
)

Definition at line 395 of file libavcodec/utils.c.

Referenced by avcodec_get_context_defaults2().

int avcodec_open ( AVCodecContext avctx,
AVCodec codec 
)

attribute_deprecated int avcodec_decode_audio ( AVCodecContext avctx,
int16_t samples,
int *  frame_size_ptr,
uint8_t *  buf,
int  buf_size 
)

int avcodec_decode_audio2 ( AVCodecContext avctx,
int16_t samples,
int *  frame_size_ptr,
uint8_t *  buf,
int  buf_size 
)

Decodes an audio frame from buf into samples.

The avcodec_decode_audio2() function decodes an audio frame from the input buffer buf of size buf_size. To decode it, it makes use of the audio codec which was coupled with avctx using avcodec_open(). The resulting decoded frame is stored in output buffer samples. If no frame could be decompressed, frame_size_ptr is zero. Otherwise, it is the decompressed frame size in bytes.

Warning:
You must set frame_size_ptr to the allocated size of the output buffer before calling avcodec_decode_audio2().

The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE larger than the actual read bytes because some optimized bitstream readers read 32 or 64 bits at once and could read over the end.

The end of the input buffer buf should be set to 0 to ensure that no overreading happens for damaged MPEG streams.

Note:
You might have to align the input buffer buf and output buffer samples. The alignment requirements depend on the CPU: On some CPUs it isn't necessary at all, on others it won't work at all if not aligned and on others it will work but it will have an impact on performance. In practice, the bitstream should have 4 byte alignment at minimum and all sample data should be 16 byte aligned unless the CPU doesn't need it (AltiVec and SSE do). If the linesize is not a multiple of 16 then there's no sense in aligning the start of the buffer to 16.
Parameters:
avctx the codec context
[out] samples the output buffer
[in,out] frame_size_ptr the output buffer size in bytes
[in] buf the input buffer
[in] buf_size the input buffer size in bytes
Returns:
On error a negative value is returned, otherwise the number of bytes used or zero if no frame could be decompressed.

Definition at line 956 of file libavcodec/utils.c.

Referenced by avcodec_decode_audio(), and try_decode_frame().

int avcodec_decode_video ( AVCodecContext avctx,
AVFrame picture,
int *  got_picture_ptr,
uint8_t *  buf,
int  buf_size 
)

Decodes a video frame from buf into picture.

The avcodec_decode_video() function decodes a video frame from the input buffer buf of size buf_size. To decode it, it makes use of the video codec which was coupled with avctx using avcodec_open(). The resulting decoded frame is stored in picture.

Warning:
The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE larger than the actual read bytes because some optimized bitstream readers read 32 or 64 bits at once and could read over the end.

The end of the input buffer buf should be set to 0 to ensure that no overreading happens for damaged MPEG streams.

Note:
You might have to align the input buffer buf and output buffer samples. The alignment requirements depend on the CPU: on some CPUs it isn't necessary at all, on others it won't work at all if not aligned and on others it will work but it will have an impact on performance. In practice, the bitstream should have 4 byte alignment at minimum and all sample data should be 16 byte aligned unless the CPU doesn't need it (AltiVec and SSE do). If the linesize is not a multiple of 16 then there's no sense in aligning the start of the buffer to 16.
Parameters:
avctx the codec context
[out] picture The AVFrame in which the decoded video frame will be stored.
[in] buf the input buffer
[in] buf_size the size of the input buffer in bytes
[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero.
Returns:
On error a negative value is returned, otherwise the number of bytes used or zero if no frame could be decompressed.

Definition at line 933 of file libavcodec/utils.c.

Referenced by MHIBitmap::CreateFromMPEG(), NuppelDecoder::DecodeFrame(), AvFormatDecoderPrivate::DecodeMPEG2Video(), AvFormatDecoder::GetFrame(), ThumbFinder::getFrameImage(), grabThumbnail(), H263Container::H263DecodeFrame(), H263Container::H263StopDecoder(), try_decode_frame(), and video_decode_example().

int avcodec_decode_subtitle ( AVCodecContext avctx,
AVSubtitle sub,
int *  got_sub_ptr,
const uint8_t *  buf,
int  buf_size 
)

Definition at line 993 of file libavcodec/utils.c.

Referenced by AvFormatDecoder::GetFrame().

int avcodec_parse_frame ( AVCodecContext avctx,
uint8_t **  pdata,
int *  data_size_ptr,
uint8_t *  buf,
int  buf_size 
)

int avcodec_encode_audio ( AVCodecContext avctx,
uint8_t *  buf,
int  buf_size,
const short *  samples 
)

Encodes an audio frame from samples into buf.

The avcodec_encode_audio() function encodes an audio frame from the input buffer samples. To encode it, it makes use of the audio codec which was coupled with avctx using avcodec_open(). The resulting encoded frame is stored in output buffer buf.

Note:
The output buffer should be at least FF_MIN_BUFFER_SIZE bytes large.
Parameters:
avctx the codec context
[out] buf the output buffer
[in] buf_size the output buffer size
[in] samples the input buffer containing the samples
Returns:
On error a negative value is returned, on succes zero or the number of bytes used from the input buffer.

Definition at line 890 of file libavcodec/utils.c.

Referenced by audio_encode_example(), AudioOutputDigitalEncoder::Encode(), and encode_mp2_audio().

int avcodec_encode_video ( AVCodecContext avctx,
uint8_t *  buf,
int  buf_size,
const AVFrame pict 
)

Encodes a video frame from pict into buf.

The avcodec_encode_video() function encodes a video frame from the input pict. To encode it, it makes use of the video codec which was coupled with avctx using avcodec_open(). The resulting encoded bytes representing the frame are stored in the output buffer buf. The input picture should be stored using a specific format, namely avctx.pix_fmt.

Parameters:
avctx the codec context
[out] buf the output buffer for the bitstream of encoded frame
[in] buf_size the size of the output buffer in bytes
[in] pict the input picture to encode
Returns:
On error a negative value is returned, on success zero or the number of bytes used from the input buffer.

Definition at line 905 of file libavcodec/utils.c.

Referenced by MPEG2fixup::BuildFrame(), estimate_best_b_count(), H263Container::H263EncodeFrame(), H263Container::H263ForceIFrame(), H263Container::H263StopEncoder(), video_encode_example(), and NuppelVideoRecorder::WriteVideo().

int avcodec_encode_subtitle ( AVCodecContext avctx,
uint8_t *  buf,
int  buf_size,
const AVSubtitle sub 
)

Definition at line 924 of file libavcodec/utils.c.

int avcodec_close ( AVCodecContext avctx  ) 

void avcodec_register_all ( void   ) 

Register all the codecs, parsers and bitstream filters which were enabled at configuration time.

If you do not call this function you can select exactly which formats you want to support, by using the individual registration functions.

See also:
register_avcodec

av_register_codec_parser

av_register_bitstream_filter

Definition at line 54 of file allcodecs.c.

Referenced by av_register_all(), H263Container::H263Container(), main(), NuppelDecoder::NuppelDecoder(), and NuppelVideoRecorder::NuppelVideoRecorder().

void avcodec_flush_buffers ( AVCodecContext avctx  ) 

Flush buffers, should be called when seeking or when switching to a different stream.

Definition at line 1270 of file libavcodec/utils.c.

Referenced by grabThumbnail(), NuppelDecoder::SeekReset(), AvFormatDecoder::SeekReset(), and ThumbFinder::seekToFrame().

void avcodec_default_free_buffers ( AVCodecContext s  ) 

Definition at line 1276 of file libavcodec/utils.c.

Referenced by avcodec_close(), and MPV_common_end().

char av_get_pict_type_char ( int  pict_type  ) 

Returns a single letter to describe the given picture type pict_type.

Parameters:
[in] pict_type the picture type
Returns:
A single character representing the picture type.

Definition at line 1293 of file libavcodec/utils.c.

Referenced by decode_mb_cavlc(), decode_slice_header(), ff_rate_estimate_qscale(), flv_h263_decode_picture_header(), show_pict_info(), and svq3_decode_frame().

int av_get_bits_per_sample ( enum CodecID  codec_id  ) 

Returns codec bits per sample.

Parameters:
[in] codec_id the codec
Returns:
Number of bits per sample or zero if unknown for the given codec.

Definition at line 1305 of file libavcodec/utils.c.

Referenced by aiff_write_header(), av_find_stream_info(), get_aiff_header(), get_audio_frame_size(), mkv_write_tracks(), mov_read_stsd(), mov_write_header(), pcm_decode_frame(), pcm_read_seek(), and voc_get_packet().

int av_get_bits_per_sample_format ( enum SampleFormat  sample_fmt  ) 

Returns sample format bits per sample.

Parameters:
[in] sample_fmt the sample format
Returns:
Number of bits per sample or zero if unknown for the given sample format.

Definition at line 1340 of file libavcodec/utils.c.

Referenced by mkv_write_tracks().

void av_register_codec_parser ( AVCodecParser parser  ) 

Definition at line 27 of file parser.c.

AVCodecParserContext* av_parser_init ( int  codec_id  ) 

Definition at line 33 of file parser.c.

Referenced by av_find_stream_info(), av_read_frame_internal(), and remove_extradata().

int av_parser_parse ( AVCodecParserContext s,
AVCodecContext avctx,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t *  buf,
int  buf_size,
int64_t  pts,
int64_t  dts 
)

Parameters:
buf input
buf_size input length, to signal EOF, this should be 0 (so that the last frame can be output)
pts input presentation timestamp
dts input decoding timestamp
poutbuf will contain a pointer to the first byte of the output frame
poutbuf_size will contain the length of the output frame
Returns:
the number of bytes of the input bitstream used
Example:
   while(in_len){
       len = av_parser_parse(myparser, AVCodecContext, &data, &size,
                                       in_data, in_len,
                                       pts, dts);
       in_data += len;
       in_len  -= len;

       if(size)
          decode_frame(data, size);
   }

Definition at line 98 of file parser.c.

Referenced by av_read_frame_internal().

int av_parser_change ( AVCodecParserContext s,
AVCodecContext avctx,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t *  buf,
int  buf_size,
int  keyframe 
)

Returns:
0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
Deprecated:
use AVBitstreamFilter

Definition at line 177 of file parser.c.

void av_parser_close ( AVCodecParserContext s  ) 

void av_register_bitstream_filter ( AVBitStreamFilter bsf  ) 

Definition at line 25 of file bitstream_filter.c.

AVBitStreamFilterContext* av_bitstream_filter_init ( const char *  name  ) 

Definition at line 30 of file bitstream_filter.c.

int av_bitstream_filter_filter ( AVBitStreamFilterContext bsfc,
AVCodecContext avctx,
const char *  args,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t *  buf,
int  buf_size,
int  keyframe 
)

Definition at line 53 of file bitstream_filter.c.

void av_bitstream_filter_close ( AVBitStreamFilterContext bsf  ) 

Definition at line 45 of file bitstream_filter.c.

void* av_fast_realloc ( void *  ptr,
unsigned int *  size,
unsigned int  min_size 
)

attribute_deprecated void av_free_static ( void   ) 

Frees all static arrays and resets their pointers to 0.

Call this function to release all statically allocated tables.

Deprecated:
. Code which uses av_free_static is broken/misdesigned and should correctly use static arrays

Definition at line 106 of file libavcodec/utils.c.

Referenced by do_free().

attribute_deprecated void* av_mallocz_static ( unsigned int  size  ) 

Allocation of static arrays.

Warning:
Do not use for normal allocation.
Parameters:
[in] size The amount of memory you need in bytes.
Returns:
block of memory of the requested size
Deprecated:
. Code which uses av_mallocz_static is broken/misdesigned and should correctly use static arrays

Definition at line 76 of file libavcodec/utils.c.

Referenced by ff_realloc_static(), init_2d_vlc_rl(), init_crcs(), and init_vlc_rl().

void av_picture_copy ( AVPicture dst,
const AVPicture src,
int  pix_fmt,
int  width,
int  height 
)

Copy image 'src' to 'dst'.

Definition at line 808 of file imgconvert.c.

Referenced by avcodec_default_reget_buffer(), copy_frame(), img_convert(), img_copy(), qtrle_encode_frame(), roq_decode_frame(), and sws_scale().

int av_picture_crop ( AVPicture dst,
const AVPicture src,
int  pix_fmt,
int  top_band,
int  left_band 
)

Crop image top and left side.

Definition at line 2224 of file imgconvert.c.

Referenced by img_crop().

int av_picture_pad ( AVPicture dst,
const AVPicture src,
int  height,
int  width,
int  pix_fmt,
int  padtop,
int  padbottom,
int  padleft,
int  padright,
int *  color 
)

Pad image.

Definition at line 2246 of file imgconvert.c.

Referenced by img_pad().

attribute_deprecated void img_copy ( AVPicture dst,
const AVPicture src,
int  pix_fmt,
int  width,
int  height 
)

Deprecated:
Use the software scaler (swscale) instead.

Definition at line 2307 of file imgconvert.c.

Referenced by pgm_convolve_radial(), and pgm_overlay().

attribute_deprecated int img_crop ( AVPicture dst,
const AVPicture src,
int  pix_fmt,
int  top_band,
int  left_band 
)

Deprecated:
Use the software scaler (swscale) instead.

Definition at line 2313 of file imgconvert.c.

attribute_deprecated int img_pad ( AVPicture dst,
const AVPicture src,
int  height,
int  width,
int  pix_fmt,
int  padtop,
int  padbottom,
int  padleft,
int  padright,
int *  color 
)

Deprecated:
Use the software scaler (swscale) instead.

Definition at line 2319 of file imgconvert.c.

unsigned int av_xiphlacing ( unsigned char *  s,
unsigned int  v 
)

void avcodec_default_decode_cc_dvd ( AVCodecContext c,
const uint8_t *  buf,
int  buf_size 
)

Definition at line 409 of file libavcodec/utils.c.

Referenced by avcodec_get_context_defaults2().

void avcodec_default_decode_cc_atsc ( AVCodecContext c,
const uint8_t *  buf,
int  buf_size 
)

codec_id_string ( enum CodecID  codec_id  ) 

codec_type_string ( enum CodecType  codec_type  ) 

returns a human readable string for the CodecType enum.

Definition at line 214 of file myth_utils.c.

Referenced by AvFormatDecoder::GetFrame(), AvFormatDecoder::InitVideoCodec(), mpegts_add_stream(), and AvFormatDecoder::ScanStreams().

int av_parse_video_frame_size ( int *  width_ptr,
int *  height_ptr,
const char *  str 
)

Parses str and put in width_ptr and height_ptr the detected values.

Returns:
0 in case of a successful parsing, a negative value otherwise
Parameters:
[in] str the string to parse: it has to be a string in the format <width>x<height> or a valid video frame size abbreviation.
[in,out] width_ptr pointer to the variable which will contain the detected frame width value
[in,out] height_ptr pointer to the variable which will contain the detected frame height value

Definition at line 1472 of file libavcodec/utils.c.

Referenced by parse_image_size().

int av_parse_video_frame_rate ( AVRational frame_rate,
const char *  str 
)

Parses str and put in frame_rate the detected values.

Returns:
0 in case of a successful parsing, a negative value otherwise
Parameters:
[in] str the string to parse: it has to be a string in the format <frame_rate_nom>/<frame_rate_den>, a float number or a valid video rate abbreviation
[in,out] frame_rate pointer to the AVRational which will contain the detected frame rate

Definition at line 1500 of file libavcodec/utils.c.

Referenced by parse_frame_rate().


Variable Documentation

Definition at line 127 of file libavcodec/utils.c.

Referenced by AvFormatDecoder::ScanStreams().

Definition at line 25 of file parser.c.


Generated on Sat Dec 18 05:15:50 2010 for MythTV by  doxygen 1.5.5