Commit Graph

27497 Commits

Author SHA1 Message Date
Anton Khirnov
77bb0004bb rpza: limit the number of blocks to the total remaining blocks in the frame
Fixes invalid writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-10 15:22:28 +01:00
Anton Khirnov
a46dc49744 rpza: move some variables to the blocks where they are used 2014-02-10 15:22:01 +01:00
Anton Khirnov
c7769df178 rpza: use fixed-width int types 2014-02-10 15:21:35 +01:00
Anton Khirnov
e1218ce914 rpza: switch to bytestream2 2014-02-10 15:18:21 +01:00
Michael Niedermayer
03911c418f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  hevc: Conceal zero td

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-10 03:54:54 +01:00
Michael Niedermayer
51290068fa Merge commit 'e95018b694c0774477abec5bbf86ecc7946a9a28'
* commit 'e95018b694c0774477abec5bbf86ecc7946a9a28':
  dnxhd: Support DNx444

Conflicts:
	Changelog
	libavcodec/dnxhddata.c
	libavcodec/dnxhddec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-10 03:42:06 +01:00
Michael Niedermayer
b7c6ccc1e6 Merge commit 'd6eac2f1bcce0cb85fac5d50fcfe94bc490d4a5e'
* commit 'd6eac2f1bcce0cb85fac5d50fcfe94bc490d4a5e':
  arm: Remove a stray .fpu directive

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-09 20:57:55 +01:00
Michael Niedermayer
8c596864cd Merge commit '28e508a94677d5dffde009c5f8ca7d6a4d2ca8e8'
* commit '28e508a94677d5dffde009c5f8ca7d6a4d2ca8e8':
  dnxhddec: return proper error code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-09 20:52:05 +01:00
Luca Barbato
246d3bf0ec hevc: Conceal zero td
It was done only in check_mvset(), while mv_scale() is called also by
dist_scale().

Sample-Id: 00001579-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-09 19:53:43 +01:00
Kostya Shishkov
e95018b694 dnxhd: Support DNx444
Bug-Id: 99
Bug-Id: videolan/9620
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-02-09 19:53:35 +01:00
Ronald S. Bultje
2f6eec65ac vp8: fix PPC assembly to work if src_stride != dst_stride
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-09 18:50:53 +01:00
Janne Grunau
6a8475dc4f asvenc: free avctx->coded_frame on codec close 2014-02-09 18:50:53 +01:00
Clément Bœsch
c333987876 vp9: fix compilation with !HAVE_FAST_64BIT.
Spotted-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2014-02-09 18:44:20 +01:00
Martin Storsjö
d6eac2f1bc arm: Remove a stray .fpu directive
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-09 18:36:16 +01:00
Alexandra Khirnova
28e508a946 dnxhddec: return proper error code
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-09 18:36:16 +01:00
Ronald S. Bultje
0d4d223353 vp9: invert order in l[] intra prediction array.
The directional intra predictors either don't care about order (dc, h,
dc_left, tm), or they prefer inverted order (vr, dr, hd). This allows
more efficient SIMD implementations.
2014-02-09 18:07:15 +01:00
Ronald S. Bultje
37c6eac296 vp9: remove memset in loopfilter level setting loop.
Use same function for segmentation map writing also.
2014-02-09 18:07:14 +01:00
Ronald S. Bultje
45245e202e vp9: coef decoding context-splat speedup. 2014-02-09 18:07:14 +01:00
Ronald S. Bultje
fccd7d81b6 vp9: decode_mode context optimizations. 2014-02-09 18:07:14 +01:00
Ronald S. Bultje
1dc8559e25 vp9: more aligned zeroes. 2014-02-09 18:07:14 +01:00
Ronald S. Bultje
0c30c8ddc1 vp9: faster skip-block coefficient blanking. 2014-02-09 18:07:14 +01:00
Ronald S. Bultje
cdfcd06126 vp9: coef context reading optimization. 2014-02-09 18:07:14 +01:00
Ronald S. Bultje
9aeca1c572 vp9: just disallow temporal or no-update segmentation on size-change.
The spec doesn't describe how it should be decoded so this is probably
the safest thing to do. Fixes valgrind errors on fuzzed11.ivf and fixes
valgrind errors on fuzzed10.ivf differently.
2014-02-09 18:07:14 +01:00
mrlika
36a6297953 avcodec/dvbsubdec: DVB subtitles decoder: support of 5 bytes extradata format
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-09 17:14:57 +01:00
Maxim Poliakovski
bc3f03567a g2meet: rename FRAME_INFO to more appropriate DISPLAY_INFO
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-02-09 16:13:23 +01:00
Michael Niedermayer
4040b56f5a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mlp_parser: fix request_channel_layout behavior.

Conflicts:
	libavcodec/mlp_parser.c

See: bd35d58463
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-09 02:37:17 +01:00
Maxim Poliakovski
ae95b2f810 g2meet: Validate bpp and bitmasks in the display info
That prevents processing of media files with
incompatible or unsupported settings.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 23:30:02 +01:00
Maxim Poliakovski
3f826039dd g2meet: factor out chunk seeking
This version requires fewer code and is safer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 23:09:57 +01:00
Maxim Poliakovski
cb2162adba g2meet: Rename FRAME_INFO to more appropriate DISPLAY_INFO
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 23:01:14 +01:00
Ronald S. Bultje
0c67864a37 vp9: don't allow retaining old segmentation maps after a size change.
Fixes valgrind warnings on fuzzed10.ivf.
2014-02-08 22:08:20 +01:00
Tim Walker
c1e7de8f62 mlp_parser: fix request_channel_layout behavior.
When request_channel_layout is 0,
all substreams should be decoded.

Thanks to Michael Niedermayer for spotting.

Also fix a mismatch between the parser and
decoder when request_channel_layout is a
subset of Stereo.
2014-02-08 20:10:51 +01:00
Michael Niedermayer
f90a4bfc43 mlpdec: fix request_channel_layout behavior.
When request_channel_layout is 0,
all substreams should be decoded.

