summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAge
* libavcodec: Handle param change side data in avcodec_decode_video2, tooMartin Storsjö2012-01-07
| | | | | | Also call avcodec_set_dimensions on dimension param change packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavcodec: Move apply_param_change up above avcodec_decode_video2Martin Storsjö2012-01-07
| | | | | | This is in preparation to calling it from avcodec_decode_video2. Signed-off-by: Martin Storsjö <martin@martin.st>
* threads: set thread_count to 1 when thread support is disabledJanne Grunau2012-01-01
|
* lavc: add format field to AVFrameStefano Sabatini2011-12-25
| | | | | | The format is a per-frame property, having it in AVFrame simplify the operation of extraction of that information, since avoids the need to access the codec/stream context.
* lavc: add width and height fields to AVFrameStefano Sabatini2011-12-25
| | | | | | width and height are per-frame properties, setting these values in AVFrame simplify the operation of extraction of that information, since avoids the need to check the codec/stream context.
* lavc: add a sample_aspect_ratio field to AVFrameStefano Sabatini2011-12-25
| | | | | | | The sample aspect ratio is a per-frame property, so it makes sense to define it in AVFrame rather than in the codec/stream context. Simplify application-level sample aspect ratio information extraction, and allow further simplifications.
* libavcodec: Apply parameter change side data when decoding audioMartin Storsjö2011-12-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: always align height by 32 pixelRafaël Carré2011-12-21
| | | | | | | | Interlaced content for most codec requires it. This patch is a stop-gap pending a serious rework to support codecs with non 16 pixel macroblocks. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec: deprecate AVFrame.ageMans Rullgard2011-12-18
| | | | | | | | This was intended as an optimisation for skipped blocks in MPEG2 P-frames and never used elsewhere. Removing this "optimisation" speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9). Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavc: avoid invalid memcpy() in avcodec_default_release_buffer()Mans Rullgard2011-12-11
| | | | | | | | | | When the buf and last pointers are equal, the FFSWAP() results in an invalid call to memcpy() with same source and destination on some targets. Although assigning a struct to itself is valid C99, gcc does not check for this before calling memcpy(). See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667 Signed-off-by: Mans Rullgard <mans@mansr.com>
* g722: Change bits per sample to 4Sjoerd Simons2011-12-05
| | | | | | | | | | | | | | | Earlier, bits per sample was defined as 8, since bits_per_coded_sample was used to indicate whether to ignore the lower bits of the codeword, having values 6, 7 or 8. g722 encodes 2 samples into one byte codeword, therefore the bits per sample is 4. By changing this, the generated timestamps for streams encoded with g722 become correct. This makes timestamp generation for g722 data correct (both when encoding and when demuxing from raw g722 files). Signed-off-by: Martin Storsjö <martin@martin.st>
* Add avcodec_decode_audio4().Justin Ruggles2011-12-02
| | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
* avcodec: change number of plane pointers from 4 to 8 at next major bump.Justin Ruggles2011-12-02
| | | | | | Add AV_NUM_DATA_POINTERS to simplify the bump transition. This will allow for supporting more planar audio channels without having to allocate separate pointer arrays.
* h264: add support for decoding planar RGB images.Ronald S. Bultje2011-11-24
|
* avcodec: move some AVCodecContext fields to an internal struct.Justin Ruggles2011-11-19
| | | | | | | | A new field, AVCodecContext.internal is used to hold a new struct AVCodecInternal, which has private fields that are not codec-specific and are used by general libavcodec functions. Moved internal_buffer, internal_buffer_count, and is_copy.
* avcodec: Allow locking and unlocking an avformat specific mutexMartin Storsjö2011-11-05
| | | | | | | This extends the lock manager in avcodec to manage two separate mutexes via the user-specified lock functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: translate non-flag-based er options into flag-based ef options at ↵Dustin Brody2011-10-22
| | | | | | codec open Signed-off-by: Anton Khirnov <anton@khirnov.net>
* sws/pixfmt/pixdesc: add support for yuv420p9le/be.Ronald S. Bultje2011-10-21
|
* lavc: use avpriv_ prefix for ff_toupper4.Anton Khirnov2011-10-20
| | | | It's used in lavf.
* w32threads: support for frame multithreadingSteven Walters2011-10-16
| | | | | | | | Replace our incomplete w32threads implementation with x264's pthreads w32threads wrapper. Relicensed to LGPL with kind permission by Pegasys Inc. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* libx264: support 9- and 10-bit output.Anton Khirnov2011-10-06
|
* avcodec: reject audio packets with NULL data and non-zero sizeJustin Ruggles2011-09-30
| | | | | | | There is no valid reason the user should ever send such packets in the first place, but the documentation for CODEC_CAP_DELAY states that the codec is guaranteed not to get a NULL packet unless that capability is set. That isn't true without preventing this case.
* adpcmenc: Set bits_per_coded_sampleJustin Ruggles2011-09-23
|
* lavc/utils: move avcodec_init() higher in the file.Anton Khirnov2011-09-21
| | | | Fixes build on next major bump.
* lavc: add avcodec_get_type() for mapping codec_id -> type.Anton Khirnov2011-08-16
|
* lavc: fix parentheses placement in avcodec_open2().Baptiste Coudurier2011-08-10
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: make avcodec_init() static on next bump.Anton Khirnov2011-08-10
| | | | | It's called from avcodec_register() anyway, so there's no reason for it to be public.
* vp8/mt: flush worker thread, not application thread context, on seek.Ronald S. Bultje2011-07-10
| | | | This prevents a crash when seeking.
* lavc: introduce avcodec_open2() as a replacement for avcodec_open().Anton Khirnov2011-07-10
| | | | | Adds support for decoder-private options and makes setting other options simpler.
* Do not include mathematics.h in avutil.hMans Rullgard2011-07-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add new yuv444 pixfmts to avcodec_align_dimensions2Jason Garrett-Glaser2011-06-29
| | | | Fixes draw_edges crashes with high-bit-depth 4:4:4 decoding.
* avutil: Remove unused arbitrary precision integer code.Diego Biurrun2011-06-28
|
* Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().Justin Ruggles2011-06-20
| | | | av_get_bits_per_sample_fmt() is deprecated.
* utils.c: fix crash with threading enabled.Ronald S. Bultje2011-06-06
|
* lavf,lavc: free avoptions in a generic way.Anton Khirnov2011-06-05
| | | | | | It's simpler and less error-prone. Fixes some memleaks along the way.
* Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().Stefano Sabatini2011-06-03
| | | | | This fixes warnings about avcodec_get_pix_fmt_name() being deprecated. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* H264/MPEG frame-level multi-threading.Alexander Strange2011-06-02
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: extend YUV422p support to 10bits depthBaptiste Coudurier2011-05-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Add the notion of pixel size in h264 related functions.Oskar Arvidsson2011-05-10
| | | | | | | | | | In high bit depth the pixels will not be stored in uint8_t like in the normal case, but in uint16_t. The pixel size is thus 1 in normal bit depth and 2 in high bit depth. Preparatory patch for high bit depth h264 decoding support. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Add pixel formats for 9- and 10-bit yuv420p.Oskar Arvidsson2011-05-10
| | | | | | | | Also add support for these formats in libswscale. Needed for high bit depth h264 decoding. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Simplify av_log_missing_feature().Diego Biurrun2011-04-27
| | | | | Do not print the results of the conditional call to av_log_ask_for_sample() into the same line as the main output, separate the already long text.
* If AVCodecContext.channels is 0 and AVCodecContext.channel_layout isJustin Ruggles2011-04-27
| | | | | | non-zero, set channels based on channel_layout. This allows the user to set only channel_layout and not channels.
* If AVCodecContext.channel_layout and AVCodecContext.channels are bothJustin Ruggles2011-04-27
| | | | non-zero, check to make sure they do not contradict eachother.
* cosmetics: indentationJustin Ruggles2011-04-27
|
* Check AVCodec.supported_samplerates and AVCodec.channel_layouts inJustin Ruggles2011-04-27
| | | | | | | avcodec_open(). If the encoder has a channel_layouts list and AVCodecContext.channel_layout is 0, then only print a warning and let the encoder decide how to handle it.
* lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enumsStefano Sabatini2011-04-26
| | | | | | | | | | | | Also deprecate av_get_pict_type_char() in favor of av_get_picture_type_char(). The new enum and av_get_picture_type_char() are defined in libavutil. This allows the use in libavfilter without the need to link against libavcodec. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Make av_log_ask_for_sample() accept a variable number of arguments.Diego Biurrun2011-04-22
|
* lavc: provide deprecated avcodec_thread_init until next major versionAnton Khirnov2011-04-21
| | | | It was deprecated only recently.
* In avcodec_open(), set return code to an error value only when an error occursJustin Ruggles2011-04-19
| | | | | | | | | instead of unconditionally at the start of the function. This fixes a bug where a successful call to ff_thread_init() masks errors that occur after that point in the function. It also makes future bugs like this less likely since the error code is now set near to the point in the code where the error is found.
* lavc: remove misc disabled cruft.Anton Khirnov2011-04-19
|