]> git.sesse.net Git - ffmpeg/log
ffmpeg
9 years agomov: Correctly allocate ctts_data
Luca Barbato [Sun, 31 May 2015 10:28:33 +0000 (12:28 +0200)]
mov: Correctly allocate ctts_data

It can be reallocated.

CC: libav-stable@libav.org
9 years agomov: Fix two memleaks
Andreas Cadhalpun [Tue, 26 May 2015 13:24:36 +0000 (14:24 +0100)]
mov: Fix two memleaks

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
9 years agovp9: Parse subsampling and report missing feature
Vittorio Giovara [Wed, 27 May 2015 14:06:57 +0000 (15:06 +0100)]
vp9: Parse subsampling and report missing feature

9 years agox86: check for AV_CPU_FLAG_AVXSLOW where useful
James Almer [Tue, 26 May 2015 17:29:08 +0000 (14:29 -0300)]
x86: check for AV_CPU_FLAG_AVXSLOW where useful

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agox86: Add helper macros to check for slow cpuflags
James Almer [Tue, 26 May 2015 17:29:07 +0000 (14:29 -0300)]
x86: Add helper macros to check for slow cpuflags

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agox86: add AV_CPU_FLAG_AVXSLOW flag
James Almer [Tue, 26 May 2015 17:29:06 +0000 (14:29 -0300)]
x86: add AV_CPU_FLAG_AVXSLOW flag

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoppc: vsx: Implement diff_pixels and get_pixels
Luca Barbato [Tue, 12 May 2015 00:38:56 +0000 (02:38 +0200)]
ppc: vsx: Implement diff_pixels and get_pixels

Use a macro to abstract the endianness.

9 years agoppc: vsx: Implement float_dsp
Luca Barbato [Mon, 11 May 2015 00:44:10 +0000 (02:44 +0200)]
ppc: vsx: Implement float_dsp

9 years agoppc: cpu: Add support for VSX and POWER8 extensions
Luca Barbato [Sun, 10 May 2015 02:15:59 +0000 (04:15 +0200)]
ppc: cpu: Add support for VSX and POWER8 extensions

9 years agoppc: Restrict some Altivec implementations to Big Endian
Luca Barbato [Sun, 10 May 2015 21:22:17 +0000 (23:22 +0200)]
ppc: Restrict some Altivec implementations to Big Endian

In Little Endian the vec_ld/vec_st operations work as
expected only for byte-vectors.

9 years agoppc: configure: Support ISA 2.06 and later
Luca Barbato [Sun, 10 May 2015 00:47:31 +0000 (02:47 +0200)]
ppc: configure: Support ISA 2.06 and later

POWER 7 and POWER 8 support VSX and ldbrx.

POWER 8 supports additional extended VSX instructions introduced
with ISA 2.07.

9 years agoppc: Clarify and extend the cpuid check
Luca Barbato [Sat, 9 May 2015 22:49:51 +0000 (00:49 +0200)]
ppc: Clarify and extend the cpuid check

Add POWER entries.

9 years agoppc: linux: Check altivec using the auxv
Luca Barbato [Fri, 3 Apr 2015 13:31:32 +0000 (15:31 +0200)]
ppc: linux: Check altivec using the auxv

Should prevent trying to use altivec when it is disabled by the kernel.

9 years agoppc: pixblockdsp: Use the abriged vector types
Luca Barbato [Mon, 11 May 2015 22:45:37 +0000 (00:45 +0200)]
ppc: pixblockdsp: Use the abriged vector types

9 years agoppc: avutil: Use the abriged vector types
Luca Barbato [Sun, 10 May 2015 02:37:50 +0000 (04:37 +0200)]
ppc: avutil: Use the abriged vector types

9 years agoppc: avutil: Drop a potentially dangerous workaround
Luca Barbato [Sun, 10 May 2015 20:48:30 +0000 (22:48 +0200)]
ppc: avutil: Drop a potentially dangerous workaround

The compiler is free to optimize such expressions in any sort of way.

9 years agonetwork: prevent SIGPIPE on OSX
wm4 [Thu, 28 May 2015 16:23:27 +0000 (18:23 +0200)]
network: prevent SIGPIPE on OSX

