Commit Graph

26922 Commits

Author SHA1 Message Date
Michael Niedermayer
dcc9009e14 Merge remote-tracking branch 'rbultje/vp9-simd'
* rbultje/vp9-simd:
  vp9: make mv bounds 32bit.
  vp9: reset contextual caches on frame size change with mt enabled.
  vp9/x86: idct_32x32_add_ssse3 sub-8x8-idct.
  vp9/x86: idct_32x32_add_ssse3 sub-16x16-idct.
  vp9/x86: idct_32x32_add_ssse3.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 13:02:53 +01:00
Michael Niedermayer
5d4541007f avcodec/huffyuvenc: fix -context 1 encoding
Fixes Ticket3281

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 12:39:31 +01:00
Michael Niedermayer
8be8dddd13 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  arm: Add a missing # as prefix for an immediate constant

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 05:44:56 +01:00
Michael Niedermayer
edba54630b Merge commit '5dae4872357613a0b51120b54a4c5221e0ec3f69'
* commit '5dae4872357613a0b51120b54a4c5221e0ec3f69':
  arm: Allow overriding the alignment set in the function macro

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 05:36:56 +01:00
Michael Niedermayer
3c00d4c5f0 Merge commit 'b7b932f5e3602bd34c3cc634b71c8bbbc0fb8dc0'
* commit 'b7b932f5e3602bd34c3cc634b71c8bbbc0fb8dc0':
  arm: Remove a leftover define for the pld instruction

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 05:21:18 +01:00
Michael Niedermayer
9ef7c0c551 Merge commit '67bb3a4e285a5871770cbaa2d78bf9024961dd0f'
* commit '67bb3a4e285a5871770cbaa2d78bf9024961dd0f':
  arm: cosmetics: Reindent the h264dsp neon init function

Conflicts:
	libavcodec/arm/h264dsp_init_arm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 05:13:25 +01:00
Ronald S. Bultje
024fac5cd4 vp9: make mv bounds 32bit.
Fixes an assert in file from trac ticket 3188.
2014-01-07 20:43:35 -05:00
Ronald S. Bultje
5b0fc07819 vp9: reset contextual caches on frame size change with mt enabled.
Fixes crash/valgrind errors in trac ticket 3188 and hang in 3274.
2014-01-07 20:43:35 -05:00
Ronald S. Bultje
04a187fb2a vp9/x86: idct_32x32_add_ssse3 sub-8x8-idct.
Runtime of the full 32x32 idct goes from 2446 to 2441 cycles (intra) or
from 1425 to 1306 cycles (inter). Overall runtime is not significantly
affected.
2014-01-07 20:43:35 -05:00
Ronald S. Bultje
37b001d14d vp9/x86: idct_32x32_add_ssse3 sub-16x16-idct.
Runtime of all IDCTs together goes from 3327 to 2473 cycles (intra, i.e.
~35% faster) or from 2312 to 1448 cycles (inter, i.e. ~60% faster). Total
decode time of ped1080p.webm goes from 8.086sec to 7.974sec (1.4% faster).
2014-01-07 20:43:34 -05:00
Ronald S. Bultje
e84d14df10 vp9/x86: idct_32x32_add_ssse3.
Sub-IDCTs will follow later. ped1080.webm goes from 9.295s to 8.191s
(13.5% faster). The IDCT itself goes from 4372 (intra) or 4337 (inter)
to 403 (intra) or 329 (inter) cycles for the DC-only form, 23755 (intra)
or 23723 (inter) to 3497 (intra) or 3607 (inter) cycles for the no-DC
form, which averages from 23393 (intra) or 16612 (inter) to 3449 (intra)
or 2392 (inter) for all 32x32s together, i.e. about ~7x faster (all
tests done on ped1080p.webm).
2014-01-07 20:43:30 -05:00
Martin Storsjö
952d3187d8 arm: Add a missing # as prefix for an immediate constant
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:30:13 +02:00
Martin Storsjö
5dae487235 arm: Allow overriding the alignment set in the function macro
The function macro always sets .align 2 before declaring the
function label (since 5c5e1ea3) and always sets the section to
.text (since 278caa6a).

The .align 5 before certain functions, added in fc252eba, were added
before .text and .align were added to the function macro and thus
became useless/unused when the function macro got them.

