1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

19849 Commits

Author SHA1 Message Date
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
Oleksij Rempel
c56b9b1eb2 lavc: Add DSS SP decoder
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-19 12:05:19 -05:00
Anton Khirnov
0fbb271318 qsv_api: fix building with libmfx disabled 2015-02-19 17:35:34 +01:00
Anton Khirnov
4e08c82110 lavc: add an Intel libmfx-based H.264 decoder
Based on the code by Luca Barbato <lu_zero@gentoo.org> and Yukinori
Yamazoe <drocon11@gmail.com>.
2015-02-19 15:08:49 +01:00
Anton Khirnov
31d2039cb4 h264_parser: export video format and dimensions 2015-02-19 15:07:52 +01:00
Himangi Saraogi
0f532fd3f9 rv40: Return more meaningful error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-02-19 08:39:29 +01:00
Derek Buitenhuis
d617e77cec libx265: Add crf private option
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-02-18 10:18:12 -05:00
Derek Buitenhuis
2de887e45b libx265: Reduce the scope of some variables
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-02-18 10:16:50 -05:00
Himangi Saraogi
42c8f92e2f wmv2: Return meaningful error codes 2015-02-17 12:18:20 -05:00
Himangi Saraogi
f3e045263e qdm2: Return meaningful error codes 2015-02-17 12:18:20 -05:00
Himangi Saraogi
a1e2c47cd4 libxvid: Return meaningful error messages 2015-02-17 12:18:20 -05:00
Himangi Saraogi
18f4fa251b aac_adtstoasc_bsf: Check extradata memory allocation
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-17 12:18:10 -05:00
Vittorio Giovara
fe0f4e5657 avpacket: Check buffer reference
CC: libav-stable@libav.org
Bug-Id: CID 1267889
2015-02-17 12:16:43 -05:00
Vittorio Giovara
31dc73e92a vorbisdec: Check memory allocations 2015-02-17 12:16:43 -05:00
Vittorio Giovara
ec17782e17 dvdsubdec: Check memory allocations 2015-02-17 12:16:43 -05:00
Vittorio Giovara
d89e58f539 dct-test: Fix initialization syntax
Related to "warning: suggest braces around initialization of subobject".
2015-02-17 11:27:42 -05:00
Vittorio Giovara
cb70a93ca1 lavc: Document interaction between avcodec_open2() and decoding routines 2015-02-17 11:27:42 -05:00
Diego Biurrun
f8c1719771 dca: Remove separate header for DCA ExSS
There is no point in having a separate header for a single declaration.
2015-02-16 10:44:56 +01:00
Diego Biurrun
3a651f599a dca: Move data tables from a header to an object file
This allows sharing them with the DCA XLL extension w/o duplication.
2015-02-15 13:34:04 -08:00
Diego Biurrun
65df9904ce dca: Add array sizes to array declarations 2015-02-15 13:34:04 -08:00
Peter Meerwald
702458538d g722: Add ARM NEON implementation for g722_apply_qmf()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-15 22:47:21 +02:00
Peter Meerwald
73ae0a9d12 g722: Split out computation of band->s_zero and unroll code
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-15 22:47:19 +02:00
Peter Meerwald
b16057b5fe g722: Unroll g722_apply_qmf()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-15 22:47:16 +02:00
Peter Meerwald
10f160768b g722: Reduce number of pointers passed to g722_apply_qmf() function
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-15 22:47:14 +02:00
Peter Meerwald
6769068313 g722: Split out g722_qmf_apply() function into g722dsp.c
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-15 22:47:10 +02:00
Diego Biurrun
ecbcebde34 vdpau: Adjust necessary #includes for vdpau_internal.h 2015-02-14 10:56:01 -08:00
Diego Biurrun
2a9c6fae92 dca: Move all tables into dcadata.h 2015-02-14 10:13:49 -08:00
Diego Biurrun
8a213179af dca: Remove trace debugging code 2015-02-14 10:13:49 -08:00
Diego Biurrun
a96f51f29a dca: Return more informative error codes 2015-02-14 10:13:49 -08:00
Diego Biurrun
b339019de4 dca: Split code for handling the EXSS extension off into a separate file 2015-02-14 10:13:49 -08:00
Diego Biurrun
7f9f771eac avcodec: Don't anonymously typedef structs 2015-02-14 10:13:49 -08:00
Himangi Saraogi
7769be590c vp56: Return meaningful error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-02-14 09:24:13 -08:00
Peter Meerwald
eea769df32 hevc: Use generic av_clip function, not C implementation
hevc seems to be the only place where the C implementation
of the av_clip function is explicitly selected, precluding
platform-specific optimizations

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-13 08:37:13 +01:00
Hendrik Leppkes
8029af586f dxva2_hevc: properly fill the scaling list structure
The scaling list can be specified in either the SPS or PPS.
Additionally, compensate for the diagonal scan permutation applied
in the decoder.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-07 14:33:29 +01:00
Reimar Döffinger
8c1ce7787a aacsbr: silence message for SBR extension "padding".
Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2015-02-03 20:32:16 -08:00
Alex Converse
d615187f74 aacdec: Support for ER AAC ELD 480.
Based in part on work from Niel van der Westhuizen <espes@pequalsnp.com>.
2015-02-03 20:32:16 -08:00
Niel van der Westhuizen
7640c4a371 aacdec: Tables for length 480 AAC ELD. 2015-02-03 20:32:16 -08:00
Niel van der Westhuizen
0ee2573347 aacdec: Support for ER AAC in LATM 2015-02-03 20:32:16 -08:00
Alex Converse
edd9ea3ffb aacdec: Refactor aac_er_decode_frame. 2015-02-03 20:32:15 -08:00
Alex Converse
82bd8a5769 aacdec: Refactor decode_ics_info. 2015-02-03 20:32:15 -08:00
Luca Barbato
9b8c8a9395 svq1dec: Validate the stages value strictly
It can be less than -1.