OSX does not know MSG_NOSIGNAL. BSD (which OSX is based on) has got
the socket option SO_NOSIGPIPE (even if modern BSDs also support
MSG_NOSIGNAL).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoh264: Make sure reinit failures mark the context as not initialized
Luca Barbato [Mon, 25 May 2015 20:30:10 +0000 (22:30 +0200)]
h264: Make sure reinit failures mark the context as not initialized

Bug-Id: CVE-2015-3417
CC: libav-stable@libav.org
9 years agomsrle: Use FFABS to determine the frame size in msrle_decode_pal4
Luca Barbato [Mon, 25 May 2015 19:53:26 +0000 (21:53 +0200)]
msrle: Use FFABS to determine the frame size in msrle_decode_pal4

As done in msrle_decode_8_16_24_32.

Bug-Id: CVE-2015-3395
CC: libav-stable@libav.org
9 years agortmpdh: Generate the whole private exponent using av_get_random_seed() with nettle/gmp
Martin Storsjö [Fri, 29 May 2015 07:14:39 +0000 (10:14 +0300)]
rtmpdh: Generate the whole private exponent using av_get_random_seed() with nettle/gmp

Don't use a PRNG for generating it; that defies the intended use
within the cryptograhic handshake.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Create sufficiently long private keys for gcrypt/nettle
Martin Storsjö [Thu, 28 May 2015 08:42:44 +0000 (11:42 +0300)]
rtmpdh: Create sufficiently long private keys for gcrypt/nettle

There was a misunderstanding betewen bits and bytes for the parameter
value for generating random big numbers.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key
Martin Storsjö [Thu, 28 May 2015 08:39:45 +0000 (11:39 +0300)]
rtmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Add fate test for the DH handshake routine
Martin Storsjö [Thu, 28 May 2015 07:54:11 +0000 (10:54 +0300)]
rtmpdh: Add fate test for the DH handshake routine

This helps if these functions need to be implemented using another
crypto API.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Pass the actual buffer size of the output secret key
Martin Storsjö [Thu, 28 May 2015 07:11:27 +0000 (10:11 +0300)]
rtmpdh: Pass the actual buffer size of the output secret key

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Check the output buffer size in the openssl version of dh_compute_key
Martin Storsjö [Thu, 28 May 2015 07:08:27 +0000 (10:08 +0300)]
rtmpdh: Check the output buffer size in the openssl version of dh_compute_key

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Fix a local variable name in the nettle/gcrypt codepath
Martin Storsjö [Thu, 28 May 2015 07:03:39 +0000 (10:03 +0300)]
rtmpdh: Fix a local variable name in the nettle/gcrypt codepath

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn
Martin Storsjö [Thu, 28 May 2015 06:47:44 +0000 (09:47 +0300)]
rtmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agopixfmt: remove misleading and broken documentation
wm4 [Thu, 28 May 2015 14:26:20 +0000 (16:26 +0200)]
pixfmt: remove misleading and broken documentation

This was probably broken some time ago. The breakage is now part of the
ABI. For example, we have:

    AV_PIX_FMT_XYZ12BE
    AV_PIX_FMT_NV16
    AV_PIX_FMT_NV20LE

AV_PIX_FMT_NV20LE is wrong. It has the value 113, but as little-endian
format it should be even. This must have been quite obvious when these
formats were added (because of the AV_PIX_FMT_XYZ12BE entry), but
nobody cared or knew about this.

The future libavutil major bump will also break this additionally,
because disabling FF_API_VDPAU will remove an odd number of entries from
the middle of the enum.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agox86: cavs: Remove an unneeded scratch buffer
Michael Niedermayer [Thu, 28 May 2015 10:38:35 +0000 (12:38 +0200)]
x86: cavs: Remove an unneeded scratch buffer

Simplifies the code and makes it build on certain compilers
running out of registers on x86.

CC: libav-stable@libav.org
Reported-By: mudler
9 years agorl: Add error checking to ff_rl_init().
Anton Khirnov [Fri, 22 May 2015 18:50:14 +0000 (19:50 +0100)]
rl: Add error checking to ff_rl_init().

9 years agorl: Add a function for freeing dynamically allocated tables.
Anton Khirnov [Fri, 22 May 2015 18:50:13 +0000 (19:50 +0100)]
rl: Add a function for freeing dynamically allocated tables.