This restores the original intention, to align the loop entry
points.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:29:56 +02:00
Martin Storsjö
b7b932f5e3 arm: Remove a leftover define for the pld instruction
This file no longer uses the pld instruction at all, all such uses
have been split into hpeldsp_arm.S.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:29:42 +02:00
Martin Storsjö
67bb3a4e28 arm: cosmetics: Reindent the h264dsp neon init function
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:29:31 +02:00
Michael Niedermayer
8aead3ffa8 avformat/adxdec: dont return random data on EOF
Fixes use of uninitialized memory
Partly fixes; msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 16:05:56 +01:00
Michael Niedermayer
8ca9a68f19 avcodec/flacdec: check rice_order against blocksize
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f6e13c220d0_8489_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 14:02:53 +01:00
Michael Niedermayer
99b6357f37 rename CONFIG_FFT_FIXED_32 -> FFT_FIXED_32
This matches FFT_FLOAT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 13:11:06 +01:00
Michael Niedermayer
7778979f6f Merge commit '794fcf79a89eca2d4e889803b2c804a0b1defbb3'
* commit '794fcf79a89eca2d4e889803b2c804a0b1defbb3':
  Rename CONFIG_FFT_FLOAT ---> FFT_FLOAT

Conflicts:
	libavcodec/fft-internal.h
	libavcodec/fft-test.c
	libavcodec/fft_fixed.c
	libavcodec/fft_float.c
	libavcodec/fft_template.c
	libavcodec/mdct_fixed.c
	libavcodec/mdct_float.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 13:10:56 +01:00
Michael Niedermayer
21b25537fb avcodec/mpeg4videodec: use av_fast_padded_malloc() for bitstream buffer
Fixes use of uninitialized memory with vlc (sample from ticket3277)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 01:29:38 +01:00
Michael Niedermayer
13f3092b38 avcodec/huffyuv: add YUVA420P, YUVA422P, YUVA444P, GBRAP, GRAY8A
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 21:19:32 +01:00
Michael Niedermayer
60ab582a4e avcodec/huffyuv: add GRAY8 support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 20:00:25 +01:00
Michael Niedermayer
22f59a8cbe avcodec/huffyuv: add GBRP support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 19:56:52 +01:00
Diego Biurrun
794fcf79a8 Rename CONFIG_FFT_FLOAT ---> FFT_FLOAT
The define does not originate from configure, so it should not
have a name that is CONFIG_-prefixed.
2014-01-06 19:12:48 +01:00
Paul B Mahol
63debaa74c libopusenc: Change default frame duration to 20 ms
20 ms is the default in the libopus encoder, and gives better
quality than 10 ms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-06 18:56:44 +02:00
Michael Niedermayer
8367bc6be8 Merge commit '9cbf2d78f0a9c19129e7a70b2281a450d386c6d9'
* commit '9cbf2d78f0a9c19129e7a70b2281a450d386c6d9':
  pthread_frame: unref decoded frames on failure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 17:01:20 +01:00
Michael Niedermayer
30056fd0be Merge commit 'a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb'
* commit 'a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb':
  h264: do not use 422 functions for monochrome

See: 07abf13da4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 16:51:23 +01:00
Michael Niedermayer
64591f8f86 Merge commit '9eef9eb3014b2ed9c3ff4aac510a9f04edb555cf'
* commit '9eef9eb3014b2ed9c3ff4aac510a9f04edb555cf':
  h264: check that execute_decode_slices() is not called too many times

Conflicts:
	libavcodec/h264.c

The check is replaced by an assert() as the mb index should not ever go out
of bounds.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 16:39:38 +01:00
Michael Niedermayer
a60abb1ee0 Merge commit 'bfd26b7ce6efea594f2b99441d900419df3af638'
* commit 'bfd26b7ce6efea594f2b99441d900419df3af638':
  h264: reject mismatching luma/chroma bit depths during sps parsing

Conflicts:
	libavcodec/h264_ps.c

See: bdeb61ccc6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 16:28:55 +01:00
Michael Niedermayer
98dcbb47fa avcodec/h264: reset list_count too in case of error in ff_set_ref_count()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 16:17:45 +01:00
Michael Niedermayer
7ee8a1c562 Merge commit '9a026c72982faf20e1c8dfbe48f0b312cdea69c8'
* commit '9a026c72982faf20e1c8dfbe48f0b312cdea69c8':
  h264: rebuild the default ref list if the reference count changes

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 16:17:38 +01:00
Michael Niedermayer
a4f8a56495 Merge commit '4736d003fac30af4afd8390182f12f480ad78801'
* commit '4736d003fac30af4afd8390182f12f480ad78801':
  cavsdec: check ff_get_buffer() return value

Conflicts:
	libavcodec/cavsdec.c

See: eee8c94f50
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 15:52:44 +01:00
Michael Niedermayer
3328d105f7 Merge commit '50079a6aa93291e6dc9d9fb8d33da83f79e9311d'
* commit '50079a6aa93291e6dc9d9fb8d33da83f79e9311d':
  lavc: do not leak the internal frame if opening the codec fails

