Definition in file avcodec.h.
Go to the source code of this file.
typedef struct ImgReSampleContext ImgReSampleContext attribute_deprecated [read] |
| typedef struct ReSampleContext ReSampleContext |
| 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.
| enum CodecType |
| enum SampleFormat |
| enum Motion_Est_ID |
| enum AVDiscard |
| 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.
| 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 |
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
| compensation_distance | distance in output samples over which the compensation should be performed | |
| sample_delta | number of output samples which should be output less |
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 | ) |
| attribute_deprecated ImgReSampleContext* img_resample_init | ( | int | output_width, | |
| int | output_height, | |||
| int | input_width, | |||
| int | input_height | |||
| ) |
Definition at line 427 of file imgresample.c.
Referenced by NuppelVideoPlayer::DisplayNormalFrame(), VideoOutput::DoPipResize(), VideoOutput::DoVideoResize(), main(), VideoOutputXv::PrepareFrameMem(), sws_getContext(), and Transcode::TranscodeFile().
| 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 | |||
| ) |
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 | |||
| ) |
Definition at line 487 of file imgresample.c.
Referenced by NuppelVideoPlayer::DisplayNormalFrame(), VideoOutputXv::PrepareFrameMem(), VideoOutput::ResizeVideo(), VideoOutput::ShowPip(), VideoOutputIvtv::ShowPip(), sws_scale(), and Transcode::TranscodeFile().
| attribute_deprecated void img_resample_close | ( | struct ImgReSampleContext * | s | ) |
Definition at line 509 of file imgresample.c.
Referenced by main(), VideoOutputXv::PrepareFrameMem(), VideoOutput::ShutdownPipResize(), VideoOutput::ShutdownVideoResize(), NuppelVideoPlayer::ShutdownYUVResize(), sws_freeContext(), and Transcode::TranscodeFile().
| int avpicture_alloc | ( | AVPicture * | picture, | |
| int | pix_fmt, | |||
| int | width, | |||
| int | height | |||
| ) |
Allocate memory for a picture.
Call avpicture_free to free it.
| 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 |
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 | ) |
Free a picture previously allocated by avpicture_alloc().
| picture | the AVPicture to be freed |
Definition at line 2211 of file imgconvert.c.
Referenced by TemplateFinder::finished(), img_convert(), TemplateMatcher::nuppelVideoPlayerInited(), TemplateFinder::nuppelVideoPlayerInited(), qtrle_encode_end(), readTemplate(), TemplateFinder::resetBuffers(), CannyEdgeDetector::resetBuffers(), template_alloc(), CannyEdgeDetector::~CannyEdgeDetector(), PGMConverter::~PGMConverter(), TemplateFinder::~TemplateFinder(), and TemplateMatcher::~TemplateMatcher().
| 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.
| 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 |
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 | |||
| ) |
| 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.
| pix_fmt | the given picture format | |
| width | the width of the image | |
| height | the height of the image |
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 | |||
| ) |
Definition at line 384 of file imgconvert.c.
Referenced by avcodec_default_get_buffer(), encode_init(), ff_print_debug_info(), load_input_picture(), MPV_common_init(), MPV_encode_init(), and yuv4_write_packet().
| const char* avcodec_get_pix_fmt_name | ( | int | pix_fmt | ) |
| void avcodec_set_dimensions | ( | AVCodecContext * | s, | |
| int | width, | |||
| int | height | |||
| ) |
Definition at line 138 of file libavcodec/utils.c.
Referenced by av_mpeg4_decode_header(), avcodec_open(), decode_frame(), dnxhd_decode_frame(), dvvideo_decode_frame(), ff_h263_decode_frame(), ff_mjpeg_decode_sof(), gif_decode_frame(), h261_decode_frame(), mpeg_decode_postinit(), mpegvideo_extract_headers(), ptx_decode_frame(), theora_decode_header(), theora_header(), tiff_decode_tag(), txd_decode_frame(), vp56_init(), vp5_parse_header(), and vp6_parse_header().
| 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.
| [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. |
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);
| [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. |
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.
| [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.
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 | |||
| ) |
convert among pixel formats
Definition at line 2329 of file imgconvert.c.
Referenced by MHIBitmap::CreateFromMPEG(), NuppelDecoder::DecodeFrame(), AvFormatDecoder::GetFrame(), ThumbFinder::getFrameImage(), NuppelVideoPlayer::GetScreenGrabAtFrame(), grabThumbnail(), img_convert(), pgm_fill(), VideoOutputDX::PrepareFrame(), VideoOutputD3D::PrepareFrame(), VideoOutputXv::PrepareFrameMem(), Webcam::ProcessFrame(), sws_scale(), and OpenGLVideo::UpdateInputFrame().
| int avpicture_deinterlace | ( | AVPicture * | dst, | |
| const AVPicture * | src, | |||
| int | pix_fmt, | |||
| int | width, | |||
| int | height | |||
| ) |
Definition at line 2819 of file imgconvert.c.
Referenced by ThumbFinder::getFrameImage(), NuppelVideoPlayer::GetScreenGrabAtFrame(), and grabThumbnail().
| 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.
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.
Finds a registered encoder with a matching codec ID.
| id | CodecID of the requested encoder |
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.
| name | name of the requested encoder |
Definition at line 1039 of file libavcodec/utils.c.
Referenced by NuppelVideoRecorder::SetupAVCodecVideo().
Finds a registered decoder with a matching codec ID.
| id | CodecID of the requested decoder |
Definition at line 1051 of file libavcodec/utils.c.
Referenced by audio_decode_example(), avcodec_string(), MHIBitmap::CreateFromMPEG(), grabThumbnail(), H263Container::H263StartDecoder(), NuppelDecoder::InitAVCodecAudio(), NuppelDecoder::InitAVCodecVideo(), avfDecoder::initialize(), AvFormatDecoder::InitVideoCodec(), AvFormatDecoder::ScanStreams(), sdp_parse_rtpmap(), try_decode_frame(), and video_decode_example().
| AVCodec* avcodec_find_decoder_by_name | ( | const char * | name | ) |
Finds a registered decoder with the specified name.
| name | name of the requested decoder |
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.
| 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 | ) |
Allocates an AVCodecContext and sets its fields to default values.
The resulting struct can be deallocated by simply calling av_free().
Definition at line 818 of file libavcodec/utils.c.
Referenced by audio_decode_example(), audio_encode_example(), av_new_stream(), MPEG2fixup::BuildFrame(), MHIBitmap::CreateFromMPEG(), encode_mp2_audio(), estimate_best_b_count(), H263Container::H263StartDecoder(), H263Container::H263StartEncoder(), AudioOutputDigitalEncoder::Init(), NuppelDecoder::InitAVCodecAudio(), NuppelDecoder::InitAVCodecVideo(), main(), new_pes_av_stream(), new_section_av_stream(), NuppelVideoRecorder::SetupAVCodecVideo(), video_decode_example(), and video_encode_example().
| 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.
| 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 | ) |
Allocates an AVFrame and sets its fields to default values.
The resulting struct can be deallocated by simply calling av_free().
Definition at line 829 of file libavcodec/utils.c.
Referenced by AC3_encode_init(), adpcm_encode_init(), adx_encode_init(), amr_nb_encode_init(), amr_wb_encode_init(), MPEG2fixup::BuildFrame(), MHIBitmap::CreateFromMPEG(), encode_init(), Faac_encode_init(), flac_encode_init(), g726_init(), grabThumbnail(), H263Container::H263StartDecoder(), libgsm_init(), MP3lame_encode_init(), MPA_encode_init(), oggvorbis_encode_init(), pcm_encode_init(), roq_dpcm_encode_init(), sonic_encode_init(), video_decode_example(), video_encode_example(), and vorbis_encode_init().
| int avcodec_default_get_buffer | ( | AVCodecContext * | s, | |
| AVFrame * | pic | |||
| ) |
Definition at line 223 of file libavcodec/utils.c.
Referenced by avcodec_get_context_defaults2(), and AvFormatDecoder::InitVideoCodec().
| void avcodec_default_release_buffer | ( | AVCodecContext * | s, | |
| AVFrame * | pic | |||
| ) |
Definition at line 337 of file libavcodec/utils.c.
Referenced by avcodec_get_context_defaults2(), AvFormatDecoder::InitVideoCodec(), and release_avf_buffer().
| 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.
| [in] | w | Width of the picture. |
| [in] | h | Height of the picture. |
Definition at line 215 of file libavcodec/utils.c.
Referenced by avcodec_decode_video(), avcodec_default_get_buffer(), avcodec_encode_video(), avcodec_open(), avpicture_fill(), codec_reinit(), decode_frame(), decode_init(), decode_seq_parameter_set(), dnxhd_decode_frame(), encode_init(), ff_mjpeg_decode_sof(), ff_pnm_decode_header(), flashsv_encode_init(), flv_h263_decode_picture_header(), gif_decode_frame(), iv_decode_frame(), mm_decode_init(), MPV_common_init(), ptx_decode_frame(), qtrle_encode_init(), roq_encode_init(), rv20_decode_picture_header(), theora_decode_header(), tiff_decode_tag(), txd_decode_frame(), vqa_decode_init(), and xan_decode_init().
| enum PixelFormat avcodec_default_get_format | ( | struct AVCodecContext * | s, | |
| const enum PixelFormat * | fmt | |||
| ) |
| int avcodec_thread_init | ( | AVCodecContext * | s, | |
| int | thread_count | |||
| ) |
Definition at line 120 of file beosthread.c.
Referenced by AvFormatDecoder::ScanStreams(), and NuppelVideoRecorder::SetupAVCodecVideo().
| 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 | |||
| ) |
| int avcodec_default_execute | ( | AVCodecContext * | c, | |
| int(*)(AVCodecContext *c2, void *arg2) | func, | |||
| void ** | arg, | |||
| int * | ret, | |||
| int | count | |||
| ) |
| int avcodec_open | ( | AVCodecContext * | avctx, | |
| AVCodec * | codec | |||
| ) |
Initializes the AVCodecContext to use the given AVCodec.
Prior to using this function the context has to be allocated.
The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(), avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for retrieving a codec.
avcodec_register_all(); codec = avcodec_find_decoder(CODEC_ID_H264); if (!codec) exit(1); context = avcodec_alloc_context(); if (avcodec_open(context, codec) < 0) exit(1);
| avctx | The context which will be set up to use the given codec. | |
| codec | The codec to use within the context. |
Definition at line 839 of file libavcodec/utils.c.
Referenced by audio_decode_example(), audio_encode_example(), MPEG2fixup::BuildFrame(), MHIBitmap::CreateFromMPEG(), encode_mp2_audio(), estimate_best_b_count(), grabThumbnail(), H263Container::H263ForceIFrame(), H263Container::H263StartDecoder(), H263Container::H263StartEncoder(), AudioOutputDigitalEncoder::Init(), NuppelDecoder::InitAVCodecAudio(), NuppelDecoder::InitAVCodecVideo(), avfDecoder::initialize(), AvFormatDecoder::ScanStreams(), NuppelVideoRecorder::SetupAVCodecVideo(), try_decode_frame(), video_decode_example(), and video_encode_example().
| attribute_deprecated int avcodec_decode_audio | ( | AVCodecContext * | avctx, | |
| int16_t * | samples, | |||
| int * | frame_size_ptr, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) |
Definition at line 985 of file libavcodec/utils.c.
Referenced by audio_decode_example(), NuppelDecoder::GetFrame(), AvFormatDecoder::GetFrame(), and avfDecoder::run().
| 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.
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.
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.| 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 |
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.
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.
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.| 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. |
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 | |||
| ) |
| 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.
FF_MIN_BUFFER_SIZE bytes large.| avctx | the codec context | |
| [out] | buf | the output buffer |
| [in] | buf_size | the output buffer size |
| [in] | samples | the input buffer containing the samples |
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.
| 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 |
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 | ) |
Definition at line 1007 of file libavcodec/utils.c.
Referenced by audio_decode_example(), audio_encode_example(), av_find_stream_info(), av_remove_stream(), MPEG2fixup::BuildFrame(), ThumbFinder::closeAVCodec(), NuppelDecoder::CloseAVCodecAudio(), NuppelDecoder::CloseAVCodecVideo(), AvFormatDecoder::CloseCodecs(), MHIBitmap::CreateFromMPEG(), AudioOutputDigitalEncoder::Dispose(), encode_mp2_audio(), estimate_best_b_count(), grabThumbnail(), H263Container::H263ForceIFrame(), H263Container::H263StopDecoder(), H263Container::H263StopEncoder(), NuppelVideoRecorder::SetupAVCodecVideo(), video_decode_example(), video_encode_example(), and NuppelVideoRecorder::~NuppelVideoRecorder().
| 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.
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.
| [in] | pict_type | 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.
| [in] | codec_id | the 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.
| [in] | sample_fmt | the sample format |
Definition at line 1340 of file libavcodec/utils.c.
Referenced by mkv_write_tracks().
| void av_register_codec_parser | ( | AVCodecParser * | parser | ) |
| 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 | |||
| ) |
| 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 |
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 | |||
| ) |
| void av_parser_close | ( | AVCodecParserContext * | s | ) |
Definition at line 210 of file parser.c.
Referenced by av_bitstream_filter_close(), av_close_input_file(), av_estimate_timings_from_pts(), and av_read_frame_flush().
| 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 | |||
| ) |
Reallocates the given block if it is not large enough, otherwise it does nothing.
Definition at line 62 of file libavcodec/utils.c.
Referenced by allocate_buffers(), av_add_index_entry(), av_mallocz_static(), avcodec_default_get_buffer(), decode_frame(), decode_i_frame(), decode_nal(), decode_p_frame(), ff_combine_frame(), ff_h263_decode_frame(), flac_decode_frame(), read_frame(), and shorten_decode_frame().
| 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.
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.
| [in] | size | The amount of memory you need in bytes. |
Definition at line 76 of file libavcodec/utils.c.
Referenced by ff_realloc_static(), init_2d_vlc_rl(), init_crcs(), and init_vlc_rl().
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().
| attribute_deprecated void img_copy | ( | AVPicture * | dst, | |
| const AVPicture * | src, | |||
| int | pix_fmt, | |||
| int | width, | |||
| int | height | |||
| ) |
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 | |||
| ) |
| 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 | |||
| ) |
Definition at line 1362 of file libavcodec/utils.c.
Referenced by fixup_vorbis_headers(), oggvorbis_encode_init(), and put_main_header().
| 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 | |||
| ) |
| codec_id_string | ( | enum CodecID | codec_id | ) |
returns a human readable string for the CodecID enum.
Definition at line 32 of file myth_utils.c.
Referenced by AvFormatDecoder::GetFrame(), AudioOutputDigitalEncoder::Init(), AvFormatDecoder::InitVideoCodec(), mpegts_add_stream(), AudioOutputBase::Reconfigure(), AvFormatDecoder::ScanStreams(), and AudioInfo::toString().
| 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.
| [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.
| [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().
1.5.5