Commit Graph

30931 Commits

Author SHA1 Message Date
Vittorio Giovara
8a9641a652 bsf: check memory allocations 2015-01-15 01:25:16 +01:00
Vittorio Giovara
402fb5550e opus_parser: drop unused variable 2015-01-15 01:25:16 +01:00
Vittorio Giovara
014b6b416f vp8: improve memory allocation checks
Check memory earlier, check one more allocation and clean up on error.

CC: libav-stable@libav.org
Bug-Id: CID 1257773
2015-01-15 01:25:07 +01:00
Paul B Mahol
f86f39cb9b tiff: support decoding GBRP and GBRAP formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Paul B Mahol
9a4aaae3b2 lavc: add GBRAP to avcodec_align_dimensions2 2015-01-14 17:17:24 +01:00
Stefano Sabatini
e2ad0b66fa imgutils: create misc functions for dealing with buffers
Move the lavc/imgconvert functions and rename them as follows:
  avpicture_get_size -> av_image_get_buffer_size()
  avpicture_fill     -> av_image_fill_arrays()
  avpicture_layout   -> av_image_copy_to_buffer()

The new functions have an align parameter, which allows to define the
linesize alignment assumed in the buffer (which is set or read).

The names of the functions are consistent with the lavu/samples API
(av_samples_get_buffer_size(), av_samples_fill_arrays()).

A redundant check has been dropped from av_image_fill_arrays().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Vittorio Giovara
1e76345432 png: improve signature check
Return proper error code, print an error message and add missing
parentheses.
2015-01-14 17:10:19 +01:00
Michael Niedermayer
c4f1abecb1 avcodec/sunrast: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-14 13:35:11 +01:00
Michael Niedermayer
e6f1601d6d avcodec/svq3: Use av_mallocz_array() for emu_edge_buffer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-14 13:23:57 +01:00
Michael Niedermayer
2493558a06 avcodec/svq3: Check av_mallocs return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-14 13:23:20 +01:00
Michael Niedermayer
e172f5e53a avcodec/hevc: Fix handling of skipped_bytes() reallocation failures
Fixes CID1260704

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 20:10:21 +01:00
wm4
921706691a qpeg: avoid pointless invalid memcpy()
If refdata was NULL, the memcpy() ended up copying the same memory
block onto itself, which is not only pointless, but also undefined
behavior.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 17:27:45 +01:00
Michael Niedermayer
295b79b5d8 avcodec/roqvideoenc: Check for av_malloc_array() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 15:14:27 +01:00
Michael Niedermayer
88a46fa8c9 avcodec/snowenc-test: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 15:04:15 +01:00
Michael Niedermayer
482761b85a avcodec/snowenc-test: check for av_malloc*() failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-13 15:02:36 +01:00
Michael Niedermayer
fbe8672e15 avcodec/shorten: use av_reallocp_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 23:46:50 +01:00
Michael Niedermayer
56c7e1059a avcodec/snow: Fix av_malloc* failure checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 23:46:50 +01:00
Michael Niedermayer
13871a95d0 avcodec/snow: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 23:36:00 +01:00
Michael Niedermayer
24222cc1d5 avcodec/opus_imdct: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 23:36:00 +01:00
Michael Niedermayer
365ef88d5d avcodec/wma: Print more details in case of spectral RLE overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 13:56:13 +01:00
Michael Niedermayer
4f664d8aae avcodec/ccaption_dec: Fix typos and cosmetics
Found-by: ubitux
(rest of found stuff left to the author to decide which way to fix)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 13:43:53 +01:00
Michael Niedermayer
e2db9a736f avcodec/wmadec: fix 0 frame bit_reservoir
Fixes Ticket968
partly fixes Ticket691

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 03:33:16 +01:00
Michael Niedermayer
a8bc901033 avcodec/wmadec: also print the number of bits left in the nb_frames <= 0 case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 03:33:02 +01:00
Anshul Maheshwari
4b6262610b Adding Closed caption Support
Signed-off-by: Anshul Maheshwari <anshul.ffmpeg@gmail.com>

