ffmpeg.git
7 years agopthreads: Generic progress lubrication support.
Michael Niedermayer [Mon, 23 Jan 2012 05:34:30 +0000 (06:34 +0100)]
pthreads: Generic progress lubrication support.

Fixes bug118, bug120 and bug125 at least

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopthreads: reset got_frames on flush.
Michael Niedermayer [Mon, 23 Jan 2012 02:39:59 +0000 (03:39 +0100)]
pthreads: reset got_frames on flush.

This fixes memory corruption when seeking in broken streams.
a random mpeg4 in nut file was used to debug.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocafdec: replace deprecated get_strz()
Paul B Mahol [Mon, 23 Jan 2012 16:18:44 +0000 (17:18 +0100)]
cafdec: replace deprecated get_strz()

7 years agocafenc: replace deprecated av_dbl2int()
Paul B Mahol [Mon, 23 Jan 2012 16:18:13 +0000 (17:18 +0100)]
cafenc: replace deprecated av_dbl2int()

7 years agolibavformat/libavformat.v: fix application name in comment
Michael Niedermayer [Mon, 23 Jan 2012 00:46:57 +0000 (01:46 +0100)]
libavformat/libavformat.v: fix application name in comment

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 23 Jan 2012 00:05:20 +0000 (01:05 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (25 commits)
  riff: fix invalid av_freep() calls on EOF in ff_read_riff_info
  pam: Fix a typo that broke writing and reading PAM files.
  mxfdec: fix memleak on av_realloc failures
  mxfdec: Do not parse slices or DeltaEntryArrays.
  mxfdec: hybrid demuxing/seeking solution
  mxfdec: Add Avid's essence element key.
  mfxdec: Separate mxf_essence_container_uls for audio and video.
  mxfdec: Compute packet offsets properly.
  mxfdec: Use MaterialPackage - Track - TrackID instead of the system_item hack.
  mxfdec: use av_dlog() for 'no corresponding source package found'
  mxfdec: Make mxf->partitions sorted by offset.
  mxfdec: parse ThisPartition
  mxfdec: Speed up metadata and index parsing.
  mxfdec: Make sure DataDefinition is consistent between material track and source track.
  mxfdec: add EssenceContainer UL found in 0001GL00.MXF.A1.mxf_opatom.mxf
  mxfdec: Add hack that adjusts the n_delta calculation when system items are present.
  mxfdec: Parse IndexTableSegments and convert them into AVIndexEntry arrays.
  mxfdec: Move FooterPartition to MXFContext and make sure it is never zero.
  mxfdec: check return value of avio_seek
  mxfdec: skip to end of structural sets
  ...

Conflicts:
configure
libavcodec/pnm.c
libavformat/mxfdec.c
libavformat/riff.c
libavformat/rtsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoCrystalHD: Back up extradata to allow decoder reinit to work.
Philip Langdale [Sun, 22 Jan 2012 21:47:00 +0000 (13:47 -0800)]
CrystalHD: Back up extradata to allow decoder reinit to work.

This was a regression that came in when I switched to using the
h.264 annex b filter all the time. As the filter modifies extradata,
its use violates the statelessness assumption that exists in the
'ffmpeg' command line tool, and maybe elsewhere. It assumes that
a docoder can be reinitalised and pointed to an existing stream and
get the same results.

For now, the only way to meet this requirement is to backup the
extradata.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoCrystalHD: Initialise variables to silence valgrind.
Philip Langdale [Sun, 22 Jan 2012 21:46:59 +0000 (13:46 -0800)]
CrystalHD: Initialise variables to silence valgrind.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRevert "movenc: simplify handling of pcm vs. adpcm vs. other compressed codecs"
Michael Niedermayer [Sun, 22 Jan 2012 22:23:23 +0000 (23:23 +0100)]
Revert "movenc: simplify handling of pcm vs. adpcm vs. other compressed codecs"

This reverts commit 8e8c51318c1fe4ae61de578f0823b88aa3fe8222.

Fixes Ticket873

Conflicts:

tests/ref/acodec/pcm_s16be
tests/ref/acodec/pcm_s24be
tests/ref/acodec/pcm_s32be
tests/ref/acodec/pcm_s8
tests/ref/lavf/mov

Approved-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobuild: Describe --nm and -ld options consistently
Alexander Strasser [Sun, 15 Jan 2012 12:53:33 +0000 (13:53 +0100)]
build: Describe --nm and -ld options consistently

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopthread: Change a signal to a broadcast as multiple threads
Michael Niedermayer [Sun, 22 Jan 2012 20:13:10 +0000 (21:13 +0100)]
pthread: Change a signal to a broadcast as multiple threads
have been seen waiting and deadlocking on it in bug125.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobase64: 10l endian fix.
Michael Niedermayer [Sun, 22 Jan 2012 22:04:20 +0000 (23:04 +0100)]
base64: 10l endian fix.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoriff: fix invalid av_freep() calls on EOF in ff_read_riff_info
Janne Grunau [Thu, 5 Jan 2012 19:15:53 +0000 (20:15 +0100)]
riff: fix invalid av_freep() calls on EOF in ff_read_riff_info

7 years agoavfilter: add some asserts() to check refcounts.
Michael Niedermayer [Sun, 22 Jan 2012 18:30:40 +0000 (19:30 +0100)]
avfilter: add some asserts() to check refcounts.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopam: Fix a typo that broke writing and reading PAM files.
Carl Eugen Hoyos [Wed, 28 Dec 2011 04:54:59 +0000 (05:54 +0100)]
pam: Fix a typo that broke writing and reading PAM files.

Reported and reviewed by Derek Buitenhuis.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agobuild: Support selecting yasm-compatible assembler
Alexander Strasser [Sun, 15 Jan 2012 23:48:16 +0000 (00:48 +0100)]
build: Support selecting yasm-compatible assembler

  Makes it possible to select the name/path of the tool for compiling
the non-inline assembly code.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosws: Fix unscaled >8bit planar chroma handling.
Michael Niedermayer [Sun, 22 Jan 2012 05:44:34 +0000 (06:44 +0100)]
sws: Fix unscaled >8bit planar chroma handling.

Fixes Ticket840

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomxfdec: fix memleak on av_realloc failures
Janne Grunau [Wed, 21 Dec 2011 19:12:24 +0000 (20:12 +0100)]
mxfdec: fix memleak on av_realloc failures

7 years agompeg12: fixed parsing in some mpeg2 streams
Hendrik Leppkes [Fri, 20 Jan 2012 15:46:58 +0000 (16:46 +0100)]
mpeg12: fixed parsing in some mpeg2 streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc: fix FF_LOSS_COLORQUANT detection for gray8a->pal8
Michael Niedermayer [Wed, 18 Jan 2012 14:51:09 +0000 (15:51 +0100)]
lavc: fix FF_LOSS_COLORQUANT detection for gray8a->pal8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoExtract some duplicated code.
Reimar Döffinger [Sat, 21 Jan 2012 23:12:34 +0000 (00:12 +0100)]
Extract some duplicated code.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoRemove pointless and distracting ()
Reimar Döffinger [Sat, 21 Jan 2012 23:02:42 +0000 (00:02 +0100)]
Remove pointless and distracting ()

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoSimplify: just add header_size directly.
Reimar Döffinger [Sat, 21 Jan 2012 22:59:08 +0000 (23:59 +0100)]
Simplify: just add header_size directly.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoMove some duplicated code, simplify.
Reimar Döffinger [Sat, 21 Jan 2012 22:53:57 +0000 (23:53 +0100)]
Move some duplicated code, simplify.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoMake variable that always has the same value const.
Reimar Döffinger [Sat, 21 Jan 2012 22:48:50 +0000 (23:48 +0100)]
Make variable that always has the same value const.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoOptimized base64 decode by writing 3 bytes at once.
Reimar Döffinger [Sat, 21 Jan 2012 21:52:56 +0000 (22:52 +0100)]
Optimized base64 decode by writing 3 bytes at once.

About 25% faster.
decode: 248852 -> 200385 decicycles
(syntax check unchanged)

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoCosmetics: add do {} while 0 to macro.
Reimar Döffinger [Sat, 21 Jan 2012 21:48:15 +0000 (22:48 +0100)]
Cosmetics: add do {} while 0 to macro.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agomxfdec: Do not parse slices or DeltaEntryArrays.
Tomas Härdin [Fri, 16 Dec 2011 10:02:04 +0000 (11:02 +0100)]
mxfdec: Do not parse slices or DeltaEntryArrays.

The most recent demuxing/seeking code does not need them.

7 years agomxfdec: hybrid demuxing/seeking solution
Janne Grunau [Thu, 8 Dec 2011 19:28:49 +0000 (20:28 +0100)]
mxfdec: hybrid demuxing/seeking solution

This uses the old demuxing code for OP1a and separate demuxing code for OPAtom.
Timestamp output is added to the old demuxing code.

The seeking code is made to seek to the start of the desired EditUnit only,
from which the normal demuxing code takes over (if OP1a). This means we
do not use delta entries or slices, only StreamOffsets. OPAtom seeking
basically works like before.

This also makes D-10 seeking behave the same way as OP1a and OPAtom. In other
words, we allow seeking before the start or past the end for D-10 too.

Based on several patches by Tomas Härdin <tomas.hardin@codemill.se> and
Reimar Döffinger <Reimar.Doeffinger@gmx.de>.

Changed av_calloc to av_mallocz, added overflow checks.

7 years agomxfdec: Add Avid's essence element key.
Tomas Härdin [Sat, 10 Dec 2011 11:11:11 +0000 (12:11 +0100)]
mxfdec: Add Avid's essence element key.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomfxdec: Separate mxf_essence_container_uls for audio and video.
Carl Eugen Hoyos [Sat, 10 Dec 2011 13:58:57 +0000 (14:58 +0100)]
mfxdec: Separate mxf_essence_container_uls for audio and video.

It is a really bad idea to assign a video codec id
when we have set codec_type to audio and vice versa.

Prevents detection of mp2 in mxf as mpeg2video.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: Compute packet offsets properly.
Tomas Härdin [Thu, 8 Dec 2011 11:23:36 +0000 (12:23 +0100)]
mxfdec: Compute packet offsets properly.

This replaces the old essence_offset code.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: Use MaterialPackage - Track - TrackID instead of the system_item hack.
Tomas Härdin [Thu, 8 Dec 2011 10:53:57 +0000 (11:53 +0100)]
mxfdec: Use MaterialPackage - Track - TrackID instead of the system_item hack.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: use av_dlog() for 'no corresponding source package found'
Tomas Härdin [Thu, 8 Dec 2011 10:21:58 +0000 (11:21 +0100)]
mxfdec: use av_dlog() for 'no corresponding source package found'

This is not an error and expected behavior for OPAtom files.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: Make mxf->partitions sorted by offset.
Tomas Härdin [Thu, 8 Dec 2011 10:06:23 +0000 (11:06 +0100)]
mxfdec: Make mxf->partitions sorted by offset.

This also zeroes new entries for good measure (used by future patches).

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: parse ThisPartition
Tomas Härdin [Wed, 7 Dec 2011 16:43:36 +0000 (17:43 +0100)]
mxfdec: parse ThisPartition

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: Speed up metadata and index parsing.
Tomas Härdin [Mon, 14 Mar 2011 16:00:21 +0000 (17:00 +0100)]
mxfdec: Speed up metadata and index parsing.

Specifically, this means parsing as before until we run into essence.
At that point we seek to the footer and parse until EOF. After that we start
seeking backward to the previous partition and parse that until we run into
essence or the next partition. This procedure is repeated until we encounter
the last partition we parsed in the forward direction.

The end result of all this is that large essence containers are not needlessly
parsed. This speeds up parsing large files a lot.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: Make sure DataDefinition is consistent between material track and source...
Tomas Härdin [Mon, 28 Nov 2011 09:51:00 +0000 (10:51 +0100)]
mxfdec: Make sure DataDefinition is consistent between material track and source track.

This fixes 0001GL.MXF.V1.mxf_opatom.mxf and 0001GL00.MXF.A1.mxf_opatom.mxf
getting two streams each due to both using the same SourcePackageID.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: add EssenceContainer UL found in 0001GL00.MXF.A1.mxf_opatom.mxf
Tomas Härdin [Mon, 28 Nov 2011 08:53:10 +0000 (09:53 +0100)]
mxfdec: add EssenceContainer UL found in 0001GL00.MXF.A1.mxf_opatom.mxf

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: Add hack that adjusts the n_delta calculation when system items are present.
Tomas Härdin [Fri, 11 Nov 2011 14:01:34 +0000 (15:01 +0100)]
mxfdec: Add hack that adjusts the n_delta calculation when system items are present.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: Parse IndexTableSegments and convert them into AVIndexEntry arrays.
Janne Grunau [Wed, 9 Nov 2011 10:47:57 +0000 (11:47 +0100)]
mxfdec: Parse IndexTableSegments and convert them into AVIndexEntry arrays.

Based on patch from Tomas Härdin <tomas.hardin@codemill.se>
and work by Georg Lippitsch <georg.lippitsch@gmx.at>

Changed av_calloc to av_mallocz and added overflow checks.

7 years agomxfdec: Move FooterPartition to MXFContext and make sure it is never zero.
Tomas Härdin [Fri, 7 Oct 2011 13:48:00 +0000 (15:48 +0200)]
mxfdec: Move FooterPartition to MXFContext and make sure it is never zero.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: check return value of avio_seek
Joakim Plate [Wed, 14 Sep 2011 17:26:48 +0000 (19:26 +0200)]
mxfdec: check return value of avio_seek

Avoid modifying state if avio_seek fails.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: skip to end of structural sets
Philip de Nier [Mon, 12 Sep 2011 10:13:44 +0000 (11:13 +0100)]
mxfdec: skip to end of structural sets

This fixes reading of partition packs. The code stops reading after the
operational pattern and should skip the array of essence container
labels that follow.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agomxfdec: parse MXF partitions
Tomas Härdin [Mon, 7 Feb 2011 15:07:41 +0000 (16:07 +0100)]
mxfdec: parse MXF partitions

7 years agoavserver: fix build after the next bump.
Anton Khirnov [Thu, 12 Jan 2012 08:51:23 +0000 (09:51 +0100)]
avserver: fix build after the next bump.

Now that 0.8 is out we can reapply this commit. It breaks shared
avserver builds due to avserver using internal libavformat symbols,
which are now hidden, so this commit also disables avserver with
--enable-shared.

7 years agosws: In case of an invalid scaler algorithm, show the invalid value.
Michael Niedermayer [Fri, 20 Jan 2012 19:44:41 +0000 (20:44 +0100)]
sws: In case of an invalid scaler algorithm, show the invalid value.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavidec: fix "avidec.c:362: warning: st may be used uninitialized in this function"
Michael Niedermayer [Fri, 20 Jan 2012 19:36:25 +0000 (20:36 +0100)]
avidec: fix "avidec.c:362: warning: st may be used uninitialized in this function"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRC: Fix initial buffer occupancy.
Michael Niedermayer [Sun, 22 Jan 2012 03:30:59 +0000 (04:30 +0100)]
RC: Fix initial buffer occupancy.

Fixes Ticket880
Regression since bf174a70cde333eba7e27063f9ce44497108f466

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegpsmux: Fix integer overflow with huge VBV sizes.
Michael Niedermayer [Sun, 22 Jan 2012 02:29:32 +0000 (03:29 +0100)]
mpegpsmux: Fix integer overflow with huge VBV sizes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoaacenc: Fix bug in writing libavcodec_ident.
Michael Niedermayer [Sun, 22 Jan 2012 00:40:10 +0000 (01:40 +0100)]
aacenc: Fix bug in writing libavcodec_ident.

the written length was off by 2 causing aac decoders to fail with the data.
lucky the encoder was marked as experimental and not used much

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoSupport decoding gray8a tiff images.
Carl Eugen Hoyos [Sun, 22 Jan 2012 03:49:46 +0000 (04:49 +0100)]
Support decoding gray8a tiff images.

7 years agoimg2: add j2c file extension
Jean First [Sat, 21 Jan 2012 23:11:42 +0000 (00:11 +0100)]
img2: add j2c file extension

Some applications use the j2c extension for jpeg2000 codestream files.

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopixdesc: cosmetics
Jean First [Sat, 21 Jan 2012 23:07:48 +0000 (00:07 +0100)]
pixdesc: cosmetics

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopngdec: Do not use SIMD paeth prediction for bpp=2
Michael Niedermayer [Thu, 19 Jan 2012 19:50:44 +0000 (20:50 +0100)]
pngdec: Do not use SIMD paeth prediction for bpp=2

Fixes decoding of basi4a08.png

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopngdec: Fix masks for interlaced decoding
Michael Niedermayer [Thu, 19 Jan 2012 19:49:59 +0000 (20:49 +0100)]
pngdec: Fix masks for interlaced decoding

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopngdec: Add some FF_DEBUG based av_logs.
Michael Niedermayer [Thu, 19 Jan 2012 17:58:24 +0000 (18:58 +0100)]
pngdec: Add some FF_DEBUG based av_logs.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosws: fix copy case detection with gray8a.
Michael Niedermayer [Thu, 19 Jan 2012 07:36:17 +0000 (08:36 +0100)]
sws: fix copy case detection with gray8a.

Fixes gray_alpha.png

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agortsp: Use a random offset for trying to open UDP ports for RTP
Dmitry Volyntsev [Wed, 18 Jan 2012 09:46:37 +0000 (13:46 +0400)]
rtsp: Use a random offset for trying to open UDP ports for RTP

This avoids (for all practical cases) the issue of reusing
the same UDP port as for an earlier connection. If the remote
doesn't know the previous session was closed, he might keep
on sending packets to that port. If we always start off trying
to open the same UDP port, we might get those packets intermixed
with the new ones.

This is occasionally an issue when testing RTSP stuff with
DSS, perhaps also with other servers.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Allow specifying the UDP port range via AVOptions
Martin Storsjö [Sat, 21 Jan 2012 21:28:11 +0000 (23:28 +0200)]
rtsp: Allow specifying the UDP port range via AVOptions

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Remove a leftover, currently pointless check
Dmitry Volyntsev [Wed, 18 Jan 2012 09:54:16 +0000 (13:54 +0400)]
rtsp: Remove a leftover, currently pointless check

This check isn't relevant in the way the code currently works.

Also change a case of if (x == 0) into if (!x).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavc: Mark the err_detect constants as audio+video as they also apply to audio.
Michael Niedermayer [Sat, 21 Jan 2012 22:48:50 +0000 (23:48 +0100)]
lavc: Mark the err_detect constants as audio+video as they also apply to audio.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoerror_detection: put the old error detection constants back.
Michael Niedermayer [Sat, 21 Jan 2012 22:46:36 +0000 (23:46 +0100)]
error_detection: put the old error detection constants back.

The old constants are more useful to the end user and have
orthogonal meanings to the new ones.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agogit show 2473a45c85dce6872617b33fce396dbbd6347e8e avconv.c | patch ffmpeg.c
Michael Niedermayer [Sat, 21 Jan 2012 22:23:23 +0000 (23:23 +0100)]
git show 2473a45c85dce6872617b33fce396dbbd6347e8e avconv.c | patch ffmpeg.c

Original commit:
commit 2473a45c85dce6872617b33fce396dbbd6347e8e
Author: Janne Grunau <janne-libav@jannau.net>
Date:   Wed Jan 18 10:53:41 2012 +0100

    threads: change the default for threads back to 1

    Using threaded decoding by default breaks backward compatibility if
    AVHWAccel is used or if an appliction sets threadunsafe callbacks.
    Avconv and avplay still use -threads auto if not specified.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 21 Jan 2012 22:11:27 +0000 (23:11 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rtpdec: Use our own SSRC in the SDES field when sending RRs
  Finalize changelog for 0.8 Release
  Prepare for 0.8 Release
  threads: change the default for threads back to 1
  threads: update slice_count and slice_offset from user context
  aviocat: Remove useless includes
  doc/APIChanges: fill in missing dates and hashes
  Revert "avserver: fix build after the next bump."
  mpegaudiodec: switch error detection check to AV_EF_BUFFER
  lavf: rename fer option and document resulting (f_)err_detect options
  lavc: rename err_filter option to err_detect and document it
  mpegvideo: fix invalid memory access for small video dimensions
  movenc: Reorder entries in the MOVIentry struct, for tigheter packing
  rtsp: Remove extern declarations for variables that don't exist
  aviocat: Flush the output before closing

Conflicts:
Changelog
RELEASE
libavcodec/mpegaudiodec.c
libavcodec/pthread.c
libavformat/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agortpdec: Use our own SSRC in the SDES field when sending RRs
Martin Storsjö [Sat, 21 Jan 2012 15:20:45 +0000 (17:20 +0200)]
rtpdec: Use our own SSRC in the SDES field when sending RRs

The s->ssrc field is the sender's SSRC, we use ssrc + 1 to get
a collision free "unique" SSRC for ourselves in the RR part.
The SDES block in the RTCP packet should describe ourselves,
not the sender.

This was fixed for the RR part in 952139a3226b, but wasn't
fixed for the SDES part until now.

This could cause some Axis cameras to send RTCP BYE packets
to us due to the SSRC collision.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoFinalize changelog for 0.8 Release
Reinhard Tartler [Sat, 21 Jan 2012 17:37:25 +0000 (18:37 +0100)]
Finalize changelog for 0.8 Release

7 years agoSupport decoding Avid DS Uncompressed (SUDS).
Carl Eugen Hoyos [Sat, 21 Jan 2012 16:58:26 +0000 (17:58 +0100)]
Support decoding Avid DS Uncompressed (SUDS).

Fixes ticket #934

7 years agoUnroll base64 decode loop.
Reimar Döffinger [Sat, 21 Jan 2012 11:43:42 +0000 (12:43 +0100)]
Unroll base64 decode loop.

Around 50% faster.
decode:       374139 -> 248852 decicycles
syntax check: 236955 -> 123854 decicycles

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoPrepare for 0.8 Release
Reinhard Tartler [Sat, 21 Jan 2012 13:54:31 +0000 (14:54 +0100)]
Prepare for 0.8 Release

7 years agoUse a full table for base64 decode.
Reimar Döffinger [Sat, 21 Jan 2012 11:22:19 +0000 (12:22 +0100)]
Use a full table for base64 decode.

Also encodes error or end marker into table.
About 20% faster.
decode:       466491 -> 374139 decicycles
syntax check: 236955 -> 161182 decicycles

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoFix valgrind FATE for out-of-tree builds.
Reimar Döffinger [Sat, 21 Jan 2012 13:35:51 +0000 (14:35 +0100)]
Fix valgrind FATE for out-of-tree builds.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agolavfi: fix mp and mandelbrot descriptions to make them complete sentences
Stefano Sabatini [Fri, 20 Jan 2012 13:16:49 +0000 (14:16 +0100)]
lavfi: fix mp and mandelbrot descriptions to make them complete sentences

This is consistent with the other filter descriptions.

7 years agothreads: change the default for threads back to 1
Janne Grunau [Wed, 18 Jan 2012 09:53:41 +0000 (10:53 +0100)]
threads: change the default for threads back to 1

Using threaded decoding by default breaks backward compatibility if
AVHWAccel is used or if an appliction sets threadunsafe callbacks.
Avconv and avplay still use -threads auto if not specified.

7 years agothreads: update slice_count and slice_offset from user context
Janne Grunau [Fri, 20 Jan 2012 12:37:00 +0000 (13:37 +0100)]
threads: update slice_count and slice_offset from user context

They are used to signal the number of slices and offsets of each slice
out of band to the decoder.

7 years agobase64: more thorough decode tests.
Reimar Döffinger [Fri, 20 Jan 2012 22:26:10 +0000 (23:26 +0100)]
base64: more thorough decode tests.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoAdd a --valgrind configure option.
Reimar Döffinger [Fri, 20 Jan 2012 19:42:31 +0000 (20:42 +0100)]
Add a --valgrind configure option.

If specified runs "make fate" through valgrind using the
given valgrind binary.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoaviocat: Remove useless includes
Martin Storsjö [Sat, 21 Jan 2012 09:33:35 +0000 (11:33 +0200)]
aviocat: Remove useless includes

Also include stdlib.h explicitly - currently it is used
implicitly via avformat.h.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agodoc/APIChanges: fill in missing dates and hashes
Anton Khirnov [Sat, 21 Jan 2012 07:48:53 +0000 (08:48 +0100)]
doc/APIChanges: fill in missing dates and hashes

7 years agoRevert "avserver: fix build after the next bump."
Anton Khirnov [Sat, 21 Jan 2012 07:40:47 +0000 (08:40 +0100)]
Revert "avserver: fix build after the next bump."

This temporarily (until 0.8 is released) reverts commit
8e1340abc316e038bb89e5a3b46e92ff58c98a88. That commit breaks shared
builds because of symbol hiding. Reverting it will enable shared builds
for 0.8

7 years agompegaudiodec: switch error detection check to AV_EF_BUFFER
Dustin Brody [Mon, 16 Jan 2012 13:25:04 +0000 (08:25 -0500)]
mpegaudiodec: switch error detection check to AV_EF_BUFFER

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavf: rename fer option and document resulting (f_)err_detect options
Dustin Brody [Fri, 20 Jan 2012 08:53:54 +0000 (03:53 -0500)]
lavf: rename fer option and document resulting (f_)err_detect options

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavc: rename err_filter option to err_detect and document it
Dustin Brody [Fri, 20 Jan 2012 08:57:32 +0000 (03:57 -0500)]
lavc: rename err_filter option to err_detect and document it

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agompegvideo: fix invalid memory access for small video dimensions
John Brooks [Tue, 13 Dec 2011 00:04:14 +0000 (17:04 -0700)]
mpegvideo: fix invalid memory access for small video dimensions

When either video dimension is only one macroblock, subtractions
based on v_edge_pos and the macroblock size may be negative. In
that situation, an unsigned comparison isn't sufficent to test for
MV overruns, because a limit of (unsigned)-1 will let any other
value pass.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoac3dec: Move center&surround mix level tables to parser.
Michael Niedermayer [Wed, 18 Jan 2012 23:06:03 +0000 (00:06 +0100)]
ac3dec: Move center&surround mix level tables to parser.

That way all mix levels as exported by the parser
will have the same meaning.

Previously the 3bit center mix level for eac3 was
used to index in a 4 entry table leading to out of array reads.
this change removes the table and offsets the ac3 variable by 4
so it matches the meanings for eac3 except the reserved case.
The reserved case is then explicitly handled.

Idea-by: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodeshake: variable used uninitialized
Ray Simard [Sat, 21 Jan 2012 02:19:46 +0000 (18:19 -0800)]
deshake: variable used uninitialized

Sometimes the scan finds nothing that qualifies for addition to
the array and pos is zero after the loops.  The code forces pos to
1 and the array is then processed as if it had one valid element in it,
producing some amusing but not very useful results.

I don't see the rationale for this.  If pos is zero coming out of the
loops, the only appropriate thing to do is set t->angle to zero.  The
attached patch does that.  It's worked properly in several tests so far.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobase64: Only run benchmark when "-t" is specified.
Michael Niedermayer [Sat, 21 Jan 2012 04:11:19 +0000 (05:11 +0100)]
base64: Only run benchmark when "-t" is specified.

As the test is run during fate and the benchmark is useless for fate
this very slightly speeds up fate. Its also consistent with the other
tests.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobase64: fix little typo
Michael Niedermayer [Sat, 21 Jan 2012 01:09:50 +0000 (02:09 +0100)]
base64: fix little typo

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 21 Jan 2012 00:33:31 +0000 (01:33 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  Add a tool that uses avio to read and write, doing a plain copy of data
  ARM: fix build with FFT enabled and MDCT disabled
  lavf: force single-threaded decoding in avformat_find_stream_info
  avidec: migrate last of lavf from FF_ER_* to AV_EF_*
  avserver: fix build after the next bump.

Conflicts:
libavformat/Makefile
libavformat/avidec.c
libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobase64: add a benchmark for a pure syntax check.
Michael Niedermayer [Fri, 20 Jan 2012 23:32:52 +0000 (00:32 +0100)]
base64: add a benchmark for a pure syntax check.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobase64: simplify end handling in av_base64_encode()
Michael Niedermayer [Fri, 20 Jan 2012 21:56:18 +0000 (22:56 +0100)]
base64: simplify end handling in av_base64_encode()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobase64: optimize av_base64_encode()
Michael Niedermayer [Fri, 20 Jan 2012 21:46:14 +0000 (22:46 +0100)]
base64: optimize av_base64_encode()

This makes the code 2-3 times as fast

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobase64: add benchmark
Michael Niedermayer [Fri, 20 Jan 2012 21:45:51 +0000 (22:45 +0100)]
base64: add benchmark

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomovenc: Reorder entries in the MOVIentry struct, for tigheter packing
Martin Storsjö [Fri, 20 Jan 2012 18:48:19 +0000 (20:48 +0200)]
movenc: Reorder entries in the MOVIentry struct, for tigheter packing

Originally, sizeof(struct MOVIentry) was 48, after the reordering,
it is 40 in my build configuration.

When writing really long mov/mp4 files, this can make a difference
- this saves a bit over 2 MB of memory per hour of video (down to
10.3 MB per hour from 12.3 MB per hour initially) for a video with
75 packets per second - 25 fps + 50 audio packets (which is the
case for AMR audio).

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Remove extern declarations for variables that don't exist
Martin Storsjö [Fri, 20 Jan 2012 14:57:23 +0000 (16:57 +0200)]
rtsp: Remove extern declarations for variables that don't exist

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoaviocat: Flush the output before closing
Martin Storsjö [Fri, 20 Jan 2012 20:53:18 +0000 (22:53 +0200)]
aviocat: Flush the output before closing

Without this, the end of the file might not be transmitted/written.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoSlightly optimize base64 encode.
Reimar Döffinger [Fri, 20 Jan 2012 21:16:30 +0000 (22:16 +0100)]
Slightly optimize base64 encode.

Move handling of last byte outside of innermost loop.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoOptimize output buffer size check in base64 decode.
Reimar Döffinger [Fri, 20 Jan 2012 21:14:20 +0000 (22:14 +0100)]
Optimize output buffer size check in base64 decode.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoMinor optimization of base64 decode.
Reimar Döffinger [Fri, 20 Jan 2012 21:02:32 +0000 (22:02 +0100)]
Minor optimization of base64 decode.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoAdd a tool that uses avio to read and write, doing a plain copy of data
Martin Storsjö [Thu, 19 Jan 2012 12:01:19 +0000 (14:01 +0200)]
Add a tool that uses avio to read and write, doing a plain copy of data

It also optionally can throttle its operation to a particular
speed, to simulate realtime writing.

Signed-off-by: Martin Storsjö <martin@martin.st>