Such tables are not used anywhere currently, but that should change.

9 years agorl: Rename ff_*_rl() to ff_rl_*()
Anton Khirnov [Fri, 22 May 2015 18:50:12 +0000 (19:50 +0100)]
rl: Rename ff_*_rl() to ff_rl_*()

9 years agompegvideo: Move ff_*_rl functions to a separate file
Anton Khirnov [Fri, 22 May 2015 18:50:11 +0000 (19:50 +0100)]
mpegvideo: Move ff_*_rl functions to a separate file

9 years agompegvideo: Drop exchange_uv() function and use its code directly
Vittorio Giovara [Fri, 22 May 2015 18:50:10 +0000 (19:50 +0100)]
mpegvideo: Drop exchange_uv() function and use its code directly

Code is small enough that there is no advantage in a separate function.

9 years agotls_gnutls: Add missing includes for the gcrypt thread safety callbacks
Martin Storsjö [Thu, 28 May 2015 07:18:49 +0000 (10:18 +0300)]
tls_gnutls: Add missing includes for the gcrypt thread safety callbacks

This fixes building with gcrypt-backed gnutls versions, broken
in 57cde2b180.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agox86inc: Clear __SECT__
Timothy Gu [Mon, 25 May 2015 23:00:43 +0000 (16:00 -0700)]
x86inc: Clear __SECT__

Silences warning(s) like:

    libavcodec/x86/fft.asm:93: warning: section flags ignored on
    section redeclaration

The cause of this warning is that because `struc` and `endstruc`
attempts to revert to the previous section state [1].

The section state is stored in the macro __SECT__, defined by
x86inc.asm to be `.note.GNU-stack ...`, through the `SECTION`
directive [2].

Thus, the `.note.GNU-stack` section is defined twice
(once in x86inc.asm, once during `endstruc`), causing the warning.

That is the first part of the commit: using the primitive `[section]` format
for .note.GNU-stack etc., which does not update `__SECT__` [2].

That fixes only half of the problem. Even without any `SECTION` directives,
`__SECT__` is predefined as `.text`, which conflicting with the later
`SECTION_TEXT` (which expands to `.text align=16`).

[1]: http://www.nasm.us/doc/nasmdoc6.html#section-6.4
[2]: http://www.nasm.us/doc/nasmdoc6.html#section-6.3

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agolavf: move TLS-related ifdeffery to library specific files
wm4 [Tue, 26 May 2015 17:25:42 +0000 (19:25 +0200)]
lavf: move TLS-related ifdeffery to library specific files

There is no need to have this mess in network.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agolavf: split tls.c
wm4 [Tue, 26 May 2015 17:25:41 +0000 (19:25 +0200)]
lavf: split tls.c

Move the OpenSSL and GnuTLS implementations to their own files. Other
than the connection code (including options) and some boilerplate, no
code is actually shared.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodoc: Fix spelling of 'Transmission'
Sebastian Ramacher [Tue, 26 May 2015 02:37:13 +0000 (04:37 +0200)]
doc: Fix spelling of 'Transmission'

Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoD3D11va: add a Direct3D11 video decoder similar to DXVA2
Steve Lhomme [Mon, 11 May 2015 08:52:47 +0000 (10:52 +0200)]
D3D11va: add a Direct3D11 video decoder similar to DXVA2

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agompegvideo: Rework various functions not to use MpegEncContext directly
Vittorio Giovara [Mon, 27 Apr 2015 21:09:21 +0000 (22:09 +0100)]
mpegvideo: Rework various functions not to use MpegEncContext directly

9 years agompegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly
Vittorio Giovara [Mon, 27 Apr 2015 21:09:20 +0000 (22:09 +0100)]
mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly

9 years agompegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly
Vittorio Giovara [Mon, 27 Apr 2015 21:09:19 +0000 (22:09 +0100)]
mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly

This skips setting the memory to 0 but allows for reuse on different
contextes. Oracle did not report any unsual activity because of it.

9 years agompegvideo: Drop stream_codec_tag
Vittorio Giovara [Mon, 27 Apr 2015 18:13:28 +0000 (19:13 +0100)]
mpegvideo: Drop stream_codec_tag

The field is unused.

