ffmpeg.git
6 years agoFATE: add a test for the transpose filter
Anton Khirnov [Wed, 13 Mar 2013 10:03:08 +0000 (11:03 +0100)]
FATE: add a test for the transpose filter

6 years agoFATE: add a test for the unsharp filter
Anton Khirnov [Wed, 13 Mar 2013 10:03:08 +0000 (11:03 +0100)]
FATE: add a test for the unsharp filter

6 years agoFATE: add a test for the fade filter
Anton Khirnov [Wed, 13 Mar 2013 10:03:08 +0000 (11:03 +0100)]
FATE: add a test for the fade filter

6 years agoFATE: add a test for the drawbox filter
Anton Khirnov [Wed, 13 Mar 2013 10:03:08 +0000 (11:03 +0100)]
FATE: add a test for the drawbox filter

6 years agoFATE: add a test for the boxblur filter
Anton Khirnov [Wed, 13 Mar 2013 10:03:08 +0000 (11:03 +0100)]
FATE: add a test for the boxblur filter

6 years agoFATE: add a test for the gradfun filter
Anton Khirnov [Wed, 13 Mar 2013 10:03:08 +0000 (11:03 +0100)]
FATE: add a test for the gradfun filter

6 years agolavfi/gradfun: remove rounding to match C and SSE code.
Clément Bœsch [Thu, 6 Dec 2012 23:41:04 +0000 (00:41 +0100)]
lavfi/gradfun: remove rounding to match C and SSE code.

There is no noticable benefit for such precision.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agolavfi/gradfun: fix dithering in MMX code.
Clément Bœsch [Thu, 6 Dec 2012 23:39:31 +0000 (00:39 +0100)]
lavfi/gradfun: fix dithering in MMX code.

Current dithering only uses the first 4 instead of the whole 8 random values.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agolavfi/gradfun: fix rounding in MMX code.
Clément Bœsch [Thu, 6 Dec 2012 23:36:29 +0000 (00:36 +0100)]
lavfi/gradfun: fix rounding in MMX code.

Current code divides before increasing precision.

Also reduce upper bound for strength from 255 to 64.  This will prevent
an overflow in the SSSE3 and MMX filter_line code: delta is expressed as
an u16 being shifted by 2 to the left. If it overflows, having a
strength not above 64 will make sure that m is set to 0 (making the
m*m*delta >> 14 expression void).

A value above 64 should not make any sense unless gradfun is used as
a blur filter.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agolavfi/gradfun: do not increment DC pointer for odd values.
Clément Bœsch [Wed, 5 Dec 2012 03:58:03 +0000 (04:58 +0100)]
lavfi/gradfun: do not increment DC pointer for odd values.

First DC is only used once otherwise. This also makes the code
consistent with ASM versions.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agofate: filter: Add dependencies
Diego Biurrun [Sat, 1 Dec 2012 19:38:26 +0000 (20:38 +0100)]
fate: filter: Add dependencies

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agoavconv: add options for reading filtergraphs from a file.
Anton Khirnov [Wed, 13 Mar 2013 13:24:45 +0000 (14:24 +0100)]
avconv: add options for reading filtergraphs from a file.

6 years agoAVOptions: make av_set_options_string() forward options to child objects
Anton Khirnov [Tue, 12 Mar 2013 17:23:27 +0000 (18:23 +0100)]
AVOptions: make av_set_options_string() forward options to child objects

6 years agowin32: Use 64-bit fstat/lseek variants for MSVC as well
Hendrik Leppkes [Tue, 12 Mar 2013 15:45:13 +0000 (16:45 +0100)]
win32: Use 64-bit fstat/lseek variants for MSVC as well

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agowin32: Make ff_win32_open more robust
Reimar Döffinger [Sun, 10 Mar 2013 19:03:19 +0000 (20:03 +0100)]
win32: Make ff_win32_open more robust

- Make MultiByteToWideChar fail when it encounters invalid encoding.
  Without this, invalid characters might just be skipped
- When MultiByteToWideChar fails, assume the file name is in CP_ACP
  and open it via normal open function, even when the file will be
  written