To test Closed caption use following command
ffmpeg -f lavfi -i "movie=input.ts[out0+subcc]" -map s output.srt
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-11 22:19:48 +01:00
Michael Niedermayer
8b13a4d6f0 avcodec/error_resilience: Remove special case for H.264 from is_intra_more_likely
This should not be needed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-11 17:30:02 +01:00
Michael Niedermayer
855463c007 avcodec/h264: Keep a reference to the last picture for EC
This and the next commit improve error concealment for
green-block-artifacts-from-canon-100-hs.MOV

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-11 17:30:02 +01:00
Michael Niedermayer
cba199b595 avcodec/options_table: add entries for MPEG4 video profiles
Fixes part of Ticket2901

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-11 14:55:28 +01:00
Michael Niedermayer
bcfd9f8d7f avcodec/proresdec_lgpl: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-11 13:42:06 +01:00
Michael Niedermayer
4207c5a4ce avcodec/pgssubdec: Use av_malloc*_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-11 13:41:14 +01:00
Michael Niedermayer
0f08b587fa avcodec/libvo-aacenc: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-11 13:32:55 +01:00
Carl Eugen Hoyos
a5334d4081 Handle r10k endianess atom DpxE.
Fixes playback and remuxing of r10k_full-range_big-endian.mov.

Reported, analyzed and tested by Olaf Matthes, olaf matthes gmx de
2015-01-11 12:15:03 +01:00
Matt Oliver
87deebe11a avcodec/libvpxenc.c: Fix linking with codec interface with msvc.
Default libvpx msvc buils used module definition to export symbols.
These symbols are exported as pointers to data which dont link when
referenced directly.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 21:10:02 +01:00
wm4
09b4ad1568 vp9: avoid infinite loop with broken files
With a certain fuzzed file, the parser will always return 0 consumed
bytes, which makes calling code call the parser infinitely. Return the
full packet size on error instead. (Here it would be nice if parsers
could return errors at all.)

Additionally, _if_ there's some data left, return that too, which might
help with somewhat broken but still somehow playable files.

Fixes ticket #4242.

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 20:12:36 +01:00
Michael Niedermayer
0898a6d4e4 avcodec/ratecontrol: Check for av_malloc*() failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 19:29:39 +01:00
Michael Niedermayer
1bf747ae84 avcodec/dvbsubdec: Return proper error codes from more functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 19:24:27 +01:00
Michael Niedermayer
ebe3a41ea3 avcodec/dvbsubdec: Add some av_malloc() failure checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 19:21:58 +01:00
Michael Niedermayer
a4d3cf10b2 avcodec/diracdec: Check slices malloc and propagate error code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 17:28:22 +01:00
Michael Niedermayer
35e559ae32 avcodec/cavs: Check for av_malloc* failure in ff_cavs_init_top_lines()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 14:02:39 +01:00
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
Ronald S. Bultje
3aefca68ca vp9/x86: add myself to copyright holders for loopfilter assembly. 2014-12-27 16:55:16 -05:00
Ronald S. Bultje
afd8c464b7 vp9/x86: make filter_16_h work on 32-bit. 2014-12-27 16:55:16 -05:00
Ronald S. Bultje
b26bc3520f vp9/x86: make filter_48/84/88_h work on 32-bit. 2014-12-27 16:55:15 -05:00
Ronald S. Bultje
8a1cff1c35 vp9/x86: make filter_44_h work on 32-bit. 2014-12-27 16:55:15 -05:00
Ronald S. Bultje
047088b8c6 vp9/x86: make filter_16_v work on 32-bit. 2014-12-27 16:55:14 -05:00
Ronald S. Bultje
0cc9c23ea1 vp9/x86: make filter_48/84_v work on 32-bit. 2014-12-27 16:55:14 -05:00
Ronald S. Bultje
6433a9133f vp9/x86: make filter_88_v work on 32-bit. 2014-12-27 16:55:14 -05:00
Ronald S. Bultje
75f8e52089 vp9/x86: make filter_44_v work on 32-bit. 2014-12-27 16:55:13 -05:00
Ronald S. Bultje
7f80c3344c vp8/x86: save one register in SIGN_ADD/SUB. 2014-12-27 16:55:13 -05:00
Ronald S. Bultje
8ea2194ebb vp9/x86: store unpacked intermediates for filter6/14 on stack.
filter16 goes from 508 to 482 (h) or 346 to 314 (v) cycles; filter88
goes from 240 to 238 (h) or 174 to 165 (v) cycles, measured on TOS.
2014-12-27 16:55:13 -05:00
Ronald S. Bultje
e42409479f vp8/x86: move variable assigned inside macro branch.
The value is not used outside the branch.
2014-12-27 16:55:12 -05:00
Ronald S. Bultje
418c202c63 vp9/x86: simplify ABSSUM_CMP by inverting the comparison meaning. 2014-12-27 16:55:12 -05:00
Ronald S. Bultje
d1c55654e1 vp8/x86: remove unused register from ABSSUB_CMP macro. 2014-12-27 16:55:12 -05:00
Ronald S. Bultje
e59bd08986 vp9/x86: slightly simplify 44/48/84/88 h stores. 2014-12-27 16:55:11 -05:00
Ronald S. Bultje
8132629bd5 vp9/x86: make cglobal statement more conservative in register allocation. 2014-12-27 16:55:11 -05:00
Ronald S. Bultje
c013ca58c5 vp9/x86: save one register in loopfilter surface coverage. 2014-12-27 16:55:11 -05:00
Michael Niedermayer
6f764d2911 Merge commit '737d35e33408263c04d7730f5487eed0d04938ba'
* commit '737d35e33408263c04d7730f5487eed0d04938ba':
  vdpau: add support for the H.264 High 4:4:4 Predictive profile