Signed-off-by: Tim Walker <tdskywalker@gmail.com>
2014-02-08 20:10:35 +01:00
Michael Niedermayer
0c4bf87b29 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Mirillis FIC video decoder

Conflicts:
	Changelog
	configure
	libavcodec/Makefile
	libavcodec/avcodec.h
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 19:02:46 +01:00
Ronald S. Bultje
7f0f47b3df vp9: some variable re-arrangements for alignment. 2014-02-08 18:30:17 +01:00
Ronald S. Bultje
af63ea7078 vp9: re-allocate block buffers on uses_2pass change w/o size change.
Fixes valgrind errors and crashes in fuzzed9.ivf.
2014-02-08 18:30:17 +01:00
Michael Niedermayer
bd35d58463 avcodec/mlp_parser: fix multichannel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 18:13:34 +01:00
Michael Niedermayer
1a8050ad61 avcodec/mlpdec: fix mulichannel output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 18:08:01 +01:00
Michael Niedermayer
aedc10137d Merge commit 'c0c45188e56cfa3050bb39f8299025345b8a204c'
* commit 'c0c45188e56cfa3050bb39f8299025345b8a204c':
  mlp: improve request_channel_layout behavior.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 17:31:30 +01:00
Michael Niedermayer
df98b36aa6 Merge commit '5c1c6e82261b856214499b9fef3a08bf3ff6e0ae'
* commit '5c1c6e82261b856214499b9fef3a08bf3ff6e0ae':
  dca: include dcadsp.h in {arm,x86}/dca.h for checkheaders

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 17:25:31 +01:00
Michael Niedermayer
4df9d9ca4f Merge commit 'b141c7b37eb52aca41ac83738f159b63b9c09d5c'
* commit 'b141c7b37eb52aca41ac83738f159b63b9c09d5c':
  h264: give numbers to nalus

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 17:09:39 +01:00
Michael Niedermayer
dd2b330347 Merge commit '0cffd6fff59f192120dc93aa6c3cb8180f5506e3'
* commit '0cffd6fff59f192120dc93aa6c3cb8180f5506e3':
  x86: use the inline int8x8_fmul_int32 only if inline SSE2 is availbale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 17:06:57 +01:00
Kostya Shishkov
cde7df25ef Mirillis FIC video decoder
Does not contain cursor rendering yet.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-08 15:04:13 +00:00
Tim Walker
c0c45188e5 mlp: improve request_channel_layout behavior.
Don't decode further substreams if request_channel_layout
is a subset of the current substream's channel_layout.

Before, we would only discard further substreams if
request_channel_layout matched the substream's
channel_layout extactly, thus decoding additional
channels which the caller would probably end up downmixing.
2014-02-08 13:39:37 +01:00
Janne Grunau
5c1c6e8226 dca: include dcadsp.h in {arm,x86}/dca.h for checkheaders 2014-02-08 13:38:36 +01:00
Vittorio Giovara
b141c7b37e h264: give numbers to nalus
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-08 13:38:31 +01:00
Ronald S. Bultje
c72f587353 vp9/parser: change size type to unsigned.
Fixes valgrind errors in fuzzed8.ivf because size >= 0x80000000.
2014-02-08 12:53:59 +01:00
Michael Niedermayer
3b6655ebff avcodec/hevc: remove FFUMOD() in slice qp_y init
This has become redundant

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 12:27:00 +01:00
Michael Niedermayer
1e263133cc avcodec/hevc: remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 12:27:00 +01:00
Janne Grunau
0cffd6fff5 x86: use the inline int8x8_fmul_int32 only if inline SSE2 is availbale
Fixes compilation with MSVC. Also does not rely on on earlier config.h
include but include it directly.
2014-02-08 12:10:56 +01:00
Carl Eugen Hoyos
4bcc6febcf Fix compilation with --disable-everything --enable-encoder=flac. 2014-02-08 12:06:49 +01:00
Ronald S. Bultje
bbc3425fa2 vp9: fix mix-up of last-frame/cur-frame in frame size checks.
Fixes invalid reads in fuzzed7.ivf.
2014-02-08 11:18:37 +01:00
Clément Bœsch
669d4f9053 x86/vp9lpf: simplify 2nd transpose in 44/48/88/84.
For non-avx optims, this saves 8 movs.

before:
  1785 decicycles in ff_vp9_loop_filter_h_44_16_ssse3, 524129 runs, 159 skips
  3327 decicycles in ff_vp9_loop_filter_h_48_16_ssse3, 262116 runs, 28 skips
  2712 decicycles in ff_vp9_loop_filter_h_88_16_ssse3, 4193729 runs, 575 skips
  3237 decicycles in ff_vp9_loop_filter_h_84_16_ssse3, 524061 runs, 227 skips

after:
  1768 decicycles in ff_vp9_loop_filter_h_44_16_ssse3, 524062 runs, 226 skips
  3310 decicycles in ff_vp9_loop_filter_h_48_16_ssse3, 262107 runs, 37 skips
  2719 decicycles in ff_vp9_loop_filter_h_88_16_ssse3, 4193954 runs, 350 skips
  3184 decicycles in ff_vp9_loop_filter_h_84_16_ssse3, 524236 runs, 52 skips
2014-02-08 11:10:23 +01:00
Lukasz Marek
3f47e24cbe lavc/mpegvideo: add missing const
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 02:55:51 +01:00
Lukasz Marek
aeb2905fb7 lavc/jpeg2000dec: silent warning discards qualifiers
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 02:54:37 +01:00
Michael Niedermayer
5794e9fce2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dcadsp: split lfe_dir cases

Conflicts:
	libavcodec/arm/dcadsp_init_arm.c

See: 45854df9a5
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 02:27:27 +01:00
Christophe Gisquet
45854df9a5 dcadsp: split lfe_dir cases
The x86 runs short on registers because numerous elements are not static.
In addition, splitting them allows more optimized code, at least for x86.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 02:04:12 +01:00
Michael Niedermayer
82ae8a44e6 Merge commit '5b59a9fc6152169599561f04b4f66370edda5c9c'
* commit '5b59a9fc6152169599561f04b4f66370edda5c9c':
  x86: dcadsp: implement int8x8_fmul_int32

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 01:20:33 +01:00
Christophe Gisquet
481a46a462 dcadsp: add int8x8_fmul_int32 to DSP context
It is currently declared as a macro who is set to inlinable functions,
among which a Neon and a default C implementations.