- When malloc fails return error instead of crashing

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agowin32: Allow other programs to open the same files
Reimar Döffinger [Fri, 20 Jan 2012 19:27:22 +0000 (20:27 +0100)]
win32: Allow other programs to open the same files

In order to match Linux behaviour better our Windows-specific
open() replacement should disable Windows default file locking.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoconfigure: Add error_resilience as dependency to the eatqi decoder
Martin Storsjö [Tue, 26 Mar 2013 09:04:08 +0000 (11:04 +0200)]
configure: Add error_resilience as dependency to the eatqi decoder

This makes standalone compilation of the eatqi decoder
succeed. The dependency comes from the shared mpeg12dec.o file.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoape: use correct context for the bit table printed in debug
Kostya Shishkov [Wed, 27 Mar 2013 07:57:08 +0000 (08:57 +0100)]
ape: use correct context for the bit table printed in debug

6 years agobuild: Move setting of SRC_DIR to the only place it is used
Diego Biurrun [Fri, 1 Mar 2013 18:52:32 +0000 (19:52 +0100)]
build: Move setting of SRC_DIR to the only place it is used

6 years agobuild: Remove configure-generated .config file on distclean
Diego Biurrun [Mon, 25 Mar 2013 10:52:52 +0000 (11:52 +0100)]
build: Remove configure-generated .config file on distclean

6 years agomsmpeg4: Split decoding related functions to a separate file
Martin Storsjö [Tue, 26 Mar 2013 13:48:24 +0000 (15:48 +0200)]
msmpeg4: Split decoding related functions to a separate file

This fixes standalone compilation of the msmpeg4v2, msmpeg4v3
and wmv2 encoders, that previously failed to link due to the
decoder codepaths requiring error_resilience.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agompeg12: Move Mpeg1Context declaration to the only place it is used
Diego Biurrun [Tue, 26 Mar 2013 18:52:21 +0000 (19:52 +0100)]
mpeg12: Move Mpeg1Context declaration to the only place it is used

6 years agoSplit MPEG-1/2 decoder code off from MPEG-1/2 common code
Diego Biurrun [Tue, 26 Mar 2013 18:50:40 +0000 (19:50 +0100)]
Split MPEG-1/2 decoder code off from MPEG-1/2 common code

6 years agompeg12: Move some ff_mpeg1_* function declarations to a more suitable place
Diego Biurrun [Tue, 26 Mar 2013 17:25:01 +0000 (18:25 +0100)]
mpeg12: Move some ff_mpeg1_* function declarations to a more suitable place

6 years agocosmetics: Remove unnecessary extern keywords from function declarations
Diego Biurrun [Tue, 26 Mar 2013 17:41:24 +0000 (18:41 +0100)]
cosmetics: Remove unnecessary extern keywords from function declarations

6 years agodca: Move ff_dca_convert_bitstream() to the DCA common code
Diego Biurrun [Tue, 26 Mar 2013 17:17:57 +0000 (18:17 +0100)]
dca: Move ff_dca_convert_bitstream() to the DCA common code

This makes the DCA parser and decoder independent.

6 years agovdpau: wrap codec specific functions in appropiate #ifs
Janne Grunau [Tue, 26 Mar 2013 21:47:29 +0000 (22:47 +0100)]
vdpau: wrap codec specific functions in appropiate #ifs

Fixes linking when only a subset of the deprecated vdpau decoders is
enabled.

6 years agovdpau: fix obsolete mpeg1 vdpau decoder when mpeg2 is disabled
Janne Grunau [Tue, 26 Mar 2013 21:45:40 +0000 (22:45 +0100)]
vdpau: fix obsolete mpeg1 vdpau decoder when mpeg2 is disabled

6 years agoconfigure: fix dependencies of XvMC and old vdpau mpeg2 decoders
Janne Grunau [Tue, 26 Mar 2013 18:59:36 +0000 (19:59 +0100)]
configure: fix dependencies of XvMC and old vdpau mpeg2 decoders

