Commit Graph

575 Commits

Author SHA1 Message Date
Vittorio Giovara f134b5ec53 apichanges: fill in changes for lavu 51.19 and 51.20 2014-06-28 01:50:17 -04:00
Justin Ruggles 9e500efdbe Add av_image_check_sar() and use it to validate SAR 2014-06-20 10:39:33 -04:00
Anton Khirnov 874390e163 lavc: add a convenience function for rescaling timestamps in a packet 2014-06-20 14:14:11 +02:00
Anton Khirnov 194be1f43e lavf: switch to AVStream.time_base as the hint for the muxer timebase
Previously, AVStream.codec.time_base was used for that purpose, which
was quite confusing for the callers. This change also opens the path for
removing AVStream.codec.

The change in the lavf-mkv test is due to the native timebase (1/1000)
being used instead of the default one (1/90000), so the packets are now
sent to the crc muxer in the same order in which they are demuxed
(previously some of them got reordered because of inexact timestamp
conversion).
2014-06-18 15:12:34 +02:00
Anton Khirnov 0957b274e3 lavc: add an option to enable side data-only packets during encoding
Some encoders (e.g. flac) need to send side data when there is no more
data to be output. This enables them to output a packet with no data in
it, only side data.
2014-06-01 08:26:43 +02:00
wm4 8c02adc62d lavu: add all color-related enums to AVFrame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-01 08:22:02 +02:00
Luca Barbato b2d4565422 avresample: Add avresample_get_out_samples
Utility function to get the upper bound on the number of samples the
resampler would output.
2014-05-28 22:04:56 +02:00
Luca Barbato 6d212599aa avformat: Provide a standard compliance flag
Provide f_strict for avconv usage.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-05-28 22:04:56 +02:00
Vittorio Giovara 21f68c2489 avcodec: bump version after rotation api
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-05-23 17:50:38 +02:00
Janne Grunau c23c96b638 lavf: add av_stream_get_side_data 2014-05-20 00:43:52 +02:00
Vittorio Giovara bddd8cbf68 Add transformation matrix API.
Add AV_PKT_DATA_DISPLAYMATRIX and AV_FRAME_DATA_DISPLAYMATRIX as stream and
frame side data (respectively) to describe a display transformation matrix
for linear transformation operations on the decoded video.

Add functions to easily extract a rotation angle from a matrix and
conversely to setup a matrix for a given rotation angle.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-05-19 13:13:10 +02:00
Anton Khirnov a312f71090 lavf: deprecate now unused AVStream.pts 2014-05-19 07:14:24 +02:00
Anton Khirnov 968a62a9d9 doc/APIchanges: mark the release 10 branch point 2014-05-18 10:53:00 +02:00
Anton Khirnov 33082af756 doc/APIchanges: fill in missing hashes and dates 2014-05-18 10:52:41 +02:00
Anton Khirnov fd056029f4 lavc: add avcodec_free_context().
Right now, the caller has to manually manage some allocated
AVCodecContext fields, like extradata or subtitle_header. This is
fragile and prone to leaks, especially if we want to add more such
fields in the future.

The only reason for this behaviour is so that the AVStream codec context
can be reused for decoding. Such reuse is discouraged anyway, so this
commit is the first step to deprecating it.
2014-05-18 10:17:41 +02:00
Anton Khirnov 0c1959b056 lavf: add AVFMT_FLAG_BITEXACT.
Use it instead of checking CODEC_FLAG_BITEXACT in the first stream's
codec context.

Using codec options inside lavf is fragile and can easily break when the
muxing codec context is not the encoding context.
2014-05-15 07:42:07 +02:00
Anton Khirnov 66e6c8a7b4 lavu: Add a pixel format for new VDA hwaccel
The current hwaccel is broken and cannot be fixed in a compatible
way. It will be deprecated and replaced with a new one.
2014-05-11 14:59:59 +02:00
Anton Khirnov a2941c8cb2 lavc: move CODEC_FLAG_MV0 to mpegvideo 2014-05-01 09:24:18 +02:00
Anton Khirnov 6484149158 lavc: make the xvid-specific "gmc" flag a private option of libxvid 2014-05-01 09:24:02 +02:00
Anton Khirnov b2c31710c9 lavc: move CODEC_FLAG_NORMALIZE_AQP to mpegvideo 2014-05-01 09:23:19 +02:00
Anton Khirnov 5fccedaa67 lavc: deprecate CODEC_FLAG_INPUT_PRESERVED
The addition of reference-counted frames makes it pointless.
2014-05-01 09:22:47 +02:00
Hendrik Leppkes ed4b757177 dxva2_h264: add a workaround for old Intel GPUs
Old Intel GPUs expect the reference frame index to the actual surface,
instead of the index into RefFrameList as specified by the spec.