Add a DSP parameter to each inline function, unused except by the
default C implementation which calls a function from the DSP context.

On an Arrandale CPU, gain for an inlined SSE2 function vs. a call:
- Win32: 29 to 26 cycles
- Win64: 25 to 23 cycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 00:55:42 +01:00
Michael Niedermayer
bf90abe1dd Merge commit '5bcbb516f2ff45290ef7995b081762e668693672'
* commit '5bcbb516f2ff45290ef7995b081762e668693672':
  arm: Add X() around all references to extern symbols

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 00:48:26 +01:00
Michael Niedermayer
64278039e5 avcodec/hevc: Simplify get_qPy_pred()
Fixes use of uninitialized memory
Fixes: 93728afd9aa074ba14a09bfd93a632fd-asan_static-oob_124a17d_1445_cov_1021181966_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 00:22:49 +01:00
Michael Niedermayer
1a3ed056c5 avcodec/hevc: make check for previous slice segment tighter
This ensures the previous one is matching the curent and not just any

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 00:22:49 +01:00
Christophe Gisquet
5fdbfcb5b7 dcadsp: split lfe_dir cases
The x86 runs short on registers because numerous elements are not static.
In addition, splitting them allows more optimized code, at least for x86.

Arm asm changes by Janne Grunau.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-07 22:54:18 +01:00
Christophe Gisquet
5b59a9fc61 x86: dcadsp: implement int8x8_fmul_int32
For the callable function (as opposed to the inline one):
         C  SSE  SSE2  SSE4
Win32:  47   42   29    26
Win64:  30   33   25    23
The SSE version is neither compiled nor set for ARCH_X86_64, as the
inlinable function takes over.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-07 22:52:40 +01:00
Christophe Gisquet
2bd44cb705 dcadsp: add int8x8_fmul_int32 to dsp context
It is currently declared as a macro who is set to inlinable functions,
among which a Neon and a default C implementations.

Add a DSP parameter to each inline function, unused except by the
default C implementation which calls a function from the DSP context.

On an Arrandale CPU, gain for an inlined SSE2 function vs. a call:
- Win32: 29 to 26 cycles
- Win64: 25 to 23 cycles

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-07 22:51:59 +01:00
Lukasz Marek
7bb8b87654 lavc/adpcm_data: fix const misplacement
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-07 19:33:20 +00:00
Lukasz Marek
0792b87335 lavc/evrcdec: fix const misplacement
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-07 19:32:16 +00:00
Michael Niedermayer
ec9578d54d avcodec/wmalosslessdec: fix mclms_coeffs* array size
Fixes corruption of context
Fixes: 8835659dde6a4f7dcdf341de6a45c6c8-signal_sigsegv_1dce67b_4564_cov_2504444599_classical_22_16_1_14000_v3c_0_extend_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-07 15:36:30 +01:00
Michael Niedermayer
2a03eb4c99 avcodec/wmalosslessdec: use sizeof() instead of literal number
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-07 15:36:30 +01:00
Martin Storsjö
5bcbb516f2 arm: Add X() around all references to extern symbols
Don't rely on the fact that an unprefixed label currently exists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-02-07 15:13:58 +02:00
Michael Niedermayer
6ef57f4d9a avcodec/hevc: hls_decode_entry: check that the previous slice segment is available before decoding the next
Fixes use of uninitialized memory
Fixes out of array read
Fixes assertion failure
Fixes part of cb307d24befbd109c6f054008d6777b5/asan_static-oob_124a175_1445_cov_2355279992_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-07 04:40:37 +01:00
Michael Niedermayer
a18f111582 avcodec/hevc: clear tab_slice_address of ctb on error.
This allows us to detect which areas have failed to decode

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-07 04:30:31 +01:00
Michael Niedermayer
56985d26d7 avcodec/hevc: clear tab_slice_address in hevc_frame_start()
Fixes inconsistencies
Fixes use of uninitilaized memory
Fixes part of  cb307d24befbd109c6f054008d6777b5/asan_static-oob_124a175_1445_cov_2355279992_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-07 03:47:49 +01:00
Michael Niedermayer
951793717a avcodec/hevc_filter: assert validity of qp predictor input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-07 01:55:17 +01:00
Ronald S. Bultje
5351964a2b vp8: fix bilinear C code to work if src_stride != dst_stride.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-06 22:45:29 +01:00
Michael Niedermayer
c73445a45c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vp8: Use 2 registers for dst_stride and src_stride in neon bilin filter

Conflicts:
	libavcodec/arm/vp8dsp_neon.S

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-06 15:33:54 +01:00
Martin Storsjö
49ec551595 vp8: Use 2 registers for dst_stride and src_stride in neon bilin filter
Based on a patch by Ronald S. Bultje.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-02-06 09:32:26 +02:00
Loren Merritt
9c978f243a flac/x86: add ff_flac_lpc_32_sse4()
benchmarked on sandybridge x86_64:
1358232 decicycles in flac_lpc_32_c
1244575 decicycles in flac_lpc_32_sse4, James Almer's patch
 650045 decicycles in flac_lpc_32_sse4, this patch

I haven't tested the edgecases such as odd block lengths

odd block length tested-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-06 02:51:19 +01:00
Timothy Gu
4a37e2977c libfdk-aacenc: disable hard version requirements
Enable compilation on machines with an old libfdk-aac.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-06 02:33:33 +01:00
Clément Bœsch
d92a725329 x86/vp9lpf: remove 8 SWAPs in 84/48 transpose. 2014-02-05 07:21:13 +01:00
Clément Bœsch
97dde561de x86/vp9lpf: remove braindead double pxor. 2014-02-05 07:21:11 +01:00
Clément Bœsch
9a3b05b0a9 x86/vp9lpf: save a few mov in flat8in/hev masks calc. 2014-02-05 07:21:09 +01:00
Clément Bœsch
91d85bb167 x86/vp9lpf: add ff_vp9_loop_filter_[vh]_44_16_{sse2,ssse3,avx}. 2014-02-05 07:21:06 +01:00
Michael Niedermayer
acd7505351 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpeg: K&R formatting cosmetics