Bug-Id: CID 1194397 / CID 1194398
CC: libav-stable@libav.org
2015-02-03 15:23:21 +00:00
Michael Niedermayer
6f7a32839d svq1enc: correctly handle memory error and allocations
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-03 15:23:21 +00:00
Diego Biurrun
3d5d46233c opus: Factor out imdct15 into a standalone component
It will be reused by the AAC decoder.
2015-02-02 16:07:33 +01:00
Martin Storsjö
28df0151b6 configure: Add a dependency on vc1_decoder from vc1_parser
This fixes builds with vc1_parser enabled without vc1_decoder. All
the vc1_decoder object files were included in the vc1_parser line
in libavcodec/Makefile before, but architecture specific object files
for vc1_decoder were not.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-02 15:30:54 +02:00
Vittorio Giovara
70d246d5cc flacenc: initialize sums matrix
CC: libav-stable@libav.org
Bug-Id: CID 703821
2015-01-29 17:33:38 +00:00
Vittorio Giovara
c01ccccbb1 ituh263dec: use macro instead of #if 2015-01-29 17:33:34 +00:00
Vittorio Giovara
302ca6b20e mpegvideo_enc: initialize the encoding context
This prevents several uninitialized variable uses that take
place towards the end of encoding.

CC: libav-stable@libav.org
Bug-Id: CID 700760
2015-01-29 15:26:33 +00:00
Vittorio Giovara
1a07df3112 DNxHD: Add support for id 1258 (DNx100 960x720@8)
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-29 15:04:57 +00:00
Vittorio Giovara
598f7d046c DNxHD: Simplify pixel format detection
Error out in case of unknown values.
2015-01-29 15:04:46 +00:00
Vittorio Giovara
41e03e284e DNxHD: More verbose error messages 2015-01-29 15:04:35 +00:00
Martin Storsjö
6996fd204a libopenh264: Log debug messages to a non-null context
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-29 09:16:35 +02:00
Michael Niedermayer
61928b68dc h264: Do not share rbsp_buffer across threads
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2015-01-28 16:28:58 +01:00
Vittorio Giovara
607ad990d3 dvbsubdec: check memory allocations and propagate errors 2015-01-27 15:26:37 +00:00
Anton Khirnov
a536a4e4bc lavc: support extracting audio service type from side data 2015-01-27 09:22:33 +01:00
Anton Khirnov
728685f37a Add a side data type for audio service type.
Currently, audio service type is a field in AVCodecContext. However,
side data is more appropriate for this kind of information.
2015-01-27 09:17:48 +01:00
Anton Khirnov
e44b58924f lavc: deprecate unused AVCodecContext.stream_codec_tag 2015-01-27 09:14:39 +01:00
Anton Khirnov
f771b3ab5d avidec: do not export stream_codec_tag
Handle its only existing use case internally.
2015-01-27 09:13:45 +01:00
Anton Khirnov
167e004e1a h264: drop any pretense of support for data partitioning
It does not work correctly and apparently never did. There is no
indication that this (mis)feature is ever used in the wild or even that
any software other than the reference supports it.

