Commit Graph

26871 Commits

Author SHA1 Message Date
Michael Niedermayer
4ced5d7780 avcodec/hevc: Fix modulo operations
Fixes qp fields becoming out of range
Fixes: asan_static-oob_e393a3_6998_WPP_A_ericsson_MAIN10_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 04:32:37 +01:00
Michael Niedermayer
d66bab0a69 avcodec/hevc_ps: check that VPS referenced from SPS exists
This matches how its done for SPS/PPS.
An alternative to this is to check it when its used.

Fixes null pointer dereference
Fixes: signal_sigsegv_e30a43_1437_CIP_A_Panasonic_3.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 04:30:04 +01:00
Michael Niedermayer
4816d63fb7 avcodec/huffyuvdec: optimize decode_plane_bitstream(), use joint tables for new yuv formats
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 01:38:14 +01:00
Michael Niedermayer
27b1e63f32 avcodec/huffyuv: Support more 8bit YUV formats
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 01:02:26 +01:00
Michael Niedermayer
d18234f319 Merge commit '7840c40445c9f52aeccba96de3d27613398bfbf2'
* commit '7840c40445c9f52aeccba96de3d27613398bfbf2':
  (e)ac3dec: set AV_FRAME_DATA_MATRIXENCODING side data.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 23:14:26 +01:00
Michael Niedermayer
7b3c78b5e6 Merge commit '13345fc1f86fc3615789e196d5a339c1c27c9068'
* commit '13345fc1f86fc3615789e196d5a339c1c27c9068':
  (e)ac3: parse and store the Dolby Surround, Surround EX and Headphone mode flags.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 23:06:53 +01:00
Michael Niedermayer
85b424a45e Merge commit 'e92123093dfdca0ef6608998240e2f9345d63bff'
* commit 'e92123093dfdca0ef6608998240e2f9345d63bff':
  mlpdec: set AV_FRAME_DATA_MATRIXENCODING side data.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 23:00:22 +01:00
Michael Niedermayer
b4107f7805 Merge commit '4b7f1a7ced0e98f2cc698d896f7ebab8d30eaa09'
* commit '4b7f1a7ced0e98f2cc698d896f7ebab8d30eaa09':
  mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream.

Conflicts:
	libavcodec/mlp_parser.h
	libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 22:53:13 +01:00
Michael Niedermayer
ae01af2475 Merge commit '30d70e79a6b4ac7f4eb66446a9da275161ef6ea7'
* commit '30d70e79a6b4ac7f4eb66446a9da275161ef6ea7':
  dcadec: set AV_FRAME_DATA_MATRIXENCODING side data.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 22:34:21 +01:00
Michael Niedermayer
bc7f76377c Merge commit '6bfdb2de881372048be7fbda643417e1fd3ce93c'
* commit '6bfdb2de881372048be7fbda643417e1fd3ce93c':
  dcadec: set the output channel mode more accurately.

Conflicts:
	libavcodec/dcadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 22:27:34 +01:00
Michael Niedermayer
4cf4da9dc5 Merge commit '5b4797a21db900b7d509660b7a4d49829089b004'
* commit '5b4797a21db900b7d509660b7a4d49829089b004':
  avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 22:12:41 +01:00
Ronald S. Bultje
847072873c vp9_parse: don't use AVCodecParserContext as av_log context.
Fixes trac ticket 3273.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 21:45:24 +01:00
Tim Walker
7840c40445 (e)ac3dec: set AV_FRAME_DATA_MATRIXENCODING side data. 2014-01-05 16:41:56 +01:00
Tim Walker
13345fc1f8 (e)ac3: parse and store the Dolby Surround, Surround EX and Headphone mode flags. 2014-01-05 16:41:56 +01:00
Tim Walker
e92123093d mlpdec: set AV_FRAME_DATA_MATRIXENCODING side data. 2014-01-05 16:41:56 +01:00
Tim Walker
4b7f1a7ced mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream. 2014-01-05 16:41:56 +01:00
Tim Walker
30d70e79a6 dcadec: set AV_FRAME_DATA_MATRIXENCODING side data. 2014-01-05 16:41:56 +01:00
Tim Walker
6bfdb2de88 dcadec: set the output channel mode more accurately.
When downmixing 2.1 to 2-channel, if the 2.0 portion is Lt/Rt, sum-difference or dual mono, the actual output will be the same (with the LFE either mixed-in or discarded).