Conflicts:
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 03:59:37 +01:00
Michael Niedermayer
6a4cc50980 Merge commit '4c3e1956ee35fdcc5ffdb28782050164b4623c0b'
* commit '4c3e1956ee35fdcc5ffdb28782050164b4623c0b':
  lagarith: reallocate rgb_planes when needed

Conflicts:
	libavcodec/lagarith.c

See: 9eef41b848
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 02:47:46 +01:00
Michael Niedermayer
2b88cb2f46 Merge commit '2240e2078d53d3cfce8ff1dda64e58fa72038602'
* commit '2240e2078d53d3cfce8ff1dda64e58fa72038602':
  truemotion1: check the header size

See: e7b43e8e84
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 02:25:34 +01:00
Michael Niedermayer
e7724f346a Merge commit '5430839144c6da0160e8e0cfb0c8db01de432e94'
* commit '5430839144c6da0160e8e0cfb0c8db01de432e94':
  eacmv: clear references on frame dimensions change

Conflicts:
	libavcodec/eacmv.c

See: e9d443cf08
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 01:42:06 +01:00
Michael Niedermayer
dcbc748ad1 Merge commit 'd509ae5be0a9bac35a4cedbe68b774a74446bb27'
* commit 'd509ae5be0a9bac35a4cedbe68b774a74446bb27':
  jvdec: K&R formatting cosmetics

Conflicts:
	libavcodec/jvdec.c
	libavformat/jvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 01:18:48 +01:00
Vittorio Giovara
a91d3658d9 mpeg: K&R formatting cosmetics
Also adjust header #include order and some comments.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-04 22:29:53 +01:00
Anton Khirnov
4c3e1956ee lagarith: reallocate rgb_planes when needed
Fixes invalid writes on pixel format changes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 22:00:27 +01:00
Anton Khirnov
2240e2078d truemotion1: check the header size
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 22:00:13 +01:00
Anton Khirnov
1713eec29a shorten: pad the internal bitstream buffer
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 21:59:57 +01:00
Anton Khirnov
5430839144 eacmv: clear references on frame dimensions change
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 21:59:14 +01:00
Michael Niedermayer
20be510887 avcodec/vc1dec: remove blocks_off use from vc1_pred_b_mv()
it should always be 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 20:56:09 +01:00
Michael Niedermayer
41f9742053 avcodec/vc1dec: vc1_pred_b_mv() is not used for fields, simplify code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 20:12:54 +01:00
Michael Niedermayer
c93e691369 Merge commit '1f097d168d9cad473dd44010a337c1413a9cd198'
* commit '1f097d168d9cad473dd44010a337c1413a9cd198':
  h264: reset data partitioning at the beginning of each decode call

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 16:44:32 +01:00
Michael Niedermayer
9a082fec1a Merge commit 'e46ad30a808744ddf3855567e162292a4eaabac7'
* commit 'e46ad30a808744ddf3855567e162292a4eaabac7':
  vp8: use a fixed-size edge emu buffer

Conflicts:
	libavcodec/vp8.c
	libavcodec/vp8.h

See: face578d56
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 16:14:30 +01:00
Michael Niedermayer
40fc1e2dda Merge commit '5de64bb34d68d6c224dca90003172d7a27958825'
* commit '5de64bb34d68d6c224dca90003172d7a27958825':
  utvideoenc: Add support for the new BT.709 FourCCs for YCbCr

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 15:09:02 +01:00
Diego Biurrun
190d4a447b avcodec: Suppress deprecation warnings from avcodec_alloc_frame()
The function is itself obsolete and slated for removal.
2014-02-04 13:46:20 +01:00
Michael Niedermayer
a0d5204cd9 Merge commit 'b25e84b7399bd91605596b67d761d3464dbe8a6e'
* commit 'b25e84b7399bd91605596b67d761d3464dbe8a6e':
  hevc: check that the VCL NAL types are the same for all slice segments of a frame

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 13:44:39 +01:00
Vittorio Giovara
d509ae5be0 jvdec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-02-04 12:35:38 +01:00
Anton Khirnov
1f097d168d h264: reset data partitioning at the beginning of each decode call
Prevents using GetBitContexts with data from previous calls.

Fixes access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 11:26:17 +01:00
Anton Khirnov
e46ad30a80 vp8: use a fixed-size edge emu buffer
The reason is the same as for e588615d93

Based on a patch by Ronald S. Bultje <rsbultje@gmail.com>
2014-02-04 11:21:07 +01:00
Jan Ekström
5de64bb34d utvideoenc: Add support for the new BT.709 FourCCs for YCbCr
With cli usage the decoder might have not set the colorspace during
encoder init, manual colorspace override might be needed in such
cases.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-02-04 10:59:28 +01:00
Anton Khirnov
b25e84b739 hevc: check that the VCL NAL types are the same for all slice segments of a frame
Fixes possible invalid memory access for mismatching skipped/non-skipped
slice segments.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Sample-Id: 00001533-google
2014-02-04 10:39:07 +01:00
Michael Niedermayer
8a3b85f3a7 avcodec/h264: update current_sps & sps->new only after the whole slice header decoder and init code finished
This avoids them being cleared before the full initialization finished

Fixes out of array read
Fixes: asan_heap-oob_f0c5e6_7071_cov_1605985132_mov_h264_aac__Demo_FlagOfOurFathers.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 04:49:25 +01:00
Michael Niedermayer
e708424b70 avcodec/h264: Disallow pps_id changing between slices
Such changes are forbidden in H.264 and lead to race conditions

