Commit Graph

30793 Commits

Author SHA1 Message Date
Michael Niedermayer
1cf0f27985 Merge commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c'
* commit '7e4e010b80e76862e83afbd41c25d50e72f0b44c':
  mpeg4audio: check the init_get_bits() return value

Conflicts:
	libavcodec/mpeg4audio.c

See: deefdf9788
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 20:51:17 +01:00
Michael Niedermayer
aefb99f2c0 avcodec/ass_split: use *alloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 20:33:53 +01:00
Michael Niedermayer
727cb2bda9 avcodec/ass: Use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 20:33:53 +01:00
Anton Khirnov
7e4e010b80 mpeg4audio: check the init_get_bits() return value
Fixes possible invalid reads.

CC:libav-stable@libav.org
2015-01-09 15:44:31 +01:00
wm4
b88e80589b vp9: fix parser return values in error case
The parser must always set the out_size and out_data pointers. The API
seems to require it, and the common code in parser.c also relies on it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 12:34:05 +01:00
wm4
816577716b avcodec/dvdsubdec: fix accessing dangling pointers
dvdsub_decode() can call append_to_cached_buf() 2 times, the second time
with ctx->buf as argument. If the second append_to_cached_buf() reallocs
ctx->buf, the argument will be a pointer to the previous, freed block.
This can cause invalid reads at least with some fuzzed files - and
possibly with valid files.

Since packets can apparently not be larger than 64K (even if packets are
combined), just use a fixed size buffer. It will be allocated as part of
the DVDSubContext, and although some memory is "wasted", it's relatively
minimal by modern standards and should be acceptable.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 17:45:32 +01:00
Michael Niedermayer
3fd3647fdc Merge commit '2dbd35b00c6433e587d5f44d5dbc8972ebbaa88e'
* commit '2dbd35b00c6433e587d5f44d5dbc8972ebbaa88e':
  libfdk-aacdec: Make sure decoding doesn't add any extra delay in the latest version of fdk-aac

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 17:36:48 +01:00
Michael Niedermayer
93870f0a0b Merge commit '3852e2c926ddb166c7aa69c4644a86100ea144d9'
* commit '3852e2c926ddb166c7aa69c4644a86100ea144d9':
  libopenh264enc: Fix a typo and some nitpicks

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 17:27:19 +01:00
Martin Storsjö
2dbd35b00c libfdk-aacdec: Make sure decoding doesn't add any extra delay in the latest version of fdk-aac
The latest version added support for a new option for enabling
a signal level limiter, which adds some extra delay. In fdk-aac, this
is enabled by default, but disable it by default here since we'd rather
have zero-delay decoding.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-08 13:58:43 +02:00
Martin Storsjö
3852e2c926 libopenh264enc: Fix a typo and some nitpicks
Also move the .long_name entry to below the .name entry.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-08 13:53:25 +02:00
wm4
bcaa9099b3 avcodec/dvdsubdec: error on bitmaps with size 0
Attemtping to decode them could lead to invalid writes with some fuzzed
samples.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 01:42:42 +01:00
Michael Niedermayer
3ed80bd95e Merge commit '5a1addd7c1d8ff218ed4b84f4f02fdb83980094c'
* commit '5a1addd7c1d8ff218ed4b84f4f02fdb83980094c':
  xsub: Support DXSA subtitles

Conflicts:
	libavcodec/xsubdec.c

See: d6f910ea47
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 00:09:13 +01:00
Michael Niedermayer
86e7d20ac2 avcodec/aic: Use av_malloc_array
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 19:46:16 +01:00
Michael Niedermayer
e00499eb4c avcodec/libxvid: fix potential integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 18:22:31 +01:00
Alexandre Colucci
5a1addd7c1 xsub: Support DXSA subtitles
These have a DXSA tag and contain alpha in addition to
color values for palette.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-07 13:51:30 +01:00
Michael Niedermayer
ad465e7897 avcodec/mpeg12: Try to fetch pts/dts from both the packet associated with the picture start code as well as earlier start codes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 13:25:09 +01:00
Michael Niedermayer
69ee915e1c avcodec/parser: add fuzzy mode to ff_fetch_timestamp()
This will be needed for the following timestamp fix

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 11:52:08 +01:00
Michael Niedermayer
ddae03f69b avcodec/allcodecs: prefer x264 over openh264 if both are available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 01:15:57 +01:00
Michael Niedermayer
c09eeca546 Merge commit '8a3d9ca603f4d15ecaa9ca379cbaab4ecaec8ce4'
* commit '8a3d9ca603f4d15ecaa9ca379cbaab4ecaec8ce4':
  libavcodec: Add an OpenH264 encoder wrapper