Conflicts:
	libavcodec/vdpau_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 14:46:15 +01:00
Michael Niedermayer
751731540f Merge commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68'
* commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68':
  vdpau: add support for 4:2:2 and 4:4:4 chroma sampling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 13:17:20 +01:00
Michael Niedermayer
d7aaeea540 Merge commit 'c220a60f92dde9c7c118fc4deddff5c1f617cda9'
* commit 'c220a60f92dde9c7c118fc4deddff5c1f617cda9':
  vdpau: add helper for surface chroma type and size

Conflicts:
	libavcodec/vdpau.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 13:06:25 +01:00
Michael Niedermayer
ddb9a24a7f Merge commit '6c99c92a42add7f6a462114d5a4a53c93c551058'
* commit '6c99c92a42add7f6a462114d5a4a53c93c551058':
  libavcodec: add AV_HWACCEL_ALLOW_HIGH_DEPTH flag

Conflicts:
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 12:52:59 +01:00
Michael Niedermayer
d16079abf4 Merge commit '57b6704ecd0f56d6a3092e448687cfd837bb0ac1'
* commit '57b6704ecd0f56d6a3092e448687cfd837bb0ac1':
  avcodec: add AVCodecContext.sw_pix_fmt

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 12:41:10 +01:00
Michael Niedermayer
57089084ba Merge commit '4cfbeef31d4e6096c0596359d212f5d99a7ba4b5'
* commit '4cfbeef31d4e6096c0596359d212f5d99a7ba4b5':
  h264: factor hwaccel pixel formats list

Conflicts:
	libavcodec/h264_slice.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 12:15:34 +01:00
Anton Khirnov
60d4c6ff76 h264: restore a block mistakenly removed in e10fd08a
CC: libav-stable@libav.org
Bug-ID: 781
2014-12-27 10:44:48 +01:00
Rémi Denis-Courmont
737d35e334 vdpau: add support for the H.264 High 4:4:4 Predictive profile
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont
ebd5320afd vdpau: add support for 4:2:2 and 4:4:4 chroma sampling
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont
c220a60f92 vdpau: add helper for surface chroma type and size
Since the VDPAU pixel format does not distinguish between different
VDPAU video surface chroma types, we need another way to pass this
data to the application.