6 years agohwaccel: fix use with frame based multithreading
Janne Grunau [Wed, 13 Mar 2013 22:36:51 +0000 (23:36 +0100)]
hwaccel: fix use with frame based multithreading

Allows use of AVHWAccel based decoders with frame based multithreading.
The decoders will be forced into an non-concurrent mode by delaying
ff_thread_finish_setup() calls after decoding of the current frame
is finished.

This wastes memory by unnecessarily using multiple threads and thus
copies of the decoder context but allows seamless switching between
hardware accelerated and frame threaded software decoding when the
hardware decoder does not support the stream.

6 years agoutils: add workaround for AVHWAccel in ff_get_buffer compat code
Janne Grunau [Mon, 25 Mar 2013 16:28:37 +0000 (17:28 +0100)]
utils: add workaround for AVHWAccel in ff_get_buffer compat code

Since c977039e585bfff28ecc037ef827c6c3d1ed88aa plane count for
PIX_FMT_HWACCEL pixel formats is 0 instead of 1. The created dummy
AVBuffers are still bogus since AVFrame does not hold frame data when
AVHWAccels are used.

6 years agoconfigure: Remove a stray msmpeg4v1 encoder declaration
Martin Storsjö [Tue, 26 Mar 2013 13:34:47 +0000 (15:34 +0200)]
configure: Remove a stray msmpeg4v1 encoder declaration

No such encoder exists currently.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoconfigure: Remove the mpegvideo dependency from svq1
Martin Storsjö [Tue, 26 Mar 2013 10:37:11 +0000 (12:37 +0200)]
configure: Remove the mpegvideo dependency from svq1

The svq1 decoder can be built standalone without mpegvideo.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agox86: vc1dsp: Fix indentation
Martin Storsjö [Tue, 26 Mar 2013 11:54:22 +0000 (13:54 +0200)]
x86: vc1dsp: Fix indentation

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoh264: Make it possible to compile without error_resilience
Ronald S. Bultje [Sun, 3 Mar 2013 00:57:26 +0000 (16:57 -0800)]
h264: Make it possible to compile without error_resilience

Error resilience is enabled by the h264 decoder, unless explicitly
disabled. --disable-everything --enable-decoder=h264 will produce
a h264 decoder with error resilience enabled, while
--disable-everything --enable-decoder=h264 --disable-error-resilience
will produce a h264 decoder with error resilience disabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agolavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
Martin Storsjö [Mon, 25 Mar 2013 12:11:41 +0000 (14:11 +0200)]
lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo

Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agolavc: Move start code finding to utils.c
Martin Storsjö [Mon, 25 Mar 2013 10:42:57 +0000 (12:42 +0200)]
lavc: Move start code finding to utils.c

This allows dropping the mpegvideo dependency from a number of
components.

This also fixes standalone building of the h264 parser, which
was broken in 64e438697.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoape: 3.80-3.92 decoding support
Kostya Shishkov [Fri, 15 Mar 2013 20:18:23 +0000 (21:18 +0100)]
ape: 3.80-3.92 decoding support

6 years agoh264: Remove an unused variable
Martin Storsjö [Mon, 25 Mar 2013 12:27:30 +0000 (14:27 +0200)]
h264: Remove an unused variable

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agox86: consistently use unaligned movs in the unaligned bswap
Janne Grunau [Sun, 24 Mar 2013 18:44:23 +0000 (19:44 +0100)]
x86: consistently use unaligned movs in the unaligned bswap

Fixes fate errors in asv1, ffvhuff and huffyuv on x86_32.

6 years agosndio_dec: Add missing includes for av_gettime()
Martin Storsjö [Sun, 24 Mar 2013 10:11:58 +0000 (12:11 +0200)]
sndio_dec: Add missing includes for av_gettime()