Since the code that attempts to support it adds some nontrivial
complexity and has resulted in several bugs in the past, it is better to
just drop it.
2015-01-27 09:10:12 +01:00
Anton Khirnov
58ae8d5957 h264_parser: restore a comment lost in 0268a54 2015-01-27 09:09:56 +01:00
Anton Khirnov
ecab21ac47 h264: do not reset the ref lists in flush_change()
They are always constructed anew when needed, so there is no need to
reset them explicitly.
2015-01-27 09:09:29 +01:00
Anton Khirnov
9404a47a2d h264: move parser-only variables to their own context 2015-01-27 09:08:31 +01:00
Anton Khirnov
cf1e0786ed error_resilience: move the MECmpContext initialization into ER code
Currently, it needs to be initialized by the ER caller (which is
currently either a mpegvideo decoder or h264dec). However, since none of
those decoders use MECmpContext for anything except ER, it makes more
sense to handle it purely inside ER.
2015-01-27 09:07:59 +01:00
Hendrik Leppkes
7e850fa67e Add DXVA2 HEVC HWAccel
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:05:31 +01:00
Hendrik Leppkes
b82722df9b hevc: reindent after previous commit
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:05:25 +01:00
Hendrik Leppkes
e72e8c5a1d hevc: add hwaccel hooks
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:05:08 +01:00
Hendrik Leppkes
4b95e95dba hevc: store the short term rps flag and size in the context
For future use by hardware accelerators.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:04:59 +01:00
Hendrik Leppkes
36779a8405 hevc: store the escaped/raw bitstream in HEVCNAL
Hardware Accelerators require access to the escaped bitstream.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:04:44 +01:00
Hendrik Leppkes
b0593a4bca hevc: pass the full HEVCNAL struct to decode_nal_unit
This enables decode_nal_unit to access additional fields added in
subsequent commits.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:04:29 +01:00
Anton Khirnov
443b71928b hevc: unref the current frame if frame_start() fails
Prevents DPB from filling up with damaged input.
2015-01-27 08:34:56 +01:00
Anton Khirnov
1dd021929f hevc: clear unused refs on failure 2015-01-27 08:34:46 +01:00
Anton Khirnov
f9f883af4f h264: simplify code in flush_dpb()
There is no point in clearing reference explicitly, since that will be
done as a part of ff_h264_unref_picture() right below.
2015-01-27 08:34:24 +01:00
Michael Niedermayer
2a06c2a03e mpegvideo_enc: Draw edges on input for non-multiple of 16 resolutions
This improves motion estimation and avoids using uninitialized data
for resolutions that aren't a multiple of 16.

Prior to d2a25c40, the edges used to be initialized so that encoding
was deterministic, but after that commit it started using uninitialized
data (for non multiple of 16 resolutions).

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-23 15:05:49 +02:00
Derek Buitenhuis
6341ab0ad3 libx265: Pass through user-set frame type
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-01-22 16:29:30 +00:00
Martin Storsjö
440119b188 libopenh264enc: Move a declaration of a variable into an ifdef
This avoids needing an attribute for silencing warnings about
it being unused.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-20 15:02:50 +01:00
Martin Storsjö
bba0247926 libopenh264enc: Remove a workaround for silencing warnings about unused variables in the OpenH264 header
The 1.3 release branch of OpenH264 (as well as the master branch)
have been updated so that GCC no longer warns about this variable
as being unused.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-20 15:02:38 +01:00
Michael Niedermayer
def69553e7 h264_cabac: Break infinite loops
This fixes out of array reads and/or infinite loops.