Fixes out of array read
Fixes: signal_sigsegv_f9796a_1613_cov_3114610371_FM1_BT_B.h264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 00:07:27 +01:00
Michael Niedermayer
1a96b27ebf avcodec/h264: clear dequant8_coeff pointers if 8x8 mode is not enabled
This prevents stale pointers from being left

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 22:15:32 +01:00
Michael Niedermayer
e9314f1968 Merge remote-tracking branch 'dilaroga/master'
* dilaroga/master:
  vda: fix crash when a frame is dropped.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 15:34:00 +01:00
Alex Sukhanov
889afca369 avcodec/aac_adtstoasc_bsf: Fix memory leak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 15:06:41 +01:00
Michael Niedermayer
6e42ccb9db avcodec/aacdec: Fix pulse position checks in decode_pulses()
Fixes out of array read
Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 05:15:41 +01:00
Michael Niedermayer
4d7d9a5782 avcodec/hnm4video: check offset before subtraction in decode_interframe_v4a()
Fixes out of array read
Fixes: signal_sigsegv_1326a09_1752_cov_245452111_GRTH301.HNS
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 03:11:48 +01:00
addr-see-the-website@aetey.se
8e36fc0c33 RoQ encoder: support different integer framerates
Even though the most common framerate for RoQ is 30fps,
the format supports other framerates too.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 02:04:38 +01:00
Michael Niedermayer
d9bb7fc3cb Merge commit '816e5b997028c8215c804b1e58b2388592ed612b'
* commit '816e5b997028c8215c804b1e58b2388592ed612b':
  hevc: Reject impossible slice segment

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 05:40:30 +01:00
Michael Niedermayer
493f750e7a Merge commit '09e2203b8ba6943d5c0fe6d73b65b145c3fdf98e'
* commit '09e2203b8ba6943d5c0fe6d73b65b145c3fdf98e':
  hevc: Consider first quantization group any reference to 0, 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 05:32:12 +01:00
Michael Niedermayer
96c4ba2392 avcodec/hevc: propagate error code from hls_coding_quadtree()
Fixes use of uninitialized memory
Fixes out of array read
Fixes: asan_static-oob_123cee5_2630_cov_1869071233_PICSIZE_A_Bossen_1.bin
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 02:35:11 +01:00
Michael Niedermayer
a744064c41 avcodec/tiff: reset geotag_count in free_geotags()
Fixes null pointer dereference
Fixes: signal_sigsegv_19d922e_3688_cov_1577641655_aletrek_tiff.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 01:48:34 +01:00
addr-see-the-website@aetey.se
392b0345d6 RoQ-encoder: introducing Quake 3 compatibility option
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 22:32:28 +01:00
addr-see-the-website@aetey.se
80a79f2641 RoQ decoder: Remove misleading diagnostics.
It is not necessarily an error when a chunk does not cover a whole block.
Messages did not reflect the actual situation either.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 22:30:22 +01:00
Michael Niedermayer
b51e935477 avcodec/vc1: reset fcm/field_mode in non advanced header parsing
Fixes NULL pointer dereference
Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 19:07:01 +01:00
Michael Niedermayer
dcf5bfbdb6 avcodec/vc1: Check bfraction_lut_index
Fixes: out of array read
Fixes: asan_static-oob_1b40507_2849_SA10143.vc1
Fixes: asan_static-oob_1b40a15_2849_cov_1182297305_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_2159513432_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_3230311510_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 17:10:48 +01:00
Michael Niedermayer
388b4cf86e avcodec/vc1: factor read_bfraction() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 17:06:24 +01:00
Luca Barbato
816e5b9970 hevc: Reject impossible slice segment
A dependent slice cannot have address 0.
Prevent an out of array bound load in ff_hevc_cabac_init().

Sample-Id: 00001406-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-01 17:04:49 +01:00
Luca Barbato
09e2203b8b hevc: Consider first quantization group any reference to 0, 0
According to my understanding of T-REC-H.265-2013044 chapter 8.6.1.

Sample-Id: 00001438-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-01 17:02:35 +01:00
Michael Niedermayer
f4b288a639 avcodec/vc1dec: Print warning for frame pictures with direct mode MBs, followed by field pictures
This case is not implemented
No non fuzzed samples are known to use this

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 06:59:35 +01:00
Michael Niedermayer
85d51d8e32 avcodec/vc1dec: field pictures with direct mode MBs, followed by frame pictures are not supported
This case could occur when cuting and concatenating bitstreams

Fixes out of array read
Fixes: asan_heap-oob_1b33fdd_2849_cov_478905890_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 06:48:44 +01:00
Michael Niedermayer
19b41f8645 avcodec/mjpegdec: use the correct linesize in the flipping code
Fixes out of array access
No releases should be affected
Depends on 7c3700cd1d, do not backport without this one

Fixes: asan_heap-oob_14a37fe_9111_cov_1692584941_test4.amv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 21:47:44 +01:00
Michael Niedermayer
f58eab1512 avcodec/takdec: always check bits_per_raw_sample
Fixes out of array access
Fixes: asan_heap-oob_19c7a94_6470_cov_1453611734_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 19:54:27 +01:00
Michael Niedermayer
0de9d72b7c mxpeg_decode_end: zero bitmask size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 18:34:14 +01:00
Michael Niedermayer
2884688bd5 avcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask size
Fixes: heap array overread
Fixes: asan_heap-oob_149b2bc_6577_m1.mxg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 18:34:08 +01:00
Michael Niedermayer
dd4237f87d Merge commit '5312818524484a995433b986a2a7a6602572d4db'
* commit '5312818524484a995433b986a2a7a6602572d4db':
  atrac3plus: Make initialization dependant on channel count rather than channel map

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 14:53:06 +01:00
Michael Niedermayer
de17ccc774 Merge commit '51daafb02eaf96e0743a37ce95a7f5d02c1fa3c2'
* commit '51daafb02eaf96e0743a37ce95a7f5d02c1fa3c2':
  x86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such.

Conflicts:
	libavcodec/x86/videodsp_init.c