This is necessary after the old av_gettime in libavformat was
dropped.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agox86: Change a missed occurrance of int to ptrdiff_t for strides
Martin Storsjö [Sat, 23 Mar 2013 21:35:19 +0000 (23:35 +0200)]
x86: Change a missed occurrance of int to ptrdiff_t for strides

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agox86: Remove win64 xmm clobbering wrappers for the now removed avcodec_encode_video...
Martin Storsjö [Sat, 23 Mar 2013 20:12:54 +0000 (22:12 +0200)]
x86: Remove win64 xmm clobbering wrappers for the now removed avcodec_encode_video function

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agobktr: Add missing includes for av_gettime()
Martin Storsjö [Sat, 23 Mar 2013 20:16:37 +0000 (22:16 +0200)]
bktr: Add missing includes for av_gettime()

This is necessary after the old av_gettime in libavformat was
dropped.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agofate: use little endian yuv444p10 in h264-reinit tests
Janne Grunau [Sat, 23 Mar 2013 12:12:36 +0000 (13:12 +0100)]
fate: use little endian yuv444p10 in h264-reinit tests

Fixes fate big endian configs.

6 years agofate: add test for cropping h264 to container dimensions
Janne Grunau [Wed, 20 Mar 2013 16:44:43 +0000 (17:44 +0100)]
fate: add test for cropping h264 to container dimensions

Tests the workaround added for 1080 videos created with Canon cameras
in 30f515091c323da59c0f1b533703dedca2f4b95d.

6 years agoFATE: add a tscc2 test.
Anton Khirnov [Mon, 18 Mar 2013 14:59:05 +0000 (15:59 +0100)]
FATE: add a tscc2 test.

6 years agotscc2: allocate AVFrame properly.
Anton Khirnov [Mon, 18 Mar 2013 14:53:51 +0000 (15:53 +0100)]
tscc2: allocate AVFrame properly.

6 years agoaf_asyncts: fix compensation and PTS monotonicity
Jindřich Makovička [Sat, 9 Mar 2013 09:08:09 +0000 (10:08 +0100)]
af_asyncts: fix compensation and PTS monotonicity

This patch improves af_asyncts behavior on streams with bogus PTS, which
are either non-monotonic, or contain PTS jitter, and trigger the
non-monotonicity error. With this patch, af_asyncts is able to correct
these streams and avoid the error.

Firstly, it fixes resample compensation calculation by supplying proper
units to avresample_set_compensation (sample count per second instead
of sample count per some arbitrary frame size). Also, the calculation of
the compensation itself is fixed - delta is proportional to an adjustment
of the compensation, not the compensation itself. Ideally, the compensation
should converge to a value that keeps delta at zero.

To be able to deal with sources with PTS jitter even without resampling,
small PTS errors are adjusted, so the output frames do not overlap.

Finally, one more monotonicity check is added.

The FATE reference changes because now there is 8 less samples of
silence because of the pts jitter.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
6 years agoavutil/frame: add all remaining frame properties to av_frame_copy_props
Hendrik Leppkes [Fri, 22 Mar 2013 14:13:42 +0000 (15:13 +0100)]
avutil/frame: add all remaining frame properties to av_frame_copy_props

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agoconfigure: Enable hwaccels without external dependencies by default.
Diego Biurrun [Mon, 18 Mar 2013 21:27:03 +0000 (22:27 +0100)]
configure: Enable hwaccels without external dependencies by default.

6 years agodoc/developer: Clarify symbol naming prefixes section.
Diego Biurrun [Sat, 16 Mar 2013 23:57:12 +0000 (00:57 +0100)]
doc/developer: Clarify symbol naming prefixes section.

6 years agoh264: remove redundant freeing of DPB in h264_decode_end
Anton Khirnov [Tue, 12 Mar 2013 11:33:19 +0000 (12:33 +0100)]
h264: remove redundant freeing of DPB in h264_decode_end

free_tables() frees it already.

6 years agoh264: add a parameter to the CHROMA444 macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the CHROMA444 macro.

This way it does not look like a constant.

6 years agoh264: add a parameter to the CHROMA422 macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the CHROMA422 macro.

This way it does not look like a constant.

6 years agoh264: add a parameter to the CABAC macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the CABAC macro.

This way it does not look like a constant.

6 years agoh264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.

This way it does not look like a constant.

6 years agoh264: add a parameter to the FIELD_PICTURE macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the FIELD_PICTURE macro.