9 years agompegvideo: Drop err_recognition
Vittorio Giovara [Mon, 27 Apr 2015 18:13:27 +0000 (19:13 +0100)]
mpegvideo: Drop err_recognition

It is just a duplicate of an AVCodecContext member so use it instead.

9 years agompegvideo: Drop flags and flags2
Vittorio Giovara [Mon, 27 Apr 2015 18:13:25 +0000 (19:13 +0100)]
mpegvideo: Drop flags and flags2

They are just duplicates of AVCodecContext members so use those instead.

9 years agotls: fix compilation when both gnutls and openssl are enabled
James Almer [Fri, 22 May 2015 03:32:17 +0000 (00:32 -0300)]
tls: fix compilation when both gnutls and openssl are enabled

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agotls: Remove all the local polling loops
Martin Storsjö [Thu, 10 Nov 2011 15:44:27 +0000 (17:44 +0200)]
tls: Remove all the local polling loops

These aren't necessary any longer.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agotls: Remove the nonblocking code
Martin Storsjö [Thu, 10 Nov 2011 15:35:39 +0000 (17:35 +0200)]
tls: Remove the nonblocking code

Since the underlying URLContext read functions are used,
they handle interruption, without having to handle it at
this level.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agotls: Use custom IO to read from the URLContext
Martin Storsjö [Thu, 10 Nov 2011 14:58:58 +0000 (16:58 +0200)]
tls: Use custom IO to read from the URLContext

This avoids hijacking the fd, by reading using the normal
URLContext functions instead. This allowing reading data that has
been buffered in the underlying URLContext.

This avoids using the libraries own send functions that can
cause SIGPIPE.

The fd is still used for polling the lowlevel socket, for
waiting for retries.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agohevc: make avcodec_decode_video2() fail if get_format() fails
wm4 [Thu, 14 May 2015 17:23:57 +0000 (19:23 +0200)]
hevc: make avcodec_decode_video2() fail if get_format() fails

Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavfi: Move avcodec header to the only filter needing it
Vittorio Giovara [Thu, 14 May 2015 22:37:25 +0000 (23:37 +0100)]
lavfi: Move avcodec header to the only filter needing it

af_ashowinfo, due to the enum AVAudioServiceType use.

9 years agovmnc: Delay pixel size check
Vittorio Giovara [Tue, 19 May 2015 15:57:46 +0000 (16:57 +0100)]
vmnc: Delay pixel size check

Some clients incorrectly set 24 as bits_per_coded_sample, while
the actual value is preserved in one of the codec headers.
In order to work around this, delay the check until decode_frame().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agodoc: Add $branch to FATE config template
Timothy Gu [Wed, 13 May 2015 23:46:47 +0000 (16:46 -0700)]
doc: Add $branch to FATE config template

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agovda: Make output CVPixelBuffer format configurable
Stefano Pigozzi [Sun, 10 May 2015 19:32:59 +0000 (21:32 +0200)]
vda: Make output CVPixelBuffer format configurable

This is useful for client programs to ask for nv12 surfaces instead of the
current default (uyvy), since those are more efficient to decode to.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agolibx265: Use the Multi-library Interface
Gopu Govindaswamy [Mon, 11 May 2015 15:25:59 +0000 (16:25 +0100)]
libx265: Use the Multi-library Interface

Use the Multi-library interface to load at runtime x265 libraries
supporting alternative bit depths (e.g. 8bit and 16bit).

The linked library will try to load the library supporting the
pixel format if it is not supported by itself.

Fallback requesting the native library (passing 0 to x265_api_get) if
a library supporting the requested bit depth is not available.

Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomjpegenc: Fix JFIF header byte ordering
Shiina Hideaki [Thu, 7 May 2015 00:46:55 +0000 (01:46 +0100)]
mjpegenc: Fix JFIF header byte ordering

The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agodnxhd: Print unknown header when found
Vittorio Giovara [Tue, 12 May 2015 15:19:12 +0000 (16:19 +0100)]
dnxhd: Print unknown header when found

9 years agomkv: Print unsupported mov tags when found
Vittorio Giovara [Mon, 11 May 2015 16:23:43 +0000 (17:23 +0100)]
mkv: Print unsupported mov tags when found

