Commit Graph

19793 Commits

Author SHA1 Message Date
Martin Storsjö
58a840e215 Replace a few leftover instances of enum PixelFormat with enum AVPixelFormat
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-17 23:53:33 +02:00
Vittorio Giovara
cdce9e8025 aacsbr: Fix type for index variable
Prevents unsigned overflow and variable truncation.

Bug-Id: CID 603186
2015-03-17 13:34:23 +00:00
Vittorio Giovara
7c60c124c8 hqx: Drop unused offsets table
This is a leftover from the static to dynamic vlc table conversion.
2015-03-17 13:34:23 +00:00
Carl Eugen Hoyos
c0f504e947 libx264: Allow full-range yuv422 and yuv444 pixel formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-17 13:34:22 +00:00
Niels Möller
c9ed48e80e dca: Read params->pancABIT0[param_index] only if part0 is set
Prevent a spurious read from uninitialized memory.
2015-03-17 12:31:07 +01:00
Luca Barbato
48aef27f52 x86: Put COPY3_IF_LT under HAVE_6REGS
It uses 6 registers, unbreaks building on hardened x86 system.

Bug-Id: gentoo/541930
CC: libav-stable@libav.org
2015-03-17 12:31:04 +01:00
Niels Möller
217e4ff4d1 dca: Support for XLL (lossless extension)
Cleanup and integration by Diego Biurrun.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-03-15 14:51:36 +01:00
Diego Biurrun
4da5aacc7e dca: Mark syncword constants unsigned; they do not fit in 32-bit signed int 2015-03-13 21:20:37 +01:00
Vittorio Giovara
247e370e2a TDSC decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-13 19:48:14 +00:00
Vittorio Giovara
5a0e953c24 mjpeg: Mark decoder family as thread safe
No global variables are used and the VLC tables are allocated without
static elements. This will allow using a JPEG decoding context within
other decoders.
2015-03-13 19:48:07 +00:00
Vittorio Giovara
117b432748 lavc: Introduce AVCodec internal capabilities
This field is designed for marking codec properties useful to lavc internals.
Two internal capabilities are added:
 - FF_CODEC_CAP_INIT_THREADSAFE: codec can be opened without locks;
 - FF_CODEC_CAP_INIT_CLEANUP: codec frees memory if initialization fails.
2015-03-13 19:47:47 +00:00
Vittorio Giovara
9993a067f6 lavc: Improve thread locking error message 2015-03-13 19:47:34 +00:00
Himangi Saraogi
913aa9a487 libx264: Return more meaningful error codes
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-12 19:09:22 +01:00
Vittorio Giovara
17c45d4d05 libtheora: Check frame allocation 2015-03-12 15:29:59 +00:00
Vittorio Giovara
a72d93daa0 mpegvideo_enc: Check AVCodecContext allocation 2015-03-12 15:29:59 +00:00
Niels Möller
78c8922841 dca: Document the permuted order in the lfe_fir_64 and lfe_fir_128 tables 2015-03-12 13:28:42 +01:00
Andreas Cadhalpun
67142a8c72 roqvideoenc: set enc->avctx in roq_encode_init
So far it is only set in roq_encode_frame, but it is used in
roq_encode_end to free the coded_frame. This currently segfaults if
roq_encode_frame is not called between roq_encode_init and
roq_encode_end.

CC:libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 20:28:13 +01:00
Yukinori Yamazoe
212556cd21 qsv: Improve the log message of when initializing MFX_IMPL_HARDWARE{2, 3, 4}
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 19:48:01 +01:00
Hendrik Leppkes
dc2d0e06af mlpdec: support TrueHD streams with an Atmos substream
The fourth substream is being discarded, since its not raw audio data,
but an encoded Atmos stream which needs a specialized decoder.

Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 16:06:40 +01:00
Hendrik Leppkes
f36f6a608b mlpdec: support major sync headers with optional extension blocks
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 16:03:13 +01:00
Vittorio Giovara
93f7948136 libvpx: Fix mixed use of av_malloc() and av_reallocp()
This buffer is resized when vpx_codec_get_cx_data() returns a
VPX_CODEC_STATS_PKT packet.

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-09 12:58:18 +00:00
Michael Niedermayer
0ce3a0f9d9 utvideodec: Handle slice_height being zero
Fixes out of array accesses.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-9604
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-09 00:51:15 +01:00
Anton Khirnov
ae5e1f3d66 tiff: Check that there is no aliasing in pixel format selection
Fixes possible issues with unexpected bpp/bppcount values.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-8544
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-08 19:14:14 +01:00
Luca Barbato
0025f7408a vorbis: Check the vlc value in setup_classifs
The valid returned values are always at most 11bit.
Remove the previous check that assumed larger values plausible and
use a signed integer to check get_vlc2 return values.