This way it does not look like a constant.

6 years agoh264: add a parameter to the FRAME_MBAFF macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the FRAME_MBAFF macro.

This way it does not look like a constant.

6 years agoh264: add a parameter to the MB_FIELD macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the MB_FIELD macro.

This way it does not look like a constant.

6 years agoh264: add a parameter to the MB_MBAFF macro.
Anton Khirnov [Sat, 9 Mar 2013 19:37:11 +0000 (20:37 +0100)]
h264: add a parameter to the MB_MBAFF macro.

This way it does not look like a constant.

6 years agoh264: merge common_init() into ff_h264_decode_init.
Anton Khirnov [Sat, 5 Nov 2011 18:26:54 +0000 (19:26 +0100)]
h264: merge common_init() into ff_h264_decode_init.

There is no point in keeping those separate.

6 years agoh264: make ff_h264_frame_start static.
Anton Khirnov [Sat, 9 Mar 2013 19:21:17 +0000 (20:21 +0100)]
h264: make ff_h264_frame_start static.

It is not called from outside h264.c

6 years agofate: add tests for h264 decoder reinit
Janne Grunau [Tue, 19 Mar 2013 14:49:53 +0000 (15:49 +0100)]
fate: add tests for h264 decoder reinit

6 years agoh264: fix bit depth changes with frame threading
Janne Grunau [Wed, 20 Mar 2013 11:57:46 +0000 (12:57 +0100)]
h264: fix bit depth changes with frame threading

AVCodecContext.bits_per_raw_sample is updated from the previous thread
in the generic update function before the codec specific update_thread
function is called. The check for reinitialization of dsp functions uses
bits_per_raw_sample. When called from update_thread_context it will be
already at the current value and the dsp functions aren't updated if
only the bit depth changes.

6 years agortmp: Pass the parameters to do_adobe_auth in the right order
Martin Storsjö [Wed, 20 Mar 2013 09:07:53 +0000 (11:07 +0200)]
rtmp: Pass the parameters to do_adobe_auth in the right order

do_adobe_auth takes the parameters in the order "opaque, challenge".

Due to the way they are treated, this didn't matter in the tested
setups though - if both are set, we only use one. In the tested
setups (Wowza and Akamai) either one of them were null or they
were both set to the same value, which is why this worked before.

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agompegvideo: allocate hwaccel privdata after the frame buffer
Hendrik Leppkes [Mon, 18 Mar 2013 17:54:44 +0000 (18:54 +0100)]
mpegvideo: allocate hwaccel privdata after the frame buffer

This ensures the hwaccel privdata does not leak when a frame buffer could
not be allocated (and toggle the assert when the frame is re-used).
Having no frame buffer available is quite common when using the DXVA2
hwaccel in situations where the DXVA2 renderer is being re-allocated, for
example when moving between displays.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agoh264: allocate hwaccel privdata after the frame buffer
Hendrik Leppkes [Mon, 18 Mar 2013 17:54:43 +0000 (18:54 +0100)]
h264: allocate hwaccel privdata after the frame buffer

This ensures the hwaccel privdata does not leak when a frame buffer could
not be allocated (and toggle the assert when the frame is re-used).
Having no frame buffer available is quite common when using the DXVA2
hwaccel in situations where the DXVA2 renderer is being re-allocated, for
example when moving between displays.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agopthread: unref already decoded frames when flushing the decoder
Hendrik Leppkes [Mon, 18 Mar 2013 16:09:49 +0000 (17:09 +0100)]
pthread: unref already decoded frames when flushing the decoder

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agompegvideo: fix allocation of the hwaccel_picture_private data
Hendrik Leppkes [Fri, 15 Mar 2013 20:20:37 +0000 (21:20 +0100)]
mpegvideo: fix allocation of the hwaccel_picture_private data

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agolavc: update the doxy for avcodec_decode_{video,audio} wtih refcounting.
Anton Khirnov [Mon, 18 Mar 2013 06:38:20 +0000 (07:38 +0100)]
lavc: update the doxy for avcodec_decode_{video,audio} wtih refcounting.