30 is the maximum number of bits that can be read into
coeff_abs below.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-15 10:17:01 +02:00
Vittorio Giovara
402fb5550e opus_parser: drop unused variable 2015-01-15 01:25:16 +01:00
Vittorio Giovara
8a9641a652 bsf: check memory allocations 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
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
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
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
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
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
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
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
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
Vittorio Giovara
210461c0a8 imgconvert: check memory allocations and propagate errors 2014-12-18 23:27:14 +01:00
Vittorio Giovara
596b5c488f wma: check memory allocations and propagate errors 2014-12-18 23:27:14 +01:00
Vittorio Giovara
5ac06633cb takdec: check av_samples_get_buffer_size() return value
CC: libav-stable@libav.org
Bug-Id: CID 747734
2014-12-18 23:27:14 +01:00
Vittorio Giovara
16c7a8a142 aacps: invert the order of parameters of ipdopd_reset()
This is the order that the caller uses in the rest of the file. The
same operation is applied to both parameters, so this change is only
done for consistency, it doesn't change the actual behaviour.

Bug-Id: CID 732285 / CID 732286
2014-12-18 23:27:14 +01:00
Vittorio Giovara
9745f19ffc assdec: check the right variable
CC: libav-stable@libav.org
Bug-Id: CID 1257815
2014-12-18 23:27:14 +01:00
Vittorio Giovara
971099ff5a aacenc: correctly check returned value
CC: libav-stable@libav.org
2014-12-18 23:27:14 +01:00
Vittorio Giovara
ac467d94fa lcl: return an appropriate error code 2014-12-18 23:27:14 +01:00
Vittorio Giovara
c63dd3f0a4 a64multi: check elbg return values 2014-12-18 23:22:59 +01:00
Vittorio Giovara
3beb9cbad3 roqvideo: check memory allocations and propagate errors 2014-12-18 23:22:59 +01:00
Vittorio Giovara
ae2d41ec87 elbg: check memory allocations and propagate errors 2014-12-18 23:22:59 +01:00
Vittorio Giovara
67fc8a15e4 theora: support different visible and coded frame size
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-18 23:22:59 +01:00
Paul B Mahol
87bd298abe DPX parser
Additional improvements and fixes by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-18 23:22:59 +01:00
Carl Eugen Hoyos
3a3790b8f8 tiff: support encoding and decoding 64bit images 2014-12-18 23:22:59 +01:00
Michael Niedermayer
3bb465245f h261dec: Fix context initialization sequence
ff_mpv_common_init sets s->context_initialized.

This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 23:10:24 +02:00
Martin Storsjö
91bfac759d h261enc: Disallow sliced encoding
This avoids trying to do sliced encoding, even if a slice/packet
size is requested (via the -ps option or the rtp_payload_size
field), since the encoder currently doesn't support it (or at least
our decoder can't decode it, even if the h261_encode_gob_header
function is hooked up to be called from the slicing part in
mpegvideo_enc.c).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 12:00:01 +02:00
Vittorio Giovara
10d4c5e55e tiff: set the correct return value when check_size() fails
Only one instance affected and solved as other occurences.
2014-12-15 15:46:34 +01:00
Luca Barbato
3c27275c13 tiff: Check the check_size() return value and forward it
Also use the same type for add_entry and check_size.

Bug-Id: CID 700699
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovarao@gmail.com>
2014-12-15 15:46:34 +01:00
Luca Barbato
4690e01c3a prores: Evaluate all the quantizers
Prevent an uninitialized data access.

CC: libav-stable@libav.org
Bug-Id: CID 703824 / CID 703825
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-12-15 15:46:34 +01:00
Vittorio Giovara
d75190aa93 mpegvideo: move REBASE_PICTURE where it is used
Drop an unused #undef from h264 decoder.
2014-12-15 15:46:34 +01:00
Vittorio Giovara
63fcedcf01 mpegvideo: remove unused function declaration 2014-12-15 15:46:34 +01:00
Vittorio Giovara
b2bece5e9a hevc: always clip luma_log2_weight_denom
Its value shall be between 0 and 7 according to the specifications.