This workaround should be set when using one of the "ClearVideo" decoder
devices.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-28 20:21:59 +02:00
Derek Buitenhuis 502512ea0f avutil: Add av_get_time_base_q()
This fixes usage of AV_TIME_BASE_Q in C++ applications, which
cannot use compound literals directly in their code.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-04-22 16:32:35 -04:00
Alessandro Ghedini 0983d48111 crc: add ANSI CRC16 LE
This adds the reversed byte-order version of the ANSI CRC16.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-17 20:08:19 +02:00
Vittorio Giovara 8b17243d17 lavu: Add packed YVYU422 pixel format 2014-04-07 23:50:34 +02:00
Alessandro Ghedini 8542f9c4f1 replaygain: correctly parse peak values
According to the ReplayGain spec, the peak amplitude may overflow and may result
in peak amplitude values greater than 1.0 with psychoacoustically coded audio,
such as MP3. Fully compliant decoders must allow peak overflows.

Additionally, having peak values in the 0<->UINT32_MAX scale makes it more
difficult for applications to actually use the peak values (e.g. when
implementing clipping prevention) since values have to be rescaled down.

This patch corrects the peak parsing by removing the rescaling of the decoded
values between 0 and UINT32_MAX and the 1.0 upper limit.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-04 17:40:19 +02:00
Luca Barbato 7763118cae log: Support for 256color terminals
And provide extended coloring capabilities for debugging.
The default colors do not change in 256 more to keep
supporting people using Black on White, White on Black and
Solarized terminals.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-04-03 15:54:49 +02:00
Anton Khirnov d161ae0a37 frame: add a function for removing side data from a frame 2014-03-24 06:07:51 +01:00
Anton Khirnov 5a7e35dd23 Add replaygain side data type and code for parsing replaygain tags. 2014-03-24 06:07:51 +01:00
Anton Khirnov 25b3258656 lavf: add an AVStream field for exporting stream-global side data 2014-03-24 06:07:51 +01:00
Anton Khirnov 0e2c3ee9a3 lavc: give a typedeffed name to the AVPacket.side_data struct 2014-03-24 06:07:50 +01:00
Jean First 1481d24c3a RGBA64 pixel formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-03-16 23:05:47 +01:00
Vittorio Giovara 48d1ed9c83 doc: name correct header 2014-02-24 17:54:03 +01:00
Anton Khirnov 1155fd02ae frame: add a convenience function for copying AVFrame data 2014-02-24 07:25:07 +01:00
Anton Khirnov 7e86c27b4e lavr: add a function for checking whether AVAudioResampleContext is open 2014-02-22 20:52:36 +01:00
Anton Khirnov c3ecd968f0 AVOptions: add flags for read/read-only options 2014-02-19 21:52:17 +01:00
Anton Khirnov 6bb8720f00 AVOptions: deprecate unused AV_OPT_FLAG_METADATA
It was never used since it was added and the things it was intended for
are now exported differently.
2014-02-19 21:52:17 +01:00
Tim Walker c98f3169bf lavu: add AV_FRAME_DATA_DOWNMIX_INFO side data type. 2014-02-15 22:24:53 +01:00
Anton Khirnov cca4742a5e doc/APIchanges: mark the place where 9 was branched 2014-02-10 07:29:27 +01:00
Anton Khirnov d711d839ca doc/APIchanges: fill in missing hashes and dates 2014-02-10 07:29:27 +01:00
Luca Barbato d9ae1031f5 lavf: improve handling of sparse streams when muxing
Currently ff_interleave_packet_per_dts() waits until it gets a frame for
each stream before outputting packets in interleaved order.

Sparse streams (i.e. streams with much fewer packets than the other
streams, like subtitles or audio with DTX) tend to add up latency and in
specific cases end up allocating a large amount of memory.

Emit the top packet from the packet_buffer if it has a time delta
larger than a specified threshold.

Original report of the issue and initial proposed solution by
mus.svz@gmail.com.

Bug-id: 31
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-02-04 22:01:42 +01:00
Anton Khirnov 93c553c71e lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width(). 2014-01-20 12:52:28 +01:00
Tim Walker 5b4797a21d avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.
Includes a libavcodec utility function to update a frame's side data.
2014-01-05 16:41:56 +01:00
Tim Walker 5c437fb672 lavu: Add values for various Dolby flags to the AVMatrixEncoding enum. 2014-01-05 16:41:56 +01:00
Gildas Cocherel 2a41826bea lavc: add HEVC profiles names
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:35:27 +01:00
Reinhard Tartler 6d3ea1957f Bump major of libavfilter for reference counted buffer API changes.
Applications that have been linked against an older release of Libav and pick up
updated libraries experience segmentation faults because they pick up the new
libavfilter, which assumes AVFrames have been allocated by libavutil and thus
contain new reference-counting related fields. This will break for AVFrames that
have been allocated by old libavcodec.