9 years agoquickdraw: Skip the empty 512 byte header for images
Vittorio Giovara [Mon, 11 May 2015 19:11:04 +0000 (20:11 +0100)]
quickdraw: Skip the empty 512 byte header for images

Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
9 years agoquickdraw: Make the palette opaque
Carl Eugen Hoyos [Mon, 11 May 2015 19:11:03 +0000 (20:11 +0100)]
quickdraw: Make the palette opaque

Additional overflow fix by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoriff: Add MultiScope II fourcc MSC2 as MJPEG
Carl Eugen Hoyos [Fri, 8 May 2015 14:39:23 +0000 (15:39 +0100)]
riff: Add MultiScope II fourcc MSC2 as MJPEG

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agodca_parser: Extend DTS core sync word and fix existing check
foo86 [Wed, 29 Apr 2015 08:14:55 +0000 (11:14 +0300)]
dca_parser: Extend DTS core sync word and fix existing check

The previous version checked for 14-bit streams and did not properly
work across buffer boundaries.

Use the 64-bit parser state to make extended sync word detection work
across buffer boundary and check the extended sync word for 16-bit LE
and BE core streams to reduce probability of alias sync detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agodashenc: Reduce the segment duration if cutting out parts with edit lists
Martin Storsjö [Sun, 10 May 2015 07:05:37 +0000 (10:05 +0300)]
dashenc: Reduce the segment duration if cutting out parts with edit lists

This makes sure that the time + duration of the first segment
matches the start time of the next segment for e.g. AAC audio
with encoder delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodashenc: replace attribute id with contentType for the AdaptationSet element
James Almer [Sun, 10 May 2015 06:33:37 +0000 (03:33 -0300)]
dashenc: replace attribute id with contentType for the AdaptationSet element

id should be an integer, not a string. It is also optional, so use
contentType instead which is the proper attribute for these values.

This fixes an MPD validation error.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agofate: Reduce the number of frames used to test video filters
Luca Barbato [Sat, 9 May 2015 21:44:30 +0000 (23:44 +0200)]
fate: Reduce the number of frames used to test video filters

Use 5 frames for video filter tests and a single one for the
pixelformat tests.

Greatly reduces the test duration without reducing coverage.

9 years agoid3v2: Do not export empty APIC description
wm4 [Fri, 8 May 2015 16:19:12 +0000 (18:19 +0200)]
id3v2: Do not export empty APIC description

APIC tags always have a description. Tag writers obviously leave it
empty if there is no description. In this case, libavformat would export
"" as title. Do not set the title instead.

9 years agopng: Set the color range as full range
wm4 [Fri, 8 May 2015 15:01:50 +0000 (17:01 +0200)]
png: Set the color range as full range

The format uses full range for the gray formats.

CC: libav-stable@libav.org
9 years agonut: Make sure to clean up on read_header failure
Luca Barbato [Wed, 29 Apr 2015 19:29:49 +0000 (21:29 +0200)]
nut: Make sure to clean up on read_header failure

Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work.

CC: libav-stable@libav.org
9 years agoavi: Validate sample_size
Andreas Cadhalpun [Wed, 6 May 2015 00:26:57 +0000 (02:26 +0200)]
avi: Validate sample_size

And either error out or set it to 0 if it is negative.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agonut: Check chapter creation in decode_info_header
Andreas Cadhalpun [Tue, 28 Apr 2015 18:57:59 +0000 (20:57 +0200)]
nut: Check chapter creation in decode_info_header

This fixes a segmentation fault when accessing the metadata.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
9 years agoalac: Reject rice_limit 0 if compression is used
Andreas Cadhalpun [Thu, 23 Apr 2015 22:01:43 +0000 (00:01 +0200)]
alac: Reject rice_limit 0 if compression is used

If in compression mode rice_limit = 0 leads to call
`show_bits(gb, k)` in `decode_scalar` with k = 0.

Request a sample in case it is valid and it should be accepted.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
9 years agoape: Support _0000 files with nblock smaller than 64
Andreas Cadhalpun [Wed, 29 Apr 2015 18:39:22 +0000 (20:39 +0200)]
ape: Support _0000 files with nblock smaller than 64