Originally VDPAU in libavcodec only supported decoding to 8-bits YUV
with 4:2:0 chroma sampling. Correspondingly, applications assumed that
libavcodec expected VDP_CHROMA_TYPE_420 video surfaces for output.
However some of the new HEVC profiles proposed for addition to VDPAU
would require different depth and/or sampling:
http://lists.freedesktop.org/archives/vdpau/2014-July/000167.html
...as would lossless AVC profiles:
http://lists.freedesktop.org/archives/vdpau/2014-November/000241.html

To preserve backward binary compatibility with existing applications,
a new av_vdpau_bind_context() flag is introduced in a further change.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont
6c99c92a42 libavcodec: add AV_HWACCEL_ALLOW_HIGH_DEPTH flag
This can be used by the application to signal its ability to cope with
video surface of types other than 8-bits YUV 4:2:0.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont
57b6704ecd avcodec: add AVCodecContext.sw_pix_fmt
This carries the pixel format that would be used if it were not for
hardware acceleration. This is equal to AVCodecContext.pix_fmt if
hardware acceleration is not in use.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont
4cfbeef31d h264: factor hwaccel pixel formats list
This is to avoid proliferation of similar tables in following changes.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:48 +01:00
Timo Rothenpieler
1efdb0a43f avcodec/nvenc: Remove special cases for cygwin
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-25 15:54:26 +01:00
Michael Niedermayer
b51cc701bc avcodec/vc1_mc: use the same reference as luma does in ff_vc1_mc_4mv_chroma()
Fixes Ticket3230

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-25 01:25:29 +01:00
Reimar Döffinger
bed78064f4 tableprint_vlc.h: Should not be checked by checkheaders.
Same as for tableprint.h.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-12-24 12:56:36 +01:00
James Almer
32c836cb11 x86/vp9: remove duplicate function prototypes
Fixes "redundant redeclaration" warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
2014-12-23 00:56:51 -03:00
Hendrik Leppkes
1ffcf6ac90 frame_thread_encoder: use ref-counting to avoid memcpy of all input frames
Apparently uneeded lock/unlock removed by commiter

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-23 01:36:13 +01:00
Michael Niedermayer
fe439c2069 avcodec/h264: also show frames with missing fields when CODEC_FLAG2_SHOW_ALL is set
This allows viewing more of ticket2254

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-22 21:42:36 +01:00
Michael Niedermayer
5318cf521f Merge commit '9cfa68c560bdec82d2d5ec079f9c5b0f9ca37af0'
* commit '9cfa68c560bdec82d2d5ec079f9c5b0f9ca37af0':
  mpegts: add support for Opus

Conflicts:
	libavcodec/opus_parser.c
	libavformat/mpegts.c

See: 74141f693d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 19:15:11 +01:00
Michael Niedermayer
88c1869afe avcodec/idctdsp: use the 10bit code for 9 bit too
9bit is currently not used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 18:33:37 +01:00
Michael Niedermayer
bb852f0066 avcodec/fdctdsp: use the 10bit code for 9 bit too
9bit is currently not used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 18:32:50 +01:00
James Almer
7696e429c7 x86/vp3dsp: port put_vp_no_rnd_pixels8_l2_mmx to yasm
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 13:25:43 +01:00
Kieran Kunhya
9cfa68c560 mpegts: add support for Opus
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 11:29:19 +01:00
Michael Niedermayer
c3e6a55956 avcodec/vp3: Fix offset handling
Fixes use of uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 20:53:53 +01:00
Michael Niedermayer
2df5b506ca avcodec/mpegvideo_enc: remove rtp_mode=0 for H261
Suggested-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 20:50:02 +01:00
James Almer
a4d62f7775 x86/constants: fix alignment of pw_255
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 20:21:34 +01:00
Michael Niedermayer
649c158e8c Add FFMPEG_VERSION into the binary libs
This simplifies identifying from which revision a binary of a lib came from

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 19:32:40 +01:00
Ronald S. Bultje
bdc1e3e3b2 vp9/x86: intra prediction sse2/32bit support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 14:07:19 +01:00
Ronald S. Bultje
b6e1711223 vp9/x86: invert hu_ipred left array ordering.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 14:07:18 +01:00
Michael Niedermayer
e67496fe9d Merge commit 'cee4490b521fd0d02476d46aa2598af24fb8d686'
* commit 'cee4490b521fd0d02476d46aa2598af24fb8d686':
  on2avc: check number of channels