6 years agobuffersrc: fix a typo.
Anton Khirnov [Mon, 18 Mar 2013 06:22:58 +0000 (07:22 +0100)]
buffersrc: fix a typo.

Vertical shift is log2_chroma_h, not log2_chroma_w.

6 years agolavc, lavfi: fix counting number of planes in AVBufferRef wrappers
Anton Khirnov [Sat, 16 Mar 2013 21:36:56 +0000 (22:36 +0100)]
lavc, lavfi: fix counting number of planes in AVBufferRef wrappers

Number of planes is not always equal to the number of components even
for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components
in two planes.

6 years agopixdesc: add a function for counting planes in a pixel format.
Anton Khirnov [Sat, 16 Mar 2013 18:37:52 +0000 (19:37 +0100)]
pixdesc: add a function for counting planes in a pixel format.

6 years agoavplay: remove the -debug option.
Anton Khirnov [Tue, 19 Mar 2013 06:55:25 +0000 (07:55 +0100)]
avplay: remove the -debug option.

It just shadows the corresponding AVOption and prevents using named
constants.

6 years agoRevert "asfenc: return error on negative timestamp"
Anton Khirnov [Tue, 19 Mar 2013 10:04:55 +0000 (11:04 +0100)]
Revert "asfenc: return error on negative timestamp"

This reverts commit d1bec33b46091546c5b2e6815210e73f87abf413, it breaks
FATE.

6 years agoprint_options: do not generate docs for options without enc or dec flags
Anton Khirnov [Fri, 22 Feb 2013 22:01:54 +0000 (23:01 +0100)]
print_options: do not generate docs for options without enc or dec flags

Those are not usable from the avtools, so mentioning them in the
manpages just confuses the reader.

6 years agompeg12: do not fail on zero dimensions in the sequence header.
Anton Khirnov [Sat, 16 Mar 2013 12:08:32 +0000 (13:08 +0100)]
mpeg12: do not fail on zero dimensions in the sequence header.

The total frame size is a combination of the 12 bits in the sequence
header and 2 more bits in the the sequence extension. While the
specification explicitly forbids the dimensions from the sequence header
from being 0 (thus ruling out multiples of 4096), such videos
apparrently exist in the wild so we should attempt to decode them.

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Fixes Bug 416.

6 years agoiff: validate CMAP palette size
Kostya Shishkov [Sun, 17 Mar 2013 19:22:19 +0000 (20:22 +0100)]
iff: validate CMAP palette size

Fixes CVE-2013-2495

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
6 years agoasfenc: return error on negative timestamp
Luca Barbato [Sun, 17 Mar 2013 14:13:43 +0000 (15:13 +0100)]
asfenc: return error on negative timestamp

According to the specification the timestamp is represented by a 32bit
unsigned.

CC: libav-stable@libav.org
6 years agolavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
Anton Khirnov [Sat, 16 Mar 2013 17:09:17 +0000 (18:09 +0100)]
lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers

It is supposed to be height * linesize, not width * linesize.
Thanks to Hendrik Leppkes for pointing out the bug.

6 years agodocument the release process
Reinhard Tartler [Sun, 24 Feb 2013 18:11:07 +0000 (19:11 +0100)]
document the release process

6 years agoaf_join: do not leak input frames.
Anton Khirnov [Wed, 13 Mar 2013 19:43:35 +0000 (20:43 +0100)]
af_join: do not leak input frames.

6 years agoasrc_anullsrc: return EOF, not -1
Anton Khirnov [Tue, 12 Mar 2013 19:17:32 +0000 (20:17 +0100)]
asrc_anullsrc: return EOF, not -1

6 years agoasrc_anullsrc: do not set samplerate and channel layout explicitly
Anton Khirnov [Tue, 12 Mar 2013 19:14:29 +0000 (20:14 +0100)]
asrc_anullsrc: do not set samplerate and channel layout explicitly

They are auto-negotiated.

6 years agovf_showinfo: remove its useless init function
Anton Khirnov [Tue, 12 Mar 2013 18:45:56 +0000 (19:45 +0100)]
vf_showinfo: remove its useless init function