See: 1b3a7e1f42
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 14:30:30 +01:00
Janne Grunau
7716dd9fbb xvid: switch to xvid mmx idct as soon as possible
The idct implementation cannot be changed after the quantization matrices
are read since it use a different permutaion.

Bug-Id: videolan/7411
2014-01-31 11:09:11 +01:00
Jan Ekström
5312818524 atrac3plus: Make initialization dependant on channel count rather than channel map
Makes it easier to recreate an AVCodecContext for ATRAC3+ decoding,
which is needed in multimedia frameworks, as well as in general cases
where demuxing and decoding are separate entities.
2014-01-31 11:09:10 +01:00
Clément Bœsch
c5dd73b890 x86/vp9lpf: add ff_vp9_loop_filter_h_{48,84}_16_{sse2,ssse3,avx}().
5.40s → 5.30s overall decode time with -threads 1 on ped1080p.webm
(i7 920, ssse3)
2014-01-30 19:34:13 +01:00
Ronald S. Bultje
9ee9c679a7 x86: videodsp: Fix a bug in a %if statement where we used '%%' instead of '&&'.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-30 15:33:23 +01:00
Ronald S. Bultje
51daafb02e x86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such.
Should fix crashes or corrupt output on pre-SSE2 CPUs when they were
using SSE2-code (e.g. AMD Athlon XP 2400+ or Intel Pentium III) in
hfix or hvar single-edge (left/right) extension functions.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-30 15:30:01 +01:00
Michael Niedermayer
3c7195a969 Merge commit '23d461fe8714a20ee5e6929f22c61512fdda568e'
* commit '23d461fe8714a20ee5e6929f22c61512fdda568e':
  ac3dec: Allow asymmetric application of DRC when drc_scale > 1

Conflicts:
	libavcodec/ac3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 14:55:03 +01:00
Carl Eugen Hoyos
e1cb6dc59e Warn the user if mjpeg cbr encoding with frame threading was requested. 2014-01-30 01:37:27 +01:00
Michael Niedermayer
1a5e8511d4 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Force automatic thread_count to 1 for cbr mjpeg frame threading.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:55:29 +01:00
Michael Niedermayer
b80073c05f avcodec/mjpegdec: use av_freep() instead of av_free()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:50:43 +01:00
Michael Niedermayer
ed56c021e7 avcodec/mjpegdec Fix potential memleak of stereo3D at the end in case of decoding failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:25:04 +01:00
Carl Eugen Hoyos
cfc36666f6 Force automatic thread_count to 1 for cbr mjpeg frame threading.
Constant bit rate mjpeg encoding fails for threads > 1 and frame threading.
2014-01-30 00:22:25 +01:00
Kirill Gavrilov
e9e7e68516 mjpegdec: parse JPS extension and save relevant stereo3d information
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:17:02 +01:00
John Stebbins
23d461fe87 ac3dec: Allow asymmetric application of DRC when drc_scale > 1
Amplification of quiet sounds is enhanced.
Inspired by gbooker's A52Decoder.
2014-01-29 23:26:25 +01:00
Michael Niedermayer
fbafd64acc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpeg: Drop unused parameters from ff_draw_horiz_band()

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-29 17:05:51 +01:00
Diego Biurrun
54b2ce7418 mpeg: Drop unused parameters from ff_draw_horiz_band() 2014-01-29 16:37:23 +01:00
Carl Eugen Hoyos
4151b9953e Add elbg Makefile dependency to the cinepak encoder. 2014-01-28 22:39:45 +01:00
Michael Niedermayer
bb7a711156 avcodec/huffyuvenc: frame multi-threading support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-28 14:51:42 +01:00
James Almer
644c32ea4b x86/vp9lpf: add ff_vp9_loop_filter_[vh]_88_16_sse2()
Similar gains as the ssse3 version once again

Signed-off-by: James Almer <jamrial@gmail.com>
2014-01-28 09:30:55 +01:00
Clément Bœsch
222c46c531 x86/vp9lpf: add ff_vp9_loop_filter_[vh]_88_16_{ssse3,avx}.
9680 decicycles in loop_filter_v_88_16_c, 4193765 runs, 539 skips
9233 decicycles in loop_filter_h_88_16_c, 4193751 runs, 553 skips

1929 decicycles in ff_vp9_loop_filter_v_88_16_ssse3, 4194118 runs, 186 skips
2738 decicycles in ff_vp9_loop_filter_h_88_16_ssse3, 4193861 runs, 443 skips

5.978 → 5.417 overall decode time on ped1080p.webm (-threads 1)

Adding SSE2 support should be relatively trivial (just a matter of
changing the pshufb [mask_mix] with something else), patch welcome.
2014-01-28 07:36:38 +01:00
Michael Niedermayer
2a9c50798b avcodec/huffyuv: dont depend on bitstream_bpp having a specific value for version>2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-28 00:27:57 +01:00
Michael Niedermayer
673ce8e46a avcodec/libfdk-aacenc: change MODE_7_1_FRONT_CENTER to map to AV_CH_LAYOUT_7POINT1_WIDE_BACK
This was suggested by Rodeo on IRC
<Rodeo> for consistency with the rest, MODE_7_1_FRONT_CENTER would be AV_CH_LAYOUT_7POINT1_WIDE_BACK (since LS+RS is mapped to back channels in other modes)

Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 23:33:10 +01:00
Michael Niedermayer
a38842120a avcodec/libfdk-aacenc: change MODE_7_1_REAR_SURROUND to map to AV_CH_LAYOUT_7POINT1
This was suggested by Rodeo on IRC
<Rodeo> sorry, I meant MODE_7_1_REAR_SURROUND would probably be AV_CH_LAYOUT_7POINT1

Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 23:33:10 +01:00
Clément Bœsch
822385d775 x86/vp9lpf: add a preload system in FILTER_UPDATE.
Allow some macro refactoring in filter14().
2014-01-27 22:39:26 +01:00
Clément Bœsch
315b4775ad x86/vp9lpf: refactor v/h using common macros for P7 to Q7. 2014-01-27 22:39:26 +01:00
Clément Bœsch
5d144086cc x86/vp9lpf: faster P7..Q7 accesses.
Introduce 2 additional registers for stride3 and mstride3 to allow
direct accesses (lea drops).