Conflicts:
	libavcodec/utils.c

See: 8b285f03f7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 15:44:11 +01:00
Michael Niedermayer
4e276b84e6 Merge commit '8058284ce09030b47512746d726fb2ad3ae8a20f'
* commit '8058284ce09030b47512746d726fb2ad3ae8a20f':
  lavc: add 422/444 YUV with alpha to align_dimensions()

Conflicts:
	libavcodec/utils.c

Only cosmetical changes happen as these formats already where in the list before

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 15:17:34 +01:00
Michael Niedermayer
b7697d29ed Merge commit '2f97094608cfd2665660f7a26a3291559b186752'
* commit '2f97094608cfd2665660f7a26a3291559b186752':
  lagarith: do not call simd functions on unaligned lines

Conflicts:
	libavcodec/lagarith.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 15:07:35 +01:00
Michael Niedermayer
e86cd37a70 Merge commit 'f4a8a0080537484154bb74e08ec76cbcbd25484b'
* commit 'f4a8a0080537484154bb74e08ec76cbcbd25484b':
  sgidec: fix buffer size check in expand_rle_row()

Conflicts:
	libavcodec/sgidec.c

See: 39c56ef921
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 14:43:04 +01:00
Michael Niedermayer
80d44190c4 Merge commit 'adb199d1bc7f86aa6b85986f40190ec17f99d34f'
* commit 'adb199d1bc7f86aa6b85986f40190ec17f99d34f':
  kgv1dec: replace forcing EMU_EDGE by a copy

Conflicts:
	libavcodec/kgv1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 14:23:01 +01:00
Michael Niedermayer
d1134ababd Merge commit 'fe80fa53bc4977ef6e8e749a9df8ca5590a09307'
* commit 'fe80fa53bc4977ef6e8e749a9df8ca5590a09307':
  4xm: replace forcing EMU_EDGE by a copy

Conflicts:
	libavcodec/4xm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 13:51:01 +01:00
Anton Khirnov
9cbf2d78f0 pthread_frame: unref decoded frames on failure
This is similar to what the non-threaded code already does.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:25:55 +01:00
Anton Khirnov
a03a642d5c h264: do not use 422 functions for monochrome
Fixes invalid memory access.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:25:36 +01:00
Anton Khirnov
9eef9eb301 h264: check that execute_decode_slices() is not called too many times
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:25:25 +01:00
Anton Khirnov
bfd26b7ce6 h264: reject mismatching luma/chroma bit depths during sps parsing
There is no point in delaying the check and it avoids bugs with a
half-initialized context.

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:23:45 +01:00
Anton Khirnov
9a026c7298 h264: rebuild the default ref list if the reference count changes
Fixes possible access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:23:17 +01:00
Anton Khirnov
4736d003fa cavsdec: check ff_get_buffer() return value
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:22:48 +01:00
Anton Khirnov
50079a6aa9 lavc: do not leak the internal frame if opening the codec fails 2014-01-06 08:21:58 +01:00
Anton Khirnov
8058284ce0 lavc: add 422/444 YUV with alpha to align_dimensions()
Aligns frame dimensions to 16, which fixes potential invalid writes.
2014-01-06 08:20:56 +01:00
Kostya Shishkov
2f97094608 lagarith: do not call simd functions on unaligned lines
They end up overwriting past the line end.

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

Bug-Id: vlc/9700
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-06 08:19:29 +01:00
Anton Khirnov
f4a8a00805 sgidec: fix buffer size check in expand_rle_row()
Right now it will spuriously fail if the linesize is exactly equal to
the data width.

CC:libav-stable@libav.org
2014-01-06 08:18:45 +01:00
Anton Khirnov
adb199d1bc kgv1dec: replace forcing EMU_EDGE by a copy
The decoder currently sets CODEC_FLAG_EMU_EDGE and relies on
get_buffer2() to always provide buffers with linesize == 2 * width.
This is wrong, since we place no such restriction on get_buffer2()
implementations.

Fix this by decoding into internal buffers and copying them to output
frames. Since this is a very obscure decoder, the performance hit should
not be an issue.
2014-01-06 08:15:36 +01:00
Anton Khirnov
fe80fa53bc 4xm: replace forcing EMU_EDGE by a copy
The decoder currently sets CODEC_FLAG_EMU_EDGE and relies on
get_buffer2() to always provide buffers with linesize == 2 * width.
This is wrong, since we place no such restriction on get_buffer2()
implementations.

Fix this by decoding into internal buffers and copying them to output
frames. Since this is a very obscure decoder, the performance hit should
not be an issue.
2014-01-06 08:14:14 +01:00