Filter private data is memset to 0 so there is no point in explicitly
initing anything to 0.

6 years agoAVOptions: fix using named constants with child contexts.
Anton Khirnov [Tue, 12 Mar 2013 17:21:27 +0000 (18:21 +0100)]
AVOptions: fix using named constants with child contexts.

The named constant needs to be searched for in the same object on which
the option is set, i.e. target_obj.

6 years agoAVOption: remove an unused function parameter.
Anton Khirnov [Tue, 12 Mar 2013 17:09:48 +0000 (18:09 +0100)]
AVOption: remove an unused function parameter.

6 years agofilters.texi: restore mistakenly removed section name for noformat
Anton Khirnov [Mon, 25 Feb 2013 22:01:11 +0000 (23:01 +0100)]
filters.texi: restore mistakenly removed section name for noformat

6 years agoavfiltergraph: use sizeof(var) instead of sizeof(type)
Anton Khirnov [Mon, 25 Feb 2013 11:14:56 +0000 (12:14 +0100)]
avfiltergraph: use sizeof(var) instead of sizeof(type)

6 years agoavfiltergraph: replace AVFilterGraph.filter_count with nb_filters
Anton Khirnov [Mon, 25 Feb 2013 11:12:36 +0000 (12:12 +0100)]
avfiltergraph: replace AVFilterGraph.filter_count with nb_filters

This is more consistent with the naming in the rest of Libav.

6 years agolavfi: use designated initializers in avfilter_class
Anton Khirnov [Mon, 25 Feb 2013 11:09:01 +0000 (12:09 +0100)]
lavfi: use designated initializers in avfilter_class

6 years agolavf: sanity check size in av_get/append_packet().
Anton Khirnov [Tue, 19 Feb 2013 16:20:35 +0000 (17:20 +0100)]
lavf: sanity check size in av_get/append_packet().

To avoid allocating ridiculous amounts of memory for corrupted files,
read the input in chunks limited to filesize or an arbitrary large
amount when that is not known (chosen to be 50M).

6 years agolzo: fix overflow checking in copy_backptr()
Xi Wang [Fri, 15 Mar 2013 10:59:22 +0000 (06:59 -0400)]
lzo: fix overflow checking in copy_backptr()

The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.

Remove the check.  Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
6 years agoflacdec: simplify bounds checking in flac_probe()
Xi Wang [Fri, 15 Mar 2013 11:11:47 +0000 (07:11 -0400)]
flacdec: simplify bounds checking in flac_probe()

Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
6 years agoatrac3: avoid oversized shifting in decode_bytes()
Xi Wang [Fri, 15 Mar 2013 10:31:21 +0000 (06:31 -0400)]
atrac3: avoid oversized shifting in decode_bytes()

When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.

    (0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))

Avoid oversized shifting.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
6 years agoadd support for Monkey's Audio versions from 3.93
Kostya Shishkov [Tue, 12 Mar 2013 18:33:29 +0000 (19:33 +0100)]
add support for Monkey's Audio versions from 3.93

6 years agoape: provide two additional bytes in buffer for old MAC versions
Kostya Shishkov [Tue, 12 Mar 2013 06:17:03 +0000 (07:17 +0100)]
ape: provide two additional bytes in buffer for old MAC versions

Range coder in 3.90-3.95 overread two bytes in the final normalize.

6 years agoape: make version-dependent decoding functions called via pointers
Kostya Shishkov [Tue, 12 Mar 2013 06:33:12 +0000 (07:33 +0100)]
ape: make version-dependent decoding functions called via pointers

This will help in supporting old versions, e.g. version 3.93 uses the same
range coder but different predictor and version 3.82 uses different range
coder and predictor. Also this should not make decoding newer versions slower
by introducing additional checks on versions.

6 years agompegts: add support for stream_type 0x42, which is CAVS
Can Wu [Tue, 26 Feb 2013 02:01:21 +0000 (10:01 +0800)]
mpegts: add support for stream_type 0x42, which is CAVS

This allows demuxing and muxing of CAVS TS streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>