Conflicts:
	Changelog
	configure
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 00:48:23 +01:00
Michael Niedermayer
89388cf60b Merge commit '1c6183233d56fb27a4a154e7e64ecab98bd877f1'
* commit '1c6183233d56fb27a4a154e7e64ecab98bd877f1':
  msmpeg4: check memory allocations and propagate errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 00:13:24 +01:00
Michael Niedermayer
40e123bc67 Merge commit 'ed97963bdbf3bb17fca4f9ea0aa1a97722dec907'
* commit 'ed97963bdbf3bb17fca4f9ea0aa1a97722dec907':
  ulti: invert the order of parameters of ulti_decode_frame()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-07 00:05:04 +01:00
Michael Niedermayer
2ab6deb36f Merge commit '2cef68da69a17ed09c313ba3c3850ec1cc0a80e0'
* commit '2cef68da69a17ed09c313ba3c3850ec1cc0a80e0':
  vda: error out if decoded CVPixelBuffer is empty

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 22:13:39 +01:00
Michael Niedermayer
9198397115 avcodec/ffv1enc: Fix incompatible pointer type warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 22:05:13 +01:00
Michael Niedermayer
3b3782d74e Merge commit '0352ff102d62ee94e79e0baaf64d5ad4e66f907b'
* commit '0352ff102d62ee94e79e0baaf64d5ad4e66f907b':
  ffv1: const correctness for encode_rgb_frame()

Conflicts:
	libavcodec/ffv1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 22:05:06 +01:00
Michael Niedermayer
f4cc19cdd0 Merge commit 'ca09effb01e126b0ac74ff3de70a475423ddee82'
* commit 'ca09effb01e126b0ac74ff3de70a475423ddee82':
  ffv1: Drop unnecessary casts and const qualifiers to match function signatures

Conflicts:
	libavcodec/ffv1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 21:54:26 +01:00
Martin Storsjö
8a3d9ca603 libavcodec: Add an OpenH264 encoder wrapper
Compared to existing, common opensource H264 encoders, this can be
useful since it has got a different license (BSD instead of GPL).

Performance- and qualitywise it is comparable to x264 in ultrafast
mode.

Hooking it up as an encoder in libavcodec also simplifies comparing
it against other common encoders.

This requires OpenH264 1.3 or newer. Since the OpenH264 API and ABI
changes frequently, only releases are supported.

To take advantage of the OpenH264 patent offer, the OpenH264 library
must not be redistributed, but downloaded at runtime at the end-user's
system.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-06 19:58:44 +02:00
Vittorio Giovara
1c6183233d msmpeg4: check memory allocations and propagate errors
Bug-Id: CID 1257781
2015-01-06 16:43:54 +01:00
Vittorio Giovara
ed97963bdb ulti: invert the order of parameters of ulti_decode_frame()
This is the order that the caller uses in the rest of the file.
Variables are modified to reflect the order above too and their
initialization is merged with their declarationt. No behavioral
change.