CC: libav-stable@libav.org
2015-03-08 14:33:03 +01:00
Luca Barbato
62de77ffca vorbis: Use a local codebook variable
Makes the code a little simpler.
2015-03-08 14:33:02 +01:00
Martin Storsjö
25c29d3283 libopenh264enc: Add support for building with OpenH264 1.4
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-06 10:02:47 +02:00
Anton Khirnov
ad786dd450 h264: remove a now redundant error check
It was only relevant when data partitioning was in use.
2015-03-05 16:10:11 +01:00
Andreas Cadhalpun
4f2ee9daee webp: validate the distance prefix code
According to the WebP Lossless Bitstream Specification the highest
allowed value for a prefix code is 39.

If prefix_code is too large, the calculated extra_bits has an invalid
value and triggers an assertion in get_bits.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-05 14:49:16 +01:00
Andreas Cadhalpun
66624ed631 rv10: check size of s->mb_width * s->mb_height
If it doesn't fit into 12 bits it triggers an assertion.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-05 14:49:16 +01:00
Himangi Saraogi
f3b74d944b pcxenc: Return more meaningful error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-03-04 23:44:01 +01:00
Vittorio Giovara
87e85a133f aac: Relax reserved_bit validation
Although the specification mandates this bit to zero, it may happen
that software tools incorrectly flip it to one, invalidating a possibly
valid stream.

Relax this restriction, by failing only when AV_EF_BITSTREAM is set.
This behaviour is similar to aac decoders in Firefox and Quicktime.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-04 16:36:16 +00:00
Diego Biurrun
25f613f8be dca: Move syncword definitions to a separate header 2015-03-04 13:29:33 +01:00
Anton Khirnov
db5cc75f8b wma.h: #include "avcodec.h"
It's required for at least AVCodecContext.

Fixes make checkheaders.
2015-03-03 20:57:56 +01:00
Vittorio Giovara
e878ec0d47 aic: Fix decoding files with odd dimensions
Normally the aic decoder finds the proper slice combination (multiple of
some number less than 32) but in case of odd width, it resorts to the
default values, which were actually swapped.
The number of slices is modified to account for such odd width cases.

CC: libav-stable@libav.org
2015-03-03 15:08:15 +00:00
Luca Barbato
dbc1163b20 prores: Extend the padding check to 16bit
Some files produced by the official encoder have up to 16bit of
padding instead of the expected padding to the byte.

Use a self-explanatory macro instead of a simple number.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-02 11:27:57 +01:00
Andreas Cadhalpun
ea1d0b7ece avcodec/utils: use correct printf specifier in ff_set_sar
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-28 21:51:24 +01:00
Anton Khirnov
71f1ad37d8 lavc: do not compile fmtconvert unconditionally
Only ac3dec and dcadec use it.
2015-02-28 21:51:24 +01:00
Anton Khirnov
d74a8cb7e4 fmtconvert: drop unused functions 2015-02-28 21:51:24 +01:00
Anton Khirnov
ee964145b5 lavc: remove unused traces of fmtconvert usage
Those decoders have been switched to float output and so do not use
fmtconvert anymore.
2015-02-28 21:51:24 +01:00
Diego Biurrun
cb4cb7b0ea qsv: Skip qsv.h compilation if qsv is not enabled 2015-02-23 16:26:32 +01:00
Federico Tomassetti
061c489895 eamad: check for out of bounds read
Bug-Id: CID 1257500
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-23 15:06:18 +01:00
Federico Tomassetti
161442ff2c mdec: check for out of bounds read
Bug-Id: CID 1257501
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-23 15:06:18 +01:00
Vittorio Giovara
35c6ce76b1 Canopus HQX decoder
Based on work by Kostya Shishkov <kostya.shishkov@gmail.com>.
2015-02-22 22:42:27 +00:00
Carl Eugen Hoyos
36a6fb989b hevc_deblock: Fix compilation with nasm
CC: libav-stable@libav.org
Bug-Id: 795
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-22 22:34:20 +00:00
Vittorio Giovara
e570f895cd libschroedinger: Check memory allocations 2015-02-22 22:32:18 +00:00
Gilles Chanteperdrix
5cbae5651d mpegaudio_parser: add MP3 ADU headers parser
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:42 +02:00
Anton Khirnov
a06b0b1295 h264: initialize H264Context.avctx in init_thread_copy
This prevents using a wrong (first thread's) AVCodecContext if decoding
a frame in the first pass over all threads fails.
2015-02-21 09:29:48 +01:00
Anton Khirnov
0dea4c77cc h264: only ref cur_pic in update_thread_context if it is initialized
It may be empty if the previous thread's decode call did not contain a
valid frame.
2015-02-21 09:29:27 +01:00
Peter Meerwald
9abc80f1ed libavcodec: Make use of av_clip functions
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-21 00:54:40 +01:00
Peter Meerwald
b8d18a9437 libavcodec: Don't use av_cold annotation in twinvq header file
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:32:37 +02:00