Also, when downmixing an arbitrary layout to 2-channel, if the bitstream contains custom downmix coefficients targeting Lt/Rt, then the output will be Lt/Rt rather than regular Stereo.
2014-01-05 16:41:56 +01:00
Tim Walker
5b4797a21d avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.
Includes a libavcodec utility function to update a frame's side data.
2014-01-05 16:41:56 +01:00
Michael Niedermayer
fd53f9d985 Merge commit '7f29644108c5fbd80f160930b31b78b8704c1a49'
* commit '7f29644108c5fbd80f160930b31b78b8704c1a49':
  aac: Fix low delay windowing.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 02:18:57 +01:00
Michael Niedermayer
4195ae0fd8 Merge commit 'b2212dec0f011893ec68eecaa990170fa24050d7'
* commit 'b2212dec0f011893ec68eecaa990170fa24050d7':
  aac: Fix TNS decoding for the 512 sample window family.

also temporarily disable fate-aac-er_ad6000np_44_ep0 as this commit
causes a mismatch with the reference pcm file
The test will be reenabled after all fixes and with a new pcm reference

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 02:02:02 +01:00
Alex Converse
7f29644108 aac: Fix low delay windowing.
AAC LD uses a low overlap sine window instead of a KBD window.
2014-01-04 14:42:38 -08:00
Alex Converse
b2212dec0f aac: Fix TNS decoding for the 512 sample window family. 2014-01-04 14:42:38 -08:00
Michael Niedermayer
d8e65e9224 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  arm: Use the matching endfunc macro instead of the assembler directive directly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 13:19:54 +01:00
Michael Niedermayer
63ce041a7d Merge commit '2ad4ee345a4216aef3999f57dd14c56128d27a13'
* commit '2ad4ee345a4216aef3999f57dd14c56128d27a13':
  arm: Add a missing endfunc macro call

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 13:13:39 +01:00
Martin Storsjö
3348e3492d arm: Use the matching endfunc macro instead of the assembler directive directly
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-04 13:53:08 +02:00
Martin Storsjö
2ad4ee345a arm: Add a missing endfunc macro call
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-04 13:53:02 +02:00
Michael Niedermayer
be524ffc16 avcodec/rv30: put the rpr check back in init with the max vs bits bug fixed
Its usefull to know immediatly if extradata is wrong and not just when later
the decoder tries to use it.

This check was removed by: a6a2282c25
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 04:33:01 +01:00
Michael Niedermayer
d08c6e1101 avcodec/rv30: check rpr before use against maximum
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 04:17:15 +01:00
Michael Niedermayer
a881b9aa08 avcodec/rv30: cleanup rpr handling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 04:16:46 +01:00
Michael Niedermayer
958e311974 avcodec/rv10: cleanup rpr handling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 04:15:22 +01:00
Michael Niedermayer
adc09a353c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: remove disabled bfin asm

Conflicts:
	libavcodec/bfin/mpegvideo_bfin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 03:13:54 +01:00
Michael Niedermayer
9b9f64fe31 Merge commit 'a4d0c6e0503562d4cc8f9f6d02d84d7b32583b15'
* commit 'a4d0c6e0503562d4cc8f9f6d02d84d7b32583b15':
  mpegvideo: move dct_unquantize functions up to avoid forward declarations

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 03:03:02 +01:00
Michael Niedermayer
fb17f03dad Merge commit 'aec25b1c4650944d32706bfd40eb02bbd5587303'
* commit 'aec25b1c4650944d32706bfd40eb02bbd5587303':
  mpegvideo: split the encoding-only parts of frame_start() into a separate function

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 02:56:29 +01:00
Michael Niedermayer
8e6af036b9 Merge commit '58312b2472d3a44d7458865c459d59ef2e02bf1a'
* commit '58312b2472d3a44d7458865c459d59ef2e02bf1a':
  h264: reset data_partitioning if decoding the slice header for NAL_DPA fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 02:06:21 +01:00