See: 550f3e9df3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 13:39:41 +01:00
Michael Niedermayer
c266d0e1bd Merge commit 'd423dd72be451462c6fb1cbbe313bed0194001ab'
* commit 'd423dd72be451462c6fb1cbbe313bed0194001ab':
  smc: fix the bounds check

Conflicts:
	libavcodec/smc.c

See: c727401aa9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 13:30:55 +01:00
Michael Niedermayer
8af8833591 Merge commit '0b39ac6f54505a538c21fe49a626de94c518c903'
* commit '0b39ac6f54505a538c21fe49a626de94c518c903':
  gifdec: refactor interleave end handling

Conflicts:
	libavcodec/gifdec.c

See: 8f1457864b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 13:28:57 +01:00
Michael Niedermayer
6c7b153d97 Merge commit '17ba719d9ba30c970f65747f42d5fbb1e447ca28'
* commit '17ba719d9ba30c970f65747f42d5fbb1e447ca28':
  mmvideo: check frame dimensions

See: 8b0e96e1f2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 13:05:49 +01:00
Michael Niedermayer
f346e37aa2 Merge commit '88626e5af8d006e67189bf10b96b982502a7e8ad'
* commit '88626e5af8d006e67189bf10b96b982502a7e8ad':
  jvdec: check frame dimensions

See: 105654e376
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 13:04:03 +01:00
Michael Niedermayer
6c68522a2a Merge commit '809c3023b699c54c90511913d3b6140dd2436550'
* commit '809c3023b699c54c90511913d3b6140dd2436550':
  mjpegdec: check for pixel format changes

Conflicts:
	libavcodec/mjpegdec.c

See: 5c378d6a6d
See: a2f680c7bc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 12:49:23 +01:00
Michael Niedermayer
cee4490b52 on2avc: check number of channels
Fixes invalid memory access.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8549
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-19 08:01:47 +01:00
Michael Niedermayer
d423dd72be smc: fix the bounds check
Fixes invalid writes when there are more blocks in a run than total
remaining blocks.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8548
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-19 08:01:47 +01:00
Michael Niedermayer
0b39ac6f54 gifdec: refactor interleave end handling
Fixes invalid writes with very small image heights.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8547
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-19 08:01:47 +01:00
Anton Khirnov
17ba719d9b mmvideo: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 2.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8543
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-12-19 08:01:46 +01:00
Anton Khirnov
88626e5af8 jvdec: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 8.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8542
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-12-19 08:01:46 +01:00
Anton Khirnov
809c3023b6 mjpegdec: check for pixel format changes
Fixes possible invalid memory access.

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

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8541
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-12-19 08:01:46 +01:00
Michael Niedermayer
c89751aa21 Merge commit '210461c0a83a5625560fa1d92229200dc7fb869b'
* commit '210461c0a83a5625560fa1d92229200dc7fb869b':
  imgconvert: check memory allocations and propagate errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 05:37:26 +01:00
Michael Niedermayer
8ccfafa7b4 Merge commit '596b5c488fa1d40f114a64d3b73e1863cab073fb'
* commit '596b5c488fa1d40f114a64d3b73e1863cab073fb':
  wma: check memory allocations and propagate errors

Conflicts:
	libavcodec/wma.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 05:36:20 +01:00
Michael Niedermayer
d05b154b5b Merge commit '5ac06633cb63fcc51f2471a3478b44d3f010b16b'
* commit '5ac06633cb63fcc51f2471a3478b44d3f010b16b':
  takdec: check av_samples_get_buffer_size() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 05:06:23 +01:00
Michael Niedermayer
5387b0cbfb Merge commit '971099ff5a85377579eb5b8d3620e283957f097e'
* commit '971099ff5a85377579eb5b8d3620e283957f097e':
  aacenc: correctly check returned value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 04:45:32 +01:00