The decode_array_0000 assumed that 64 is the minimal block size
while it is not.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agomux: Do not leave stale side data pointers in ff_interleave_add_packet()
Michael Niedermayer [Fri, 1 May 2015 22:55:42 +0000 (23:55 +0100)]
mux: Do not leave stale side data pointers in ff_interleave_add_packet()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agodump: Print AVAudioServiceType side data
Vittorio Giovara [Fri, 1 May 2015 14:33:50 +0000 (15:33 +0100)]
dump: Print AVAudioServiceType side data

9 years agolibx265: Fix 'braces around scalar initializer' warning
Vittorio Giovara [Fri, 1 May 2015 14:39:26 +0000 (15:39 +0100)]
libx265: Fix 'braces around scalar initializer' warning

x265 Reordered the x265_picture fields in the commit

https://github.com/videolan/x265/commit/51b1518de2414431f36eac592db15b667c25a7b9#diff-945b5354d8767dfac13334f2d22cf58fR107

Now the first field is an integer and not an array.

9 years agofate: Add a PICT test
Vittorio Giovara [Sat, 18 Apr 2015 16:25:22 +0000 (17:25 +0100)]
fate: Add a PICT test

This stimulates the direct pixel mode in Quickdraw decoder.

9 years agolavf: Open PICT images with Quickdraw
Vittorio Giovara [Sat, 18 Apr 2015 16:25:21 +0000 (17:25 +0100)]
lavf: Open PICT images with Quickdraw

Update the pictor test to use the pictor codec, as both formats share
the .pic file extension.

9 years agoquickdraw: Support direct pixel blocks
Vittorio Giovara [Sat, 18 Apr 2015 16:25:20 +0000 (17:25 +0100)]
quickdraw: Support direct pixel blocks

Data is stored in separated components so rework decode_rle() to support
stepping and offsets.

9 years agoquickdraw: Switch to greedy parsing
Vittorio Giovara [Sat, 18 Apr 2015 16:25:19 +0000 (17:25 +0100)]
quickdraw: Switch to greedy parsing

Quickdraw packs data as a series of codes that the application is supposed
to handle, but it does not define any order in which they might appear.
Since it's unfeasible to support *all* opcodes defined by the spec,
only handle well-known blocks containing video data and ignore any unknown
or unsupported ones.

Move palette loading and rle decoding to separate functions to resue them
in other blocks and drop format initialization in init since it can
support more formats than pal8.

Validate width and height.

9 years agoquickdraw: Convert to bytestream2
Vittorio Giovara [Sat, 18 Apr 2015 16:25:18 +0000 (17:25 +0100)]
quickdraw: Convert to bytestream2

Add appropriate error messages and reduce r, g, b variables scope.
Drop the now redundant line checks in RLE decoding.

9 years agoxcbgrab: Accept geometries matching the screen size
Nicolas George [Wed, 6 May 2015 10:22:52 +0000 (12:22 +0200)]
xcbgrab: Accept geometries matching the screen size

Introduced in e8c4db0d4d077.

9 years agoRevert "lavfi: always check av_expr_parse_and_eval() return value"
Anton Khirnov [Sat, 2 May 2015 07:09:52 +0000 (09:09 +0200)]
Revert "lavfi: always check av_expr_parse_and_eval() return value"

This reverts commit 63be97ec403023fb664798432acedaf6e6922527.

All those calls were unchecked on purpose, as explained in the comments
in the code.

9 years agoalsdec: only adapt order for positive max_order
Andreas Cadhalpun [Wed, 22 Apr 2015 14:03:41 +0000 (16:03 +0200)]
alsdec: only adapt order for positive max_order

For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoalsdec: check sample pointer range in revert_channel_correlation
Andreas Cadhalpun [Tue, 21 Apr 2015 17:28:30 +0000 (19:28 +0200)]
alsdec: check sample pointer range in revert_channel_correlation

Also change the type of begin, end and smp to ptrdiff_t to make the
comparison well-defined.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoaacpsy: correct calculation of minath in psy_3gpp_init
Andreas Cadhalpun [Tue, 21 Apr 2015 16:43:55 +0000 (18:43 +0200)]
aacpsy: correct calculation of minath in psy_3gpp_init

The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD.
This patch uses the first order approximation to determine it.

For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638)
not the one at 3410 (-5.24237967).