All scheduled API changes are deferred to the next bump.
2013-12-14 16:31:32 -05:00
Reinhard Tartler 3bc2e89c76 Bump libavutil major version to account for the LLS API/ABI changes.
Commit 41578f70cf changed the LLS API, which was
called from libavcodec. Thus using an old libavcodec with a new libavutil will
break.

All scheduled API changes are deferred to the next bump.
2013-12-14 16:31:09 -05:00
Anton Khirnov d7b3ee9a3a lavc: deprecate avcodec_get_frame_defaults().
Also bump libavcodec micro and add an APIchanges entry saying that
av_frame_* should now be used instead of the lavc AVFrame functions.
2013-12-11 20:39:55 +01:00
Vittorio Giovara 7e244c6860 avframe: add codec-independent stereoscopic metadata 2013-12-09 16:02:43 +01:00
John Stebbins 1eaac1d6f7 mpeg12dec: Extract CC user data into frame side data
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-26 08:37:22 +01:00
Anton Khirnov cce3e0a49f Move av_fast_{m,re}alloc from lavc to lavu. 2013-11-14 09:42:22 +01:00
Anton Khirnov 8941971a8f lavc: make error_rate a private option of mpegvideo encoders 2013-11-14 09:39:43 +01:00
Anton Khirnov 728c465856 vdpau: add a constructor for AVVDPAUContext.
We will likely want to add new fields to it in the future, so this is
needed to avoid breaking ABI.
2013-11-14 09:38:58 +01:00
Anton Khirnov ca22d1dea2 vdpau: add a convenience function for getting a decoder profile.
Based on the code by Rémi Denis-Courmont <remi@remlab.net> from VLC.
2013-11-14 09:38:50 +01:00
Jan Ekström cd8f772d06 lavc: Add colorimetry values for BT.2020, other non-included ones
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-11-04 15:39:33 +01:00
John Stebbins 28096e0a80 h264: wait for initial complete frame before outputing frames
This can be optionally disabled whith the "output_corrupt" flags
option.  When in "output_corrupt" mode, incomplete frames are
signalled through AVFrame.flags FRAME_FLAG_INCOMPLETE_FRAME.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-31 20:14:14 +01:00
Anton Khirnov 0767bfd199 lavfi: allow user-provided execute() callbacks 2013-09-28 08:06:19 +02:00
Kieran Kunhya e208e6d209 lavu: Add interleaved 4:2:2 8/10-bit formats
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-21 17:36:15 +02:00
Luca Barbato c38854c399 doc: Add missing hashes and dates to APIChanges
Also fix the typo in the last entry version.
2013-09-17 13:31:54 +02:00
Luca Barbato 3feb3d6ce4 mem: Introduce av_reallocp 2013-09-16 19:36:37 +02:00
Luca Barbato 5a9a9d4a2a lavc: Add refcounted api to AVPacket
Provide a clean way to manipulate packets.
2013-08-10 13:41:35 +02:00
Rémi Denis-Courmont f824535a4a vdpau: deprecate bitstream buffers within the hardware context
The bitstream buffers are now private and freed by libavcodec. For
backward compatibility, the hold bitstream buffer pointer is left NULL
(applications were supposed to av_freep() it).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:21:36 +02:00
Rémi Denis-Courmont 549294fbbe vdpau: deprecate VDPAU codec capability
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:20:32 +02:00
Rémi Denis-Courmont a0ad5d0113 vdpau: deprecate old codec-specific pixel formats
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:16:54 +02:00
Yusuke Nakamura a8b19271c3 avcodec: Add output_picture_number to AVCodecParserContext
Set output_picture_number in H.264 parser.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-02 20:59:45 +02:00
Kieran Kunhya 95d5246454 lavc: Add option to encode MPEG-2 AAC with libfdk-aac
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-24 08:03:26 +02:00
Martin Storsjö fc962d4e7a mem: Add av_realloc_array and av_reallocp_array
These help avoiding overflows and simplify error handling.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:04:08 +03:00
Anton Khirnov 129bb23843 lavfi: add a slice threading infrastructure
Mostly based on libavcodec's
2013-05-24 09:28:18 +02:00
Anton Khirnov 2a6eaeaa85 Move get_logical_cpus() from lavc/pthread to lavu/cpu.
It will be useful in lavfi, and could conceivably be useful to the user
applications as well.
2013-05-24 09:28:00 +02:00
Yusuke Nakamura b493847df4 avcodec: Add picture structure information to AVCodecParserContext.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-05-24 08:43:14 +02:00
Anton Khirnov e6c4ac7b5f pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_* 2013-05-15 07:46:51 +02:00
Masaki Tanaka 507b1e454c avcodec: Add field order information to AVCodecParserContext.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-05-03 08:16:10 +02:00
Anton Khirnov 35386fbf41 doc/APIchanges: add missing hashes and dates 2013-04-24 09:48:57 +02:00
Anton Khirnov 5e83d9aced h264: fully support cropping.
Based on a patch by Vittorio Giovara <vittorio.giovara@gmail.com>