3931 → 3827 decicycles in ff_vp9_loop_filter_v_16_16_ssse3

Also uses defines to clarify the code.
2014-01-27 22:37:42 +01:00
Xidorn Quan
31a0ca9e75 vda: fix crash when a frame is dropped.
Signed-off-by: Sebastien Zwickert <dilaroga@gmail.com>
2014-01-27 20:36:42 +01:00
Carl Eugen Hoyos
05e5bb6107 Fix decoding of some 8 < bpc < 16 signed j2k samples with libopenjpeg.
No testcase known.

Reviewed-by: Michael Bradshaw
2014-01-27 14:38:59 +01:00
Rainer Hochecker
bceeccc648 dxva2: bump maximum number of slieces for mpeg2
Suggested by heleppkes on https://trac.ffmpeg.org/ticket/3133

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 14:24:29 +01:00
Michael Niedermayer
6369766f01 avcodec/huffyuv: support gbrp9/10/12/14
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 02:11:29 +01:00
Michael Niedermayer
7cf8918b0d avcodec/huffyuv: update years in copyright
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 01:45:57 +01:00
Ronald S. Bultje
c2871568cf vp9: fix invalid ref frame w/h on size change.
Fixes invalid reads and crashes in vp90-2-05-resize.webm and fuzzed6.ivf.
The output is still not identical to what libvpx does (because we don't
actually scale in MC).

Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 20:16:01 +01:00
Ronald S. Bultje
d9343c3484 vp9: disable use_last_frame_mvs on resolution change (scalable).
Prevents some invalid memory accesses after resolution change in
vp90-2-05-resize.webm, and libvpx does this too.

Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 20:15:45 +01:00
Michael Niedermayer
e6c0da70fc avcodec/huffyuvdec: optimize >8bps VLC reading
97479 -> 54891 decicycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 19:59:57 +01:00
Michael Niedermayer
599e629f88 avcodec/huffyuvenc: fix end pointer for stats_out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 16:24:36 +01:00
Michael Niedermayer
a301bb63f0 avcodec/huffyuvenc: fail if stats_out is too small instead of silently truncating
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 16:23:45 +01:00
Jean First
91489d28ba avcodec/libfdk_aacenc: enable 7.1 channel encoding
7.1(wide) and 7.1(wide-side) channel layouts are supported in fdk_aac since october 2013 (commit fa3eba1644)

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 03:31:42 +01:00
Michael Niedermayer
7667afffb8 avcodec/mpeg12dec: Revert Change to mpeg2_fast_decode_block_non_intra
This fixes the speed regression from 20626f53e9
and still checks sufficiently to prevent out of allocated memory accesses
due to the index

Before:
1823 decicycles in mpeg2_fast_decode_block_non_intra, 8388493 runs, 115 skips
After:
1808 decicycles in mpeg2_fast_decode_block_non_intra, 8388494 runs, 114 skips

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 02:57:40 +01:00
Michael Niedermayer
6a92598e14 avcodec/mpeg12dec: Redesign index checks for mpeg2_fast_decode_block_intra
This fixes the speed regression from 20626f53e9
and still checks sufficiently to prevent out of allocated memory accesses
due to the index

Before:
1681 decicycles in mpeg2_fast_decode_block_intra, 4194238 runs, 66 skips
After:
1658 decicycles in mpeg2_fast_decode_block_intra, 4194248 runs, 56 skips

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 02:57:29 +01:00
Michael Niedermayer
20626f53e9 Merge commit '6d93307f8df81808f0dcdbc064b848054a6e83b3'
* commit '6d93307f8df81808f0dcdbc064b848054a6e83b3':
  mpeg12: check scantable indices in all decode_block functions

Benchmarks

Before:
1878 decicycles in mpeg2_decode_block_non_intra, 8388487 runs, 121 skips
1700 decicycles in mpeg2_decode_block_intra, 4194239 runs, 65 skips
1808 decicycles in mpeg2_fast_decode_block_non_intra, 8388492 runs, 116 skips
1669 decicycles in mpeg2_fast_decode_block_intra, 4194248 runs, 56 skips
--
2056 decicycles in mpeg1_decode_block_inter, 65535 runs, 1 skips
2346 decicycles in mpeg1_decode_block_intra, 32768 runs, 0 skips
2011 decicycles in mpeg1_fast_decode_block_inter, 65533 runs, 3 skips
----------------
After:
1858 decicycles in mpeg2_decode_block_non_intra, 8388490 runs, 118 skips
1691 decicycles in mpeg2_decode_block_intra, 4194233 runs, 71 skips
1823 decicycles in mpeg2_fast_decode_block_non_intra, 8388493 runs, 115 skips
1681 decicycles in mpeg2_fast_decode_block_intra, 4194238 runs, 66 skips
--
2010 decicycles in mpeg1_decode_block_inter, 65535 runs, 1 skips
2322 decicycles in mpeg1_decode_block_intra, 32766 runs, 2 skips
1995 decicycles in mpeg1_fast_decode_block_inter, 65535 runs, 1 skips

All benchmarks are the best scores of several runs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 02:52:21 +01:00
Michael Niedermayer
965fa6b0d9 Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec'
* commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec':
  avutil: remove timer.h include from internal.h

Conflicts:
	libavcodec/ffv1dec.c
	libavutil/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 01:54:55 +01:00
Michael Niedermayer
53167ecfdb avcodec/huffyuv: support AV_PIX_FMT_YUV(A)4XYP16 and GRAY16
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 00:23:03 +01:00
Janne Grunau
6d93307f8d mpeg12: check scantable indices in all decode_block functions
Add checks to the fast functions used with CODEC_FLAGS2_FAST and move
the check for all other functions to before the invalid memory is
accessed. Fixes https://trac.videolan.org/vlc/ticket/9713 with
CODEC_FLAGS2_FAST.