CC: libav-stabl@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoalsdec: limit avctx->bits_per_raw_sample to 32
Andreas Cadhalpun [Sat, 18 Apr 2015 18:29:13 +0000 (20:29 +0200)]
alsdec: limit avctx->bits_per_raw_sample to 32

avctx->bits_per_raw_sample is used in get_sbits_long, which only
supports up to 32 bits.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoaasc: return correct buffer size from aasc_decode_frame
Andreas Cadhalpun [Thu, 16 Apr 2015 17:12:02 +0000 (19:12 +0200)]
aasc: return correct buffer size from aasc_decode_frame

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agoconfigure: Allow log2 with MSVC 2013 onwards.
Matt Oliver [Sun, 11 May 2014 07:40:20 +0000 (17:40 +1000)]
configure: Allow log2 with MSVC 2013 onwards.

Only MSVC 2010 in x64 mode, in the static msvcrt, had a
stray log2 function (which wasn't available in the headers).

MSVC 2013 has got a proper log2 function though.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoconfigure: Use the right local variable in the MSVC and ICL probes
Martin Storsjö [Thu, 5 Jun 2014 19:59:47 +0000 (22:59 +0300)]
configure: Use the right local variable in the MSVC and ICL probes

$cc is the compiler requested as main target compiler, while $_cc
is the actual tool tested in the probe function right now (which
can also be e.g. the host compiler).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavprobe: Print the display matrix from per-stream sidedata
Martin Storsjö [Wed, 29 Apr 2015 13:48:26 +0000 (16:48 +0300)]
avprobe: Print the display matrix from per-stream sidedata

This is printed in a separate subgroup "displaymatrix" inside a
new group named "sidedata". The subgroup has got two values,
"rotation" (which is the parsed rotation from the matrix) and
"matrix" containing the full actual values.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavprobe: Support writing arrays of integers without keys
Martin Storsjö [Sat, 2 May 2015 08:22:13 +0000 (11:22 +0300)]
avprobe: Support writing arrays of integers without keys

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavconv: Add an option for automatically rotating video according to display matrix
Martin Storsjö [Wed, 29 Apr 2015 14:59:01 +0000 (17:59 +0300)]
avconv: Add an option for automatically rotating video according to display matrix

The option is enabled by default, but can be disabled.

If this is enabled, such side data isn't copied into the output stream
(except when doing stream copy).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavplay: Add support for rotated video
Martin Storsjö [Wed, 29 Apr 2015 19:28:45 +0000 (22:28 +0300)]
avplay: Add support for rotated video

This is enabled by default, but can be disbled via the -noautorotate
option.

Based on a patch by Clément Bœsch.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavplay: Factorize code for adding filters to the filter pipeline
Martin Storsjö [Wed, 29 Apr 2015 19:24:48 +0000 (22:24 +0300)]
avplay: Factorize code for adding filters to the filter pipeline

Significantly based on a patch by Clément Bœsch.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agodnxhddec: Fix pixel format change
Carl Eugen Hoyos [Wed, 29 Apr 2015 16:18:37 +0000 (17:18 +0100)]
dnxhddec: Fix pixel format change

Regression introduced in 598f7d046cbf306706623210c5baafa3b7cd1df3.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoffv1enc: Add const attribute to input frame
Vittorio Giovara [Wed, 29 Apr 2015 15:35:43 +0000 (16:35 +0100)]
ffv1enc: Add const attribute to input frame

warning: assigning to 'AVFrame *' (aka 'struct AVFrame *') from
         'const AVFrame *' (aka 'const struct AVFrame *') discards
         qualifiers [-Wincompatible-pointer-types-discards-qualifiers]

9 years agoavplay: Do not print a possibly uninitialized value
Luca Barbato [Tue, 28 Apr 2015 19:24:27 +0000 (21:24 +0200)]
avplay: Do not print a possibly uninitialized value

Initialize `diff` to 0.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoxcbgrab: Validate the capture area
Luca Barbato [Sat, 14 Mar 2015 11:30:11 +0000 (12:30 +0100)]
xcbgrab: Validate the capture area

And notify why the capture is impossible.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agoxcbgrab: Do not assume the non shm image data is always available
Luca Barbato [Sat, 14 Mar 2015 11:30:10 +0000 (12:30 +0100)]
xcbgrab: Do not assume the non shm image data is always available

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>