Fixes Bug 378.
2013-04-19 09:28:08 +02:00
Anton Khirnov fa2a34cd40 lavfi: change the filter registering system to match the other libraries
Removes an arbitrary hardcoded limit on the number of filters.
2013-04-11 20:44:03 +02:00
Anton Khirnov 7e8fe4be5f lavfi: add a function for counting elements in AVFilterPad arrays.
The caller needs to know what valid indices can be passed to
avfilter_pad_get_name/type.
2013-04-11 20:43:47 +02:00
Anton Khirnov 7cdd737ba8 lavfi: mark filters with dynamic number of inputs or outputs with special flags
This will be useful in avtools in the following commits.
Any other caller might also want to know this information.
2013-04-11 20:42:41 +02:00
Anton Khirnov 1ba95a9cca lavfi: add avfilter_init_dict() for initializing a filter with a dict. 2013-04-11 20:40:20 +02:00
Anton Khirnov 48a5adab62 lavfi: add avfilter_init_str() to replace avfilter_init_filter().
Drop the unused opaque parameter from its signature.
2013-04-11 20:39:13 +02:00
Anton Khirnov 111367263a lavfi: add AVFilterContext.graph.
It will be useful in the following commits.
2013-04-11 20:38:23 +02:00
Anton Khirnov c2c9801bc9 lavfi: deprecate avfilter_graph_add_filter().
Since this function adds a standalone filter to a filter graph and we do
not support creating such filters, there is no reason for this function
to exist.
2013-04-11 20:36:42 +02:00
Anton Khirnov bc1a985ba0 lavfi: replace avfilter_open() with avfilter_graph_alloc_filter().
Since we do not support "standalone" filters not attached to an
AVFilterGraph, we should not have a public function to create such
filters. In addition that function is horribly named, the action it does
cannot be possibly described as "opening" a filter.
2013-04-11 20:34:14 +02:00
Anton Khirnov 38f0c0781a lavfi: merge avfiltergraph.h into avfilter.h
We do not support using filters without AVFilterGraph in practice
anyway, so there is no point in pretending we do.
2013-04-11 20:33:33 +02:00
Anton Khirnov cdac3acb11 lavfi: add a bump and docs entries for the AVOptions switch 2013-04-09 19:13:27 +02:00
Anton Khirnov 2c328a9079 pixdesc: add a function for counting planes in a pixel format. 2013-03-19 11:12:17 +01:00
Anton Khirnov 42c7c61ab2 avfiltergraph: replace AVFilterGraph.filter_count with nb_filters
This is more consistent with the naming in the rest of Libav.
2013-03-16 05:33:23 +01:00
Anton Khirnov d8b31be6ca Add the bumps and APIchanges entries for reference counted buffers changes. 2013-03-08 07:41:49 +01:00
Reimar Döffinger 12c5c1d3e3 avstring: Add locale independent versions of some ctype.h functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:26 +02:00
Justin Ruggles 9f1223562e lavfi: connect libavresample options to af_resample via AVFilterGraph 2013-02-23 17:07:54 -05:00
Justin Ruggles 38c1466ca4 dict: add av_dict_parse_string()
Can be used to set multiple key/value pairs from a string.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 17:20:03 +01:00
Vladimir Pantelic b85a5e87af lavu: Add av_strnstr()
This is a length limited version of strstr()

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 10:47:51 +01:00
Martin Storsjö 8ee288d258 lavu: Add an API for calculating HMAC (RFC 2104)
This supports HMAC-MD5 and HMAC-SHA1 for now, other hashes are
simple to add.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:54:19 +02:00
Rémi Denis-Courmont 44e065d56c vdpau: Add context and common helpers for hwaccel support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:41:27 +01:00
Diego Biurrun f89466ad6f Add version bump and APIchanges entry for Add AV_PIX_FMT_VDPAU.
Also fix a lavu version typo in APIchanges.
2013-01-12 12:28:12 +01:00
Justin Ruggles 142c39097c doc/APIchanges: fill in missing dates and hashes. 2013-01-08 14:51:30 -05:00
Justin Ruggles 074a00d192 lavr: add a public function for setting a custom channel map
This allows reordering, duplication, and silencing of input channels.
2013-01-07 21:49:06 -05:00
Luca Barbato d8fd06c37d avstring: add av_basename and av_dirname
Thread safe version of the common basename and dirname.
2012-12-29 17:26:22 +01:00
Janne Grunau bf5f46b4cc APIChanges: add entry for av_read_packet deprecation 2012-11-15 17:49:53 +01:00
Justin Ruggles 5980f5dd18 lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h 2012-11-11 13:35:12 -05:00
Justin Ruggles dfde8a34e5 lavu: add av_ctz() for trailing zero bit count 2012-11-05 15:32:29 -05:00
Anton Khirnov add3a6902e lavu: bump major to 52
In addition to the recent tables mess, the AVOption defaults behavior
changed, so an old lavc used with a new lavu will get completely messed
up defaults.
2012-10-23 07:33:05 +02:00
Anton Khirnov 9cac8a5199 APIchanges: update lavr bump date 2012-10-23 07:33:05 +02:00
Nathan Caldwell a893655bda avutil: Add AVERROR_EXPERIMENTAL
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-21 22:38:21 +02:00
Anton Khirnov d2fcb356ca pixdesc: add functions for accessing pixel format descriptors.
Make av_pix_fmt_descriptors table static on next major bump.