Michael Niedermayer
508229adb9 Merge commit 'e89aa4bf56e5b5c45f569eb12733519789e057da'
* commit 'e89aa4bf56e5b5c45f569eb12733519789e057da':
  lzw: switch to bytestream2

Conflicts:
	libavcodec/lzw.c

See: 44c4170c52
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 02:00:07 +01:00
Michael Niedermayer
405b1ef898 Merge commit '24057c83207d6ea8bfd824155ac37be8a33dfd0c'
* commit '24057c83207d6ea8bfd824155ac37be8a33dfd0c':
  eacmv: check the framerate before setting it.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 01:07:05 +01:00
Michael Niedermayer
c13e73c25b Merge commit '5569146d48f06564e8fa393424782cceed510916'
* commit '5569146d48f06564e8fa393424782cceed510916':
  adx: check that the offset is not negative

See: 30bce34b67
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 01:00:19 +01:00
Michael Niedermayer
3cf1503beb Merge commit 'a6a2282c25abe43e352010a7c3fbc92994c0bc1c'
* commit 'a6a2282c25abe43e352010a7c3fbc92994c0bc1c':
  rv30: fix extradata size check.

Conflicts:
	libavcodec/rv30.c

See: 09c5f990bc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 00:39:51 +01:00
Michael Niedermayer
532b93b516 Merge commit 'feded990e3ef9af4a0b827d5b6d8fe86f0b94942'
* commit 'feded990e3ef9af4a0b827d5b6d8fe86f0b94942':
  mpegvideo: set reference/pict_type on generated reference frames

Conflicts:
	libavcodec/mpegvideo.c

The picture type is left at P type as it was explicitly set before

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 00:16:58 +01:00
Michael Niedermayer
950fb8acb4 avcodec/mpegvideo: fix ac/dc_val and coded_block table sizes
With interlaced vc1 it was possible that accesses could happen outside these
tables before this.

Regression since 017e234c20
Reproduced with a sample from Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Fixes (again) : 480i30__codec_WVC1__mode_2__framerate_29.970__type_2__preproc_17.SIGFPE.bfa.390.wmv
No releases are affected by this

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-03 20:35:55 +01:00
Anton Khirnov
a3a55645f0 mpegvideo: remove disabled bfin asm
It has been disabled as 'broken' over 3 years ago in b716a792
2014-01-03 16:54:24 +01:00
Anton Khirnov
a4d0c6e050 mpegvideo: move dct_unquantize functions up to avoid forward declarations 2014-01-03 16:54:00 +01:00
Anton Khirnov
aec25b1c46 mpegvideo: split the encoding-only parts of frame_start() into a separate function
This introduces some code duplication. However, much of it should go
away once the decoders stop using MpegEncContext.
2014-01-03 16:52:49 +01:00
Anton Khirnov
58312b2472 h264: reset data_partitioning if decoding the slice header for NAL_DPA fails
If it was set before then we can end up trying to decode a slice without
a valid slice header, which can lead to invalid memory access.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:42:02 +01:00
Anton Khirnov
e89aa4bf56 lzw: switch to bytestream2
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:40:43 +01:00
Anton Khirnov
24057c8320 eacmv: check the framerate before setting it.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:39:09 +01:00
Anton Khirnov
5569146d48 adx: check that the offset is not negative
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:38:36 +01:00
Anton Khirnov
a6a2282c25 rv30: fix extradata size check.
It has been checking the number of bits in the offset instead of the
actual offset.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:38:33 +01:00
Anton Khirnov
feded990e3 mpegvideo: set reference/pict_type on generated reference frames
Otherwise the generic code will unref them, which can then result in
last_picture_ptr == current_picture_ptr, which causes deadlocks at least
in rv40.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:36:43 +01:00