Bug-Id: CID 732286
2015-01-06 16:43:53 +01:00
James Almer
08810a8895 x86/flacdsp: remove unneeded ifdeffery
x86inc can translate r*m into a register or stack on its own

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-01-05 16:29:28 -03:00
Stefano Pigozzi
2cef68da69 vda: error out if decoded CVPixelBuffer is empty
On some video samples, VDA silently fails to decode frames and returns
kVDADecoderNoErr. Error out in these cases to avoid producing AVFrames with
empty planes.

Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
2015-01-05 15:35:39 +01:00
Diego Biurrun
0352ff102d ffv1: const correctness for encode_rgb_frame()
libavcodec/ffv1enc.c:922:53: warning: passing argument 5 of ‘encode_rgb_frame’ discards ‘const’ qualifier from pointer target type
2015-01-05 15:35:39 +01:00
Diego Biurrun
ca09effb01 ffv1: Drop unnecessary casts and const qualifiers to match function signatures
libavcodec/ffv1dec.c:898:36: warning: cast discards ‘const’ qualifier from pointer target type
2015-01-05 15:35:39 +01:00
wm4
c9151de7c4 avcodec/dvdsubdec: fix out of bounds accesses
The code blindly trusted buffer offsets read from the file in the RLE
decoder. Explicitly check the offset. Also error out on other RLE
decoding errors.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-05 05:03:49 +01:00
Michael Niedermayer
0f931b29f7 Factorize avpriv_mirror() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-05 01:45:49 +01:00
Michael Niedermayer
5c95de150f avcodec/libxvid: check for av_malloc*() failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-03 23:51:18 +01:00
Michael Niedermayer
bd12aa2bc5 avcodec/ljpegenc: Check for av_malloc_array() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-03 21:25:26 +01:00
Michael Niedermayer
75cc57f73f avcodec/mpeg12dec: Check actual aspect ratio instead of aspect_ratio_info
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-02 03:22:51 +01:00
Michael Niedermayer
1010b36d86 avcodec/mpeg12dec: Recalculate SAR unconditionally
Fixes Ticket4161

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-02 03:22:51 +01:00
Michael Niedermayer
aeb36fd207 avcodec/mpeg12dec: Move user data debug code out of unrelated if (buf_size > 29)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-02 03:22:51 +01:00
Michael Niedermayer
5ba62e89df avcodec/loco: check the init_get_bits8() return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-31 15:42:17 +01:00
Michael Niedermayer
131a185826 avcodec/loco: use enum for mode variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-31 15:42:17 +01:00
Michael Niedermayer
d97b94f1af avcodec/loco: Support LOCO reference encoder with odd width
Fixes Ticket1221

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-31 04:49:48 +01:00
James Almer
37b35feb64 x86/swr: add SSE2/AVX pack_8ch functions
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-12-30 23:05:27 -03:00
Carl Eugen Hoyos
7905bd5555 Fix decoding for little endian Aja Kona 10-bit RGB.
The little endian fourcc is r10k, big endian uses R10k.
Reported and analyzed by Jason Freets, jasonslife hotmail
2014-12-29 22:49:08 +01:00
Michael Niedermayer
db0a52d611 avcodec/ituh263enc: Check den==0 in ff_h263_aspect_to_info()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-29 15:51:36 +01:00
Michael Niedermayer
748ad112e2 avcodec/ffwavesynth: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-29 14:06:26 +01:00
Carl Eugen Hoyos
6a6a0620e2 Fix R10k blue channel output.
Makes R10k -> gbrp10 ffv1 -> R10k roundtrip bit-identical.
2014-12-28 21:07:56 +01:00
Michael Niedermayer
c263102298 avcodec/vdpau: fix assertion failure and < vs > error
Fixes Ticket4211

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-28 01:47:05 +01:00
Michael Niedermayer
17dde95ec5 Merge remote-tracking branch 'rbultje/vp9-32bit-lpf'
* rbultje/vp9-32bit-lpf:
  vp9/x86: add myself to copyright holders for loopfilter assembly.
  vp9/x86: make filter_16_h work on 32-bit.
  vp9/x86: make filter_48/84/88_h work on 32-bit.
  vp9/x86: make filter_44_h work on 32-bit.
  vp9/x86: make filter_16_v work on 32-bit.
  vp9/x86: make filter_48/84_v work on 32-bit.
  vp9/x86: make filter_88_v work on 32-bit.
  vp9/x86: make filter_44_v work on 32-bit.
  vp8/x86: save one register in SIGN_ADD/SUB.
  vp9/x86: store unpacked intermediates for filter6/14 on stack.
  vp8/x86: move variable assigned inside macro branch.
  vp9/x86: simplify ABSSUM_CMP by inverting the comparison meaning.
  vp8/x86: remove unused register from ABSSUB_CMP macro.
  vp9/x86: slightly simplify 44/48/84/88 h stores.
  vp9/x86: make cglobal statement more conservative in register allocation.
  vp9/x86: save one register in loopfilter surface coverage.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 23:17:29 +01:00
Reimar Döffinger
035180901d r210enc.c: Simplify and never store more than 10 bits.
The r10k and avrp decoders would previously store 12 bit precision
for the blue channel, which is inconsistent and probably not a
desirable behaviour.
Now the 2 unused extra bits are set to 0.
This is possibly not ideal either as RGBA1010102 format has the same
layout but stores alpha in these bits, thus explicitly setting them
to 1 might be preferable.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-12-27 22:57:53 +01:00