Making the table public is dangerous, since the caller has no way to
know how large it actually is. It also prevents adding new fields to
AVPixFmtDescriptor without a major bump.
2012-10-12 12:45:25 +02:00
Martin Storsjö 9a92aea27b avutil: Add functions for allocating opaque contexts for algorithms
The current API where the plain size is exposed is not of much
use - in most cases it is allocated dynamically anyway.

If allocated e.g. on the stack via an uint8_t array, there's no
guarantee that the struct's members are aligned properly (unless
the array is overallocated and the opaque pointer within it
manually aligned to some unspecified alignment).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:27 +03:00
Luca Barbato b522000e9b avio: introduce avio_closep 2012-10-10 18:56:55 +02:00
Anton Khirnov 78071a1420 pixfmt: add AV_ prefixes to PIX_FMT_* 2012-10-08 07:12:16 +02:00
Anton Khirnov 2f49e3da33 doc/APIchanges: fill in missing dates and hashes. 2012-10-05 14:01:39 +02:00
Anton Khirnov 006afc7a0b lavr: bump major to 1 and declare it stable. 2012-10-05 13:50:13 +02:00
Anton Khirnov a42aadabc6 lavc: add avcodec_free_frame().
Since an AVFrame now has malloced members (extended_data), it must have
a destructor.
2012-09-24 12:31:24 +02:00
Tim Walker 8919fee7d2 lavu/audioconvert: add a second low frequency channel.
Can be used by DTS-HD, TrueHD and E-AC-3, among others.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-12 18:26:53 -04:00
Martin Storsjö 686a329395 avopt: Reorder the default_val struct, making i64 the first field
Also mention this change in APIchanges.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:16:11 +03:00
Anton Khirnov a2318326f1 lavc: add lossy/lossless codec properties. 2012-08-30 13:55:55 +02:00
Anton Khirnov 7b44061f4b doc/APIchanges: add an entry for codec descriptors.
Also fill in missing dates and hashes.
2012-08-23 08:51:04 +02:00
Martin Storsjö 1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Anton Khirnov 2ff67c909c lavc: fix mixing CODEC_ID/AV_CODEC_ID in C++ code.
C++ does not allow to mix different enums, so e.g. code comparing
ACodecID with CodecID would fail to compile with gcc.

This very evil hack should fix this problem.
2012-08-10 18:48:40 +02:00
Mans Rullgard 987170cb9d dict: add av_dict_count()
This adds a function to retrieve the number of entries in a
dictionary and updates the places directly accessing what should
be an opaque struct to use this new function instead.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-10 15:15:00 +01:00
Anton Khirnov 104e10fb42 lavc: add AV prefix to codec ids. 2012-08-07 15:56:39 +02:00
Diego Biurrun 239fdf1b4a x86: build: replace mmx2 by mmxext
Refactoring mmx2/mmxext YASM code with cpuflags will force renames.
So switching to a consistent naming scheme beforehand is sensible.
The name "mmxext" is more official and widespread and also the name
of the CPU flag, as reported e.g. by the Linux kernel.
2012-08-03 22:51:05 +02:00
Luca Barbato 681ed00099 avf: introduce nobuffer option
Useful in cases where a significant analyzeduration is
still needed, while minimizing buffering before output.

An example is processing low-latency streams where all
media types won't necessarily come in if the
analyzeduration is small.