CC: libav-stable@libav.org
Bug-Id: CID 1257502
2014-12-15 15:46:34 +01:00
Thiago Santos
bab8d73765 vaapi: wrap codec specific functions in appropiate #ifs
Fix linking when only a subset of vaapi decoders is enabled.

Bug-Id: 760
CC: libav-stable@libav.org

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-12-14 22:04:38 +01:00
Michael Niedermayer
5a82ad644f svq1dec: Unbreak the scratch buffer allocation
The input packets are always assumed to be padded and
the av_fast_ family of function takes a pointer to a pointer.

Thanks to Nicolas Dufresne <nicolas.dufresne@collabora.com> for
a similar patch.

Introduced in 7b588bb691.

Bug-Id: 766
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-12-14 22:03:58 +01:00
Luca Barbato
bcbdeb318e asvenc: Forward the error instead of asserting on it
Bug-Id: CID 732997
CC: libav-stable@libav.org
2014-12-14 22:03:22 +01:00
Rémi Denis-Courmont
559fa0d41b vdpau: add mapping for H.264 Constrained Baseline profile and fallback
Old VDPAU drivers do not support this newly defined profile, so falling
back to Main profile is necessary for backward binary compatibility.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:30:03 +01:00
Rémi Denis-Courmont
8502c1e9ff vdpau: add mapping for H.264 Extended profile
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:29:27 +01:00
Rémi Denis-Courmont
8b51bcfed7 vdpau: revector macro to reduce line span
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:29:07 +01:00
Martin Storsjö
c7921a4804 libfdk-aacdec: Fix a boundary check
This avoids potential out of bounds writes, with potential future
versions of the library.

Bug-Id: CID 1254945
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-10 22:51:42 +02:00
Janne Grunau
4c81613df4 arm: mlpdsp: handle pic offset calculation in a macro
Makes the code easier to read since it hides different offset
calculations for arm and thumb mode.
2014-12-09 22:00:08 +01:00
Janne Grunau
581c7f0e12 arm: make ff_mlp_filter_channel_arm and ff_mlp_rematrix_channel_arm position independent
No significant difference in used cpu cycles on a cortex-a9.
2014-12-09 22:00:08 +01:00
Martin Storsjö
780cd20b00 aarch64: Use .data.rel.ro for const data with relocations
This reverts commit c00365b46d
in addition to using a different section.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-09 11:43:31 +02:00
Martin Storsjö
f963f80399 arm: Use .data.rel.ro for const data with relocations
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-09 11:43:25 +02:00
Vittorio Giovara
6fd91fa119 h264: increase MAX_SLICES to 32
H264 streams from CounterPath Bria and some Cisco phones need an
increased pool for correct decoding.

Bug-Id: 645
Sample-Id: bria-h264.mka
2014-12-08 13:30:38 +00:00
Zoltan Kovacs
4843a9c74f dpx: always write the image offset
According to the DPX file format description found at
http://www.fileformat.info/format/dpx/egff.htm the ImageElement part of
the GenericImageHeader also contains an an offset to the real image data
beside the same member that can be found in the GenericFileHeader.

Libav keeps this member empty (=0) while some applications expects it to
be filled properly. FATE test updated accordingly.

Bug-Id: 742
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-08 13:29:18 +00:00
Martin Storsjö
b280c6202b arm: fft_vfp: Unify the behaviour in ff_fft_calc_vfp between arm/thumb
Don't include the function pointer table in the code segment
in arm mode.

This shouldn't have any significant performance effect. It does
end up as a few more instructions than before, for ARM, but
only at the entry to this function, not within the fft functions
themselves.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-08 12:29:53 +02:00
Martin Storsjö
ae81576414 arm: fft_vfp: Add a missing "endconst" when building in thumb mode
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-08 12:29:49 +02:00
Kieran Kunhya
9a738c27dc v210enc: Add SIMD optimised 8-bit and 10-bit encoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-05 13:03:49 +00:00
Vittorio Giovara
b72727a524 lavc: mention that the parser callback never returns an error 2014-12-05 00:44:42 +00:00