CC: libav-stable@libav.org
2014-01-25 21:50:20 +01:00
Janne Grunau
fb0c9d41d6 avutil: remove timer.h include from internal.h
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
2014-01-25 21:50:20 +01:00
Michael Niedermayer
018e2b57ca avcodec/libx264: also consider ticks per frame for fps/timebase setup
Setting fps = 1/timebase is not correct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-25 16:31:30 +01:00
Clément Bœsch
5f4d04d084 x86/lossless_videodsp: silly one-line cosmetic. 2014-01-25 16:24:50 +01:00
Clément Bœsch
5267e85056 x86/lossless_videodsp: use common macro for add and diff int16 loop. 2014-01-25 14:27:37 +01:00
Clément Bœsch
cddbfd2a95 x86/lossless_videodsp: simplify and explicit aligned/unaligned flags 2014-01-25 11:59:43 +01:00
Michael Niedermayer
5554c6dd45 Merge remote-tracking branch 'rbultje/vp9-simd'
* rbultje/vp9-simd:
  vp9: fix memory corruption if header decoding fails after size change.
  vp9/x86: use explicit register for relative stack references.
  vp9/x86: iwht4x4 (lossless) mmx.
  vp9/x86: 4x4 iadst SIMD (ssse3) variants.
  vp9/x86: 8x8 iadst SIMD (ssse3/avx) variants.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-25 01:43:54 +01:00
Michael Niedermayer
4b84a69ebb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dxtory: compressed RGB555/RGB565 decoding support

Conflicts:
	libavcodec/dxtory.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-25 01:39:19 +01:00
Michael Niedermayer
2d0d1f7eb3 Merge commit '0e1ad2f591b87e944550c15b54e54f8189743289'
* commit '0e1ad2f591b87e944550c15b54e54f8189743289':
  dxtory: add more compressed and uncompressed modes

Conflicts:
	libavcodec/dxtory.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-25 01:33:42 +01:00
Ronald S. Bultje
4147b337c1 vp9: fix memory corruption if header decoding fails after size change. 2014-01-24 19:25:26 -05:00
Ronald S. Bultje
c9e6325ed9 vp9/x86: use explicit register for relative stack references.
Before this patch, we explicitly modify rsp, which isn't necessarily
universally acceptable, since the space under the stack pointer might
be modified in things like signal handlers. Therefore, use an explicit
register to hold the stack pointer relative to the bottom of the stack
(i.e. rsp). This will also clear out valgrind errors about the use of
uninitialized data that started occurring after the idct16x16/ssse3
optimizations were first merged.
2014-01-24 19:25:25 -05:00
Ronald S. Bultje
97474d527f vp9/x86: iwht4x4 (lossless) mmx. 2014-01-24 19:25:25 -05:00
Ronald S. Bultje
d43efa68bd vp9/x86: 4x4 iadst SIMD (ssse3) variants.
Cycle measurements for intra itxfm_4x4_add on ped1080p.webm:
idct_idct:    66 -> 67 cycles (noise measurement)
idct_iadst:  199 -> 79 cycles
iadst_idct:  165 -> 70 cycles
iadst_iadst: 183 -> 82 cycles
2014-01-24 19:25:25 -05:00
Ronald S. Bultje
baf47020cd vp9/x86: 8x8 iadst SIMD (ssse3/avx) variants.
Cycle measurements for intra itxfm_8x8_add on ped1080p.webm:
idct_idct:   133 -> 135 cycles (noise measurement)
idct_iadst:  900 -> 241 cycles
iadst_idct:  864 -> 215 cycles
iadst_iadst: 973 -> 310 cycles
2014-01-24 19:25:25 -05:00
Michael Niedermayer
cf812d8129 avcodec/dvbsubdec: Remove unused display_list_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-25 01:22:48 +01:00
Wim Vander Schelden
af09be4f4b Fixed a memory leak in dvbsubenc.c: sub->num_rects was reduced without freeing the associated rects.
Signed-off-by: Wim Vander Schelden <lists@fixnum.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-25 00:41:57 +01:00
Kostya Shishkov
28e1eed3c2 dxtory: compressed RGB555/RGB565 decoding support 2014-01-24 20:09:51 +01:00
Kostya Shishkov
0e1ad2f591 dxtory: add more compressed and uncompressed modes 2014-01-24 20:09:44 +01:00
Michael Niedermayer
934bb11ad7 avcodec/mpeg12dec: fix mis-indented line
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:17 +01:00
Michael Niedermayer
5f54756f7e avcodec/mpeg12dec: Disable the checked bitstream reader
Mpeg1/2 should not need it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:17 +01:00
Michael Niedermayer
76b5e99ce9 avcodec/mpeg12dec: Check for overread in mpeg_decode_slice()
This is needed in case the checked bitstream reader is disabled

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:17 +01:00
Michael Niedermayer
d82eccea2b avcodec/mpeg12dec: check block index in mpeg2_fast_decode_block_non_intra()
Prevents some overreads at the cost of 1 cpu cycle

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Michael Niedermayer
0c8e5fb211 avcodec/mpeg12dec: Optimize mpeg1_decode_block_intra()
sandybridge i7 274->260 cycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Michael Niedermayer
0a59055167 avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()
No speedloss meassured

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Michael Niedermayer
746350ea0f avcodec/mpeg12dec: Make mpeg2_fast_decode_block_intra() more robust by breaking out on invalid vlcs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Guillaume Martres
50866c8d95 vp9: fix bugs in updating coef probabilities with parallelmode=1
- The memcpy was completely wrong because
s->prob_ctx[s->framectxid].coef is a [4][2][2][6][6][3] array, whereas
s->prob.coef is a [4][2][2][6][6][11] array.
- The additional check was committed to ffmpeg by Ronald S. Bultje.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-24 07:03:11 +01:00
Ronald S. Bultje
bd01412313 vp9: fix mvref finding to adhere to bug in libvpx.
Fixes a particular youtube video that I unfortunately can't share.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-24 07:02:56 +01:00
Michael Niedermayer
40c218c60d avcodec/vc1: fix type of tmp
Fixes CID1163850
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 03:40:37 +01:00