Additional changes by Josh Allmann <joshua.allmann@gmail.com>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-07-29 07:58:00 +02:00
Robert Nagy b70d89a033 lavfi: add avfilter_unref_bufferp()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-07-20 21:06:18 +02:00
Luca Barbato 45ff9e5b57 doc: update api changes with the right commit hashes 2012-07-14 20:07:25 +02:00
Luca Barbato f3e5e6f05b mem: introduce av_malloc_array and av_mallocz_array
Both function ease allocating large arrays implementing the overflow
check inside it.
2012-07-14 20:07:25 +02:00
Anton Khirnov 58b049f2fa lavfi: support automatically inserting the fifo filter when needed.
This breaks libavfilter ABI.
2012-06-22 21:06:01 +02:00
Mans Rullgard d3d3a32c9d lavu: add av_usleep() function
This function implements a delay using the first available
of the following functions:

- nanosleep()
- usleep()
- Sleep() (Windows)

The conditional #includes in time.c are simplified by including
unistd.h and windows.h whenever they are available rather than
having these lines triggered by specific functions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-22 17:15:18 +01:00
Mans Rullgard dc7e336cae lavf, lavu: version bumps and APIchanges for av_gettime() move
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 11:45:28 +01:00
John Stebbins 3971be0eb5 Add Dolby/DPLII downmix support to libavresample
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-06-18 10:55:00 -04:00
Anton Khirnov 9baeff9506 lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
This is more consistent with naming in the rest of Libav.
2012-06-13 11:13:22 +02:00
Anton Khirnov 84b9fbe055 lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
This will allow making AVFilterPad opaque for the calling apps, since
those are the only two fields that can be useful to the users.
2012-06-13 11:10:17 +02:00
Anton Khirnov b0f0dfc485 Bump lavu minor and add an APIChanges entry for audioconvert functions. 2012-06-10 08:04:01 +02:00
Samuel Pitoiset 154486f9ad opt: Add av_opt_set_bin()
Introduce a new function to set binary data through AVOption,
avoiding having to convert the binary data to a string inbetween.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 14:31:44 +03:00
James Zern e9cef89702 avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-05-20 19:50:32 -04:00
Anton Khirnov d89eca507c Add missing version bumps and APIchanges/Changelog entries. 2012-05-15 06:57:31 +02:00
Anton Khirnov a5117a2444 lavc: pad last audio frame with silence when needed. 2012-05-09 17:46:54 +02:00
Anton Khirnov 828bd088f3 lavc: add sample rate and channel layout to AVFrame.
Rationale is the same as for video width/height etc.
2012-05-07 07:08:03 +02:00
Justin Ruggles 4010d724e1 lavr: use 8.8 instead of 10.6 as the 16-bit fixed-point mixing coeff type 2012-05-01 13:52:59 -04:00
Justin Ruggles f7ff099997 APIchanges: fill in some dates and commit hashes 2012-04-30 13:51:41 -04:00
Mans Rullgard 3527a73933 avutil: add av_parse_cpu_flags() function
This moves the cpu flag parsing code from avconv to avutil so
it can be accessed elsewhere.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-25 23:19:40 +01:00
Justin Ruggles c8af852b97 Add libavresample
This is a new library for audio sample format, channel layout, and sample rate
conversion.
2012-04-24 21:28:27 -04:00
Justin Ruggles 0c0d1bce7c avutil: add audio fifo buffer
The functions operate on the sample level rather than the byte level and work
with all audio sample formats.
2012-04-20 09:43:11 -04:00
Stefano Sabatini 91d3cbe0fd avfiltergraph: make the AVFilterInOut alloc/free API public
This is required for letting applications to create and destroy
AVFilterInOut structs in a convenient way.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-04-14 09:25:46 +02:00
Justin Ruggles 4d693b023c avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()
Based on a patch by Clément Bœsch <ubitux@gmail.com>
2012-04-08 15:13:28 -04:00
Justin Ruggles 5cc51a5847 avutil: Add av_get_default_channel_layout()
Also, use the new function in the AC-3 encoder.
2012-04-05 16:35:14 -04:00
Anton Khirnov 9c47f2b294 APIchanges: mark the place where 0.7 was cut. 2012-03-26 10:08:58 +02:00
Anton Khirnov 75bdd55e77 APIchanges: mark the place where 0.8 was cut. 2012-03-26 10:08:57 +02:00
Anton Khirnov 5d20e7b7ea APIchanges: fill in missing dates and hashes. 2012-03-26 10:08:56 +02:00
Diego Biurrun 343bfdd38a APIchanges: Replace Subversion revision numbers by Git hashes. 2012-03-18 16:07:33 +01:00
Anton Khirnov 4d851f8dcf cpu: add av_set_cpu_flags_mask(). 2012-03-06 15:02:28 +01:00
Justin Ruggles 9524cf79df avcodec: add av_get_audio_frame_duration() function.
This is a utility function for the user to get the frame duration based on
the codec id, frame size in bytes, and various AVCodecContext parameters.
2012-03-05 13:08:15 -05:00
Anton Khirnov 44fe77b350 lavc: make codec_is_decoder/encoder() public. 2012-03-04 21:08:52 +01:00
Martin Storsjö 442c1320e7 avpacket: Add a function for shrinking already allocated side data
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-01 16:08:30 +02:00
Anton Khirnov 322537478b Add a minor bump, changelog/APIchanges entry and some documentation for APIC support. 2012-02-29 14:44:22 +01:00
Anton Khirnov f5f5b154e7 doc/APIchanges: fill in missing dates and hashes. 2012-02-27 08:35:32 +01:00
Justin Ruggles c9bca80132 avutil: add AVERROR_UNKNOWN
Useful to return instead of -1 when the cause of the error is unknown,
typically from an external library.
2012-02-25 11:49:41 -05:00
Diego Biurrun b315042c8c Remove libpostproc.
This library does not fit into Libav as a whole and its code is just a
maintenance burden.  Furthermore it is now available as an external project,
which completely obviates any reason to keep it around.

URL: http://git.videolan.org/?p=libpostproc.git
2012-02-23 19:36:16 +01:00
Justin Ruggles e9cda85351 avcodec: add duration field to AVCodecParserContext
This will allow parsers to export the duration of the current frame being
output, if known, instead of using AVCodecContext.frame_size.
2012-02-20 15:08:40 -05:00
Justin Ruggles 0b42a9388c avutil: add av_rescale_q_rnd() to allow different rounding 2012-02-20 15:08:40 -05:00
Anton Khirnov 38d5533228 pixdesc: mark pseudopaletted formats with a special flag.
This makes it possible to dintinguish them from PAL8.

Fixes an invalid write in avpicture_layout().
2012-02-08 21:01:31 +01:00
Anton Khirnov 52f82a1148 lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket
Deprecate avcodec_encode_video().
2012-02-08 20:54:24 +01:00
Janne Grunau fcc518a024 APIchanges: add missing commit hashes 2012-02-02 14:29:47 +01:00
Janne Grunau 316fc7443b avcodec: Add av_fast_padded_malloc().
Wrapper around av_fast_malloc() that keeps FF_INPUT_BUFFER_PADDING_SIZE
zero-padded bytes at the end of the used buffer.

Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>.
2012-02-01 19:19:35 +01:00
Anton Khirnov dd6d3b0e02 lavf: add functions for accessing the fourcc<->CodecID mapping tables.
Fixes bug 212.
2012-01-31 16:53:35 +01:00
Anton Khirnov af08d9aeea lavc: add avcodec_is_open().
It allows to check whether an AVCodecContext is open in a documented
way. Right now the undocumented way this check is done in lavf/lavc is
by checking whether AVCodecContext.codec is NULL. However it's desirable
to be able to set AVCodecContext.codec before avcodec_open2().
2012-01-31 07:55:24 +01:00
Martin Storsjö c9b309e8cb doc: Fix the name of the new function
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-30 21:29:56 +02:00
Paul B Mahol 8b933129b9 avutil: make intfloat api public
The functions are already av_ prefixed and intfloat header is already provided.
Install libavutil/intfloat.h

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-30 07:41:31 +01:00
Anton Khirnov 44911f2985 APIchanges: mention avcodec_alloc_context()/2/3
There was no minor bump for making avcodec_alloc_context3() public and
deprecating the other two, so I'm using the first next lavc bump.
2012-01-28 19:45:10 +01:00
Anton Khirnov a17479dfce lavf: increase major version from 53 to 54. 2012-01-27 10:52:39 +01:00
Anton Khirnov 7063b6eaee lavc: increase major version to 54.
The lavf-ffm test results change because ffmenc writes
AVCodecContext.flags/flags2 and the defaults for those change.
2012-01-27 10:38:30 +01:00
Martin Storsjö 6cb288290d doc: Update APIchanges with info on muxer flushing
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-25 22:24:13 +02:00
Anton Khirnov 7512bb74f2 doc/APIChanges: fill in missing dates and hashes 2012-01-21 08:48:53 +01:00
Justin Ruggles a6ccae3f4c avcodec: bump minor version and add APIChanges for the new audio encoding API 2012-01-15 21:24:17 -05:00
Anton Khirnov 3167dc9515 lavfi: move version macros to a new installed header version.h 2012-01-12 09:00:54 +01:00
Reinhard Tartler 014f8d8106 No longer build libpostproc by default
update documentation to inform developers that it may be removed in a
later release.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-11 09:27:56 +01:00
Jonathan Nieder 96d8e18a98 APIchanges: mention cleaned up header includes
Fixes bug 188.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-04 00:29:55 +01:00
Janne Grunau c04a954da6 lavu: bump lavu minor for av_popcount64
Add it to doc/APIchanges and update and correct other entries.
2012-01-03 15:42:26 +01:00
Anton Khirnov 06e8d38f2b Add minor bumps and APIchanges entries for lavc/lavfi changes. 2011-12-25 20:50:16 +01:00
Mans Rullgard 2a216ca2ef APIchanges: fill in revision for AVFrame.age deprecation
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-18 22:15:04 +00:00
Mans Rullgard 8400b126ac avcodec: deprecate AVFrame.age
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>
2011-12-18 22:14:33 +00:00
Anton Khirnov 526604545f lavf: add avformat_close_input().
It sets the supplied AVFormatContext pointer to NULL after freeing it,
which is safer and its name is consistent with other lavf functions.

Also deprecate av_close_input_file().
2011-12-12 20:23:56 +01:00
Justin Ruggles 0eea212943 Add avcodec_decode_audio4().
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Justin Ruggles 560f773c7d avcodec: change number of plane pointers from 4 to 8 at next major bump.
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.
2011-12-02 17:40:40 -05:00
Mans Rullgard b94a3b288e APIchanges: fill in some blanks
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-28 17:29:47 +00:00
Justin Ruggles bbb46f3ec7 libavutil: add utility functions to simplify allocation of audio buffers.
Based on code by Stefano Sabatini.
2011-11-23 18:39:28 -05:00
Justin Ruggles 8889cc4f5b libavutil: add planar sample formats and av_sample_fmt_is_planar() 2011-11-23 18:39:28 -05:00
Justin Ruggles f3a29b750a avcodec: move some AVCodecContext fields to an internal struct.
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.
2011-11-19 10:01:05 -05:00
Anton Khirnov f872e4d0a7 Add an APIchanges entry and a minor bump for avio changes. 2011-11-18 11:01:16 +01:00
Martin Storsjö 627067118c avutil: Add av_timegm as a public function
This is useful, since the normal timegm function isn't a standard
function (requiring _BSD_SOURCE or _SVID_SOURCE on glibc to
be visible, and not available on e.g. windows). The widely available
function mktime uses the local time zone, which requires ugly
workarounds to handle UTC time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 11:22:41 +02:00
Anton Khirnov eacec07e9c doc/APIchanges: add missing dates and hashes 2011-11-06 20:33:13 +01:00
Reimar Döffinger ba04ecfdac avstring: Add locale independent implementations of strcasecmp/strncasecmp
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:56 +02:00
Luca Barbato 07b172fe8f avstring: Add locale independent implementations of toupper/tolower
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:54 +02:00
Martin Storsjö b6d08f40aa avformat: Add functions for doing global network initialization
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:17:51 +02:00
Justin Ruggles 512557b291 avcodec: remove avcodec_parse_frame and deprecate associated elements.
The documentation for CODEC_CAP_PARSE_ONLY and AVCodecContext.parse_only
indicates that they are utilized through avcodec_parse_frame(), which was
never actually implemented.
2011-10-27 22:06:32 -04:00
Anton Khirnov 569129a6dc lavf: add avformat_new_stream as a replacement for av_new_stream.
It takes a codec parameter, thus enabling codec-specific defaults.
2011-10-19 17:02:11 +02:00
Justin Ruggles b631fba936 avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK.
This will prevent seeking by bytes for formats that cannot handle this.
2011-10-13 16:31:15 -04:00
Anton Khirnov 492bd1a28f AVOptions: bump minor and add APIchanges entry. 2011-10-12 16:55:56 +02:00
Anton Khirnov 7f9b0ef9a8 doc/APIChanges: fill in missing hashes and dates. 2011-09-18 12:01:23 +02:00
Anton Khirnov fb4ca26bdb lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions. 2011-09-03 20:53:35 +02:00
Anton Khirnov c11fb8288d AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
It allows to search for options only with AVClass, without allocating
the corresponding context.
2011-09-03 20:52:21 +02:00
Stefano Sabatini f2011ed234 fifo: add av_fifo_peek2(), and deprecate av_fifo_peek()
The new function provides a more generic interface than av_fifo_peek()
for peeking at a FIFO buffer data.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-26 20:53:02 +02:00
Anton Khirnov 48f9e457ea lavf: add avformat_query_codec().
It allows to check if a given codec can be written into a container.
2011-08-16 20:24:20 +02:00