Commit Graph

18280 Commits

Author SHA1 Message Date
Luca Barbato
818d1f1a3e ac3: Clean up the error paths 2013-08-27 16:19:12 +02:00
Luca Barbato
6258d362b8 ac3: Do not clash with normal AVERROR
The parsing function return AVERROR and AAC_AC3_PARSE_ERROR values,
make sure they are not misunderstood.
2013-08-27 16:19:12 +02:00
Kostya Shishkov
4eb4bb3a02 imc: support mode 1 2013-08-26 09:23:45 +02:00
Kostya Shishkov
9e7b62f0fb twinvq: set block align for codecs and use it in size checks
This both allows factoring out size check for both MetaSound and TwinVQ-VQF
decoders and fixes the situation when there are several MetaSound frames
stuffed together (that happens in 8kHz @ 8kbps MetaSound in ASF for example).
2013-08-26 09:23:39 +02:00
Diego Biurrun
ff9d57e7df h264_cabac: Mark functions calling decode_cabac_residual_internal as noinline
This ensures that decode_cabac_residual_internal actually does get inlined,
which it otherwise does not, even though it is marked as always_inline.
2013-08-24 16:14:15 +02:00
Diego Biurrun
f407856968 arm: h264chroma: Do not compile h264_chroma_mc* dependent on h264 decoder
The functions are used by all codecs that enable the h264chroma component
and the file is already compiled conditional on h264chroma being enabled.
2013-08-23 17:21:14 +02:00
Diego Biurrun
84784c297f libfdk-aacdec: formatting cosmetics 2013-08-23 17:11:47 +02:00
Diego Biurrun
8506ff97c9 vp56: Mark VP6-only optimizations as such.
Most of our VP56 optimizations are VP6-only and will stay that way.
So avoid compiling them for VP5-only builds.
2013-08-23 14:42:19 +02:00
Diego Biurrun
e7b31844f6 x86: Split DCT and FFT initialization into separate files 2013-08-21 20:15:27 +02:00
Diego Biurrun
0b45269c2d x86: h264_idct: Remove incorrect comment 2013-08-21 15:09:58 +02:00
Diego Biurrun
e95930eda1 avcodec/utils: Simplify a condition that combines HAVE_NEON and ARCH_ARM 2013-08-21 09:40:39 +02:00
Diego Biurrun
c18838f5eb h264_ps: Use more meaningful error values 2013-08-20 21:24:42 +02:00
Diego Biurrun
330ad1f6a5 h264_ps: K&R formatting cosmetics 2013-08-20 21:23:24 +02:00
Diego Biurrun
8fed466b0a h264_ps: Drop commented-out cruft 2013-08-20 21:09:05 +02:00
Diego Biurrun
c4e43560fe h264data: Move some tables to the only place they are used 2013-08-20 20:49:37 +02:00
Diego Biurrun
f34de1486a h264data: Remove unused luma_dc_field_scan table 2013-08-20 20:49:37 +02:00
Martin Storsjö
4f2b469da5 Add a libfdk-aac decoder
This can be useful for decoding AAC object types that are not supported
by the native AAC decoder, e.g. AAC-LD and AAC-ELD.
2013-08-20 14:27:27 -04:00
Diego Biurrun
2a61592573 avcodec: Remove some commented-out debug cruft 2013-08-20 19:59:50 +02:00
Janne Grunau
c34a96a5dd dxa: fix decoding of first I-frame by separating I/P-frame decoding
5ef7c84 broke decoding for the first keyframe due to an unnecessary
check for a reference frame.

CC: libav-stable@libav.org
2013-08-17 12:55:26 +02:00
Luca Barbato
5ef7c84a93 dxa: Make sure the reference frame exists
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-16 14:56:56 +02:00
Luca Barbato
c59967fa7c h261: check the mtype index
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-16 14:56:49 +02:00
Kostya Shishkov
f399e406af altivec: perform an explicit unaligned load
Implicit vector loads on POWER7 hardware can use the VSX
instruction set instead of classic Altivec/VMX. Let's force
a VMX load in this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-16 10:08:47 +03:00
Diego Biurrun
239f55bf3c vp56data: Move all data tables to the .c file 2013-08-15 14:38:03 +02:00
Diego Biurrun
cb214707a6 vp56data: Move all shared enum/struct declarations to common header 2013-08-15 14:38:03 +02:00
Diego Biurrun
38f64c0330 mpeg12decdata.h: Move all tables to the only place they are used 2013-08-15 14:38:03 +02:00
Diego Biurrun
ec6c1b1d83 mpeg12decdata: Remove unused #define 2013-08-15 14:38:03 +02:00
Diego Biurrun
c591d4575a avcodec: Replace local extern declarations for tables with header #includes 2013-08-15 14:38:03 +02:00
Diego Biurrun
060ce0c697 ivi_common: Make some tables only used within the file static 2013-08-15 14:38:03 +02:00
Janne Grunau
e8c0defe13 8bps: decode 24bit files correctly as rgb32 on bigendian 2013-08-15 11:50:43 +02:00
Luca Barbato
f13fe6020e rtjpeg: Use init_get_bits8
CC:libav-stable@libav.org
2013-08-13 14:04:55 +02:00
Luca Barbato
62cc7a9108 rtjpeg: return meaningful error codes 2013-08-13 14:04:55 +02:00
Luca Barbato
2df0776c22 nuv: Use av_fast_realloc
The decompressed buffer can be used after codec_reinit, so it must be
preserved.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-13 14:04:06 +02:00
Luca Barbato
feaaf5f7f0 nuv: Reset the frame on resize
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-13 13:09:33 +02:00
Luca Barbato
075dbc1855 nuv: Pad the lzo outbuf
And properly update the buf_size with the correct size.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-13 13:09:33 +02:00
Luca Barbato
aae159a7cc nuv: Do not ignore lzo decompression failures
Update the fate reference since the last broken frame is not decoded
anymore.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-13 13:09:22 +02:00
Ian Taylor
46dee21a32 png: allow encoding 16-bit grayscale
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-13 06:05:44 +02:00
Hendrik Leppkes
3ca5df36a5 wmall: use AVFrame API properly
This fixes a bug with non-refcounted callers resulting in invalid memory access.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-11 21:13:56 +02:00
Luca Barbato
5a9a9d4a2a lavc: Add refcounted api to AVPacket
Provide a clean way to manipulate packets.
2013-08-10 13:41:35 +02:00
Vittorio Giovara
c1076d8479 h264: check one context_init() allocation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-10 13:36:38 +02:00
Vittorio Giovara
5eb488bfa8 h264: use explicit variable names for *_field_flag
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-10 13:36:25 +02:00
Vittorio Giovara
b3dc260e7f h264: return meaningful values
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-10 13:28:51 +02:00
Martin Storsjö
e743e7ae6e libavutil: Make avpriv_open a library-internal function on msvcrt
Add one copy of the function into each of the libraries, similarly
to what we do for log2_tab. When using static libs, only one
copy of the file_open.o object file gets included, while when
using shared libraries, each of them get a copy of its own.

This fixes DLL builds with a statically linked C runtime, where
each DLL effectively has got its own instance of the C runtime,
where file descriptors can't be shared across runtimes.

On systems not using msvcrt, the function is not duplicated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 00:53:33 +03:00
Ben Avison
45e10e5c8d arm: Add assembly version of h264_find_start_code_candidate
Before          After
               Mean   StdDev   Mean   StdDev  Change
This function   508.8 23.4      185.4  9.0    +174.4%
Overall        3068.5 31.7     2752.1 29.4     +11.5%

In combination with the preceding patch:
                Before          After
                Mean   StdDev   Mean   StdDev  Change
Overall         2925.6 26.2     2752.1 29.4     +6.3%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 12:08:34 +03:00
Ben Avison
218d6844b3 h264dsp: Factorize code into a new function, h264_find_start_code_candidate
This performs the start code search which was previously part of
h264_find_frame_end() - the most CPU intensive part of the function.

By itself, this results in a performance regression:
              Before          After
              Mean   StdDev   Mean   StdDev  Change
Overall time  2925.6 26.2     3068.5 31.7    -4.7%

but this can more than be made up for by platform-optimised
implementations of the function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 12:08:30 +03:00
Ben Avison
7a82022ee2 h264_parser: Initialize the h264dsp context in the parser as well
Each AVStream struct for an H.264 elementary stream actually has two
copies of the H264DSPContext struct (and in fact all the other members
of H264Context as well):

((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp
((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp

but only the first of these was actually being initialised. This
prevented the addition of platform-specific implementations of
parser-related functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 12:08:28 +03:00
Kostya Shishkov
3e5898782d Voxware MetaSound decoder 2013-08-08 10:52:44 +02:00
Rémi Denis-Courmont
fee9db1fdf libavcodec: use avpriv_open()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-07 21:13:12 +02:00
Vittorio Giovara
22c879057e mpegvideo_enc: drop outdated copy_picture_attributes() in favour of a modern av_frame_copy_props()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-07 20:48:15 +02:00
Kostya Shishkov
f544c58636 deprecate AV_CODEC_ID_VOXWARE and introduce AV_CODEC_ID_METASOUND instead
Voxware is the name of company, it has produced several audio codecs e.g.
MetaVoice family and MetaSound.
2013-08-07 10:56:18 +02:00
Christian Schmidt
1c6d2bb9a9 pcm_bluray: Return AVERROR_INVALIDDATA instead of -1 on header errors
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-06 13:19:29 +02:00
Diego Biurrun
0ba4ea312b avcodec/options: Drop deprecation warning suppression macros
The options table is used in tools built by the host compiler and the
deprecation macros pull in bits that are not safe to use if host and
target compiler differ.
2013-08-06 03:05:03 +02:00
Kostya Shishkov
86f4c59bd6 twinvq: Split VQF-specific part from common TwinVQ decoder core
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-05 20:59:23 +02:00
Diego Biurrun
4d8d16b596 twinvq: Prefix enums and defines shared with VoxWare MetaSound 2013-08-05 20:19:11 +02:00
Kostya Shishkov
bc909626b0 twinvq: move all bitstream reading into single place
This is required for the future addition of VoxWare MetaSound decoder, for its
functions are mostly the same but bitstream reader is completely different
and bitstream format is slightly different too.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-05 19:37:47 +02:00
Ben Avison
a22ae9f0c5 mpegts: Remove one 64-bit integer modulus operation per packet
The common case of the pointer having increased by one packet (which results
in no change to the modulus) can be detected with a 64-bit subtraction,
which is far cheaper than a division on many platforms.

           Before          After
           Mean   StdDev   Mean   StdDev  Change
Divisions   248.3  8.8      51.5   7.4    +381.7%
Overall    2773.2 25.6     2372.5 43.1     +16.9%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-05 19:25:55 +03:00
Luca Barbato
43bacd5b7d vc1: check mb_height validity.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-05 16:24:13 +02:00
Luca Barbato
090cd06311 vc1: check the source buffer in vc1_mc functions
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-05 16:24:13 +02:00
Luca Barbato
9991298f2c bink: Bound check the quantization matrix.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-05 16:24:13 +02:00
Luca Barbato
bc54c2ae3c libx264: add shortcut for the bluray compatibility option
As for intra-refresh it is just a commodity.
2013-08-05 16:13:35 +02:00
Rémi Denis-Courmont
f824535a4a vdpau: deprecate bitstream buffers within the hardware context
The bitstream buffers are now private and freed by libavcodec. For
backward compatibility, the hold bitstream buffer pointer is left NULL
(applications were supposed to av_freep() it).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:21:36 +02:00
Rémi Denis-Courmont
2852740e23 vdpau: store picture data in picture's rather than codec's context
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:20:41 +02:00
Rémi Denis-Courmont
549294fbbe vdpau: deprecate VDPAU codec capability
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:20:32 +02:00
Rémi Denis-Courmont
578ea75a9e vdpau: remove old-style decoders
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:15:49 +02:00
Luca Barbato
a10c4ce24b aac: Forward errors properly in aac_decode_frame_int
Incidentally also remove a warning.
2013-08-04 16:05:36 +02:00
Luca Barbato
71953ebcf9 aac: Check init_get_bits return value
Some code paths can call it with invalid length.

CC: libav-stable@libav.org
2013-08-04 16:05:36 +02:00
Yusuke Nakamura
a8b19271c3 avcodec: Add output_picture_number to AVCodecParserContext
Set output_picture_number in H.264 parser.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-02 20:59:45 +02:00
Diego Biurrun
7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Diego Biurrun
b5a138652f Give less generic names to global library option arrays 2013-08-02 19:19:02 +02:00
Vittorio Giovara
0d8b943d20 h264_sei: Return meaningful values
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-02 18:19:40 +02:00
Vittorio Giovara
b18412171f h264_sei: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-01 13:26:07 +02:00
Diego Biurrun
4c7fd58f8a h264_sei: Remove pointless old comment 2013-08-01 13:26:07 +02:00
Diego Biurrun
9ea24e927e twinvq: Add proper twinvq prefixes to identifiers 2013-08-01 12:44:05 +02:00
Diego Biurrun
78b4bfdb84 Replace remaining obsolete PIX_FMT names with AV_PIX_FMT equivalents 2013-07-29 23:46:51 +02:00
Michael Niedermayer
55c4cba2a7 huffyuvenc: BGRA support
Bug-Id: 452

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-07-29 18:21:05 +02:00
Luca Barbato
3ca1dd2502 xl: Make sure the width is valid
And undo the wrong commit f1cb490d6d

CC: libav-stable@libav.org
2013-07-28 19:36:44 +02:00
Paul B Mahol
b09d86c636 utvideoenc: use av_image_copy_plane()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-07-28 10:57:51 -04:00
Luca Barbato
62b1e3b103 aasc: Check minimum buffer size
Prevent some overreads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-28 15:41:59 +02:00
Luca Barbato
45ee556d51 qdm2: Whitespace cosmetics 2013-07-28 14:58:19 +02:00
Luca Barbato
0e78ef0f94 flac: use meaningful return values 2013-07-28 14:58:18 +02:00
Luca Barbato
f1cb490d6d xl: Fix the buffer size check
Also make it the first check.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-28 12:45:05 +02:00
Luca Barbato
e13a929314 xl: K&R formatting cosmetics 2013-07-28 12:45:05 +02:00
Diego Biurrun
bf4b0ed1d5 Add missing deprecation attributes 2013-07-27 16:08:49 +02:00
Diego Biurrun
16c22122c7 h264: K&R formatting cosmetics 2013-07-27 10:47:38 +02:00
Diego Biurrun
03039f4c8c miscellaneous typo fixes 2013-07-25 19:43:32 +02:00
Rémi Denis-Courmont
93a51984a2 mpeg12: Ignore slice threading if hwaccel is active
Slice threading does not work with hardware acceleration, as decoding
is per-picture.  This fixes Bugzilla #542.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-07-25 19:43:32 +02:00
Rainer Hochecker
582963a815 vdpau: Fix VC-1 interlaced mode
VDPAU expects the bitstream value (0, 2 or 3).
libavcodec uses an enum (0, 1 or 2).

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-07-25 14:19:17 +02:00
Diego Biurrun
4a2ef39442 cosmetics: Add '0' to float constants ending in '.'. 2013-07-25 11:33:23 +02:00
Diego Biurrun
6c145ecf78 twinvq: K&R formatting cosmetics 2013-07-25 11:17:06 +02:00
Martin Storsjö
54ba52077c arm: Comment out unused labels in simple_idct_arm
When building for iOS in thumb mode, gas-preprocessor.pl doesn't
mark unused labels as thumb functions (as it does for other
local labels, where it can figure out that they are functions
due to being referenced in branch instructions). This leads to
linker warnings for some of those local labels, such as:

ld: warning: ARM function not 4-byte aligned: __a_evaluation from
libavcodec/libavcodec.a(simple_idct_arm.o)

Therefore, comment them out since they don't have any function.
They do still have a value in documenting key points in the
assembly source though.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-24 22:43:21 +03:00
Luca Barbato
6fd221e5f8 8bps: Make the bound-checks consistent 2013-07-23 23:03:37 +02:00
Luca Barbato
bd7b4da0f4 8bps: Bound-check the input buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-23 23:03:37 +02:00
Luca Barbato
2f034f255c 4xm: Reject not a multiple of 16 dimension
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-23 23:03:37 +02:00
Luca Barbato
ca488ad480 alsdec: Clean up error paths
Fix at least a memory leak.

CC: libav-stable@libav.org
2013-07-23 23:03:37 +02:00
Luca Barbato
70ecc175c7 alsdec: Fix the clipping range
mcc_weightings is only 32 elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-23 23:03:37 +02:00
Martin Storsjö
69e6702c01 arm: Mangle external symbols properly in new vfp assembly files
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 14:48:30 +03:00
Ben Avison
ff30d12159 arm: Add VFP-accelerated version of qmf_32_subbands
Before           After
               Mean    StdDev   Mean    StdDev  Change
This function   1323.0  98.0      746.2  60.6   +77.3%
Overall        15400.0 336.4    14147.5 288.4    +8.9%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:44 +03:00
Ben Avison
800ffab48a dcadsp: Add a new method, qmf_32_subbands
This does most of the work formerly carried out by
the static function qmf_32_subbands() in dcadec.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:42 +03:00
Martin Storsjö
8b9eba664e arm: Add VFP-accelerated version of fft16
Before           After
               Mean    StdDev   Mean    StdDev  Change
This function   1389.3  4.2       967.8  35.1   +43.6%
Overall        15577.5 83.2     15400.0 336.4    +1.2%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:41 +03:00
Martin Storsjö
ba6836c966 arm: Add VFP-accelerated version of dca_lfe_fir
Before           After
               Mean    StdDev   Mean    StdDev  Change
This function    868.2  33.5      436.0  27.0   +99.1%
Overall        15973.0 223.2    15577.5  83.2    +2.5%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:39 +03:00
Martin Storsjö
b63bb251ea arm: Add VFP-accelerated version of imdct_half
Before           After
               Mean    StdDev   Mean    StdDev  Change
This function   2653.0  28.5     1108.8  51.4   +139.3%
Overall        17049.5 408.2    15973.0 223.2     +6.7%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:37 +03:00
Ben Avison
d6e4f5fef0 arm: Add VFP-accelerated version of int32_to_float_fmul_array8
Before           After
               Mean    StdDev   Mean    StdDev  Change
This function    366.2  18.3      277.8  13.7   +31.9%
Overall        18420.5 489.1    17049.5 408.2    +8.0%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:36 +03:00
Ben Avison
26ffcc7de1 dcadec: Use int32_to_float_fmul_array8
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:35 +03:00
Ben Avison
31c6f6f65c fmtconvert: Add a new method, int32_to_float_fmul_array8
This is similar to int32_to_float_fmul_scalar, but
loads a new scalar multiplier every 8 input samples.
This enables the use of much larger input arrays, which
is important for pipelining on some CPUs (such as
ARMv6).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:33 +03:00
Ben Avison
ce9ed10ac2 arm: Add VFP-accelerated version of int32_to_float_fmul_scalar
Before           After
               Mean    StdDev   Mean    StdDev  Change
This function   1175.0   4.4      366.2  18.3   +220.8%
Overall        19285.5 292.0    18420.5 489.1     +4.7%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:30 +03:00
Ben Avison
41ef1d360b arm: Add VFP-accelerated version of synth_filter_float
Before           After
               Mean    StdDev   Mean    StdDev  Change
This function   9295.0 114.9     4853.2 83.5    +91.5%
Overall        23699.8 397.6    19285.5 292.0   +22.9%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-22 10:15:17 +03:00
Justin Ruggles
8000206abc libspeexdec: fix detection of final terminator code 2013-07-21 16:36:31 -04:00
Derek Buitenhuis
4719040cd1 libx264: Define X264_API_IMPORTS on MSVC/ICL
libx264 has a few data exports which require X264_API_IMPORTS
to be defined if we link to libx264 dynamically on Windows.

In a similar fashion to how we handle our compat snprintf
implementation, if we define it all the time, the compiler
will first try and link to __imp_x264_symbol_name, and failing
that, as in the case of a static libx264, will attempt to link
to the non-prefixed symbol, which has already been pulled in by
other x264 functions' object files.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-07-21 08:56:25 -04:00
Luca Barbato
fd81899321 dsicinav: Clip the source size to the expected maximum
A packet larger than cin->bitmap_size does not make sense.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-19 22:14:07 +02:00
Luca Barbato
dd0bfc3a6a dsicinav: Bound-check the source buffer when needed
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-19 22:14:07 +02:00
Luca Barbato
fcae3ff124 dsicinav: K&R formatting cosmetics 2013-07-19 22:14:07 +02:00
Diego Biurrun
3ac7fa81b2 Consistently use "cpu_flags" as variable/parameter name for CPU flags 2013-07-18 00:31:35 +02:00
Christophe Gisquet
b6293e2798 fmtconvert: Explicitly use int32_t instead of int
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-17 11:02:47 +03:00
Sean McGovern
50612484e0 pthread: Rename thread_init to avoid symbol collision
The AIX threads library exposes a function with the same name.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-17 00:13:31 +03:00
Martin Storsjö
8f24c12be7 ac3dec: Don't consume more data than the actual input packet size
This was handled properly in the normal return case at the end
of the function, but not in this special case.

Returning a value larger than the input packet size can cause
problems for certain library users.

Returning the actual input buffer size unconditionally, since
it is not guaranteed that frame_size is set to a sensible
value at this point.

Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-15 21:37:21 +03:00
Luca Barbato
5b2a29552c indeo: Reject impossible FRAMETYPE_NULL
A frame marked FRAMETYPE_NULL cannot be scalable and requires a
previous frame successfully decoded.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-15 11:46:50 +02:00
Luca Barbato
f9e5261cab indeo: Do not reference mismatched tiles
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-15 11:46:30 +02:00
Luca Barbato
28dda8a691 indeo: Sanitize ff_ivi_init_planes fail paths
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-15 11:29:59 +02:00
Luca Barbato
b0eeb9d442 indeo5: return proper error codes 2013-07-15 11:29:59 +02:00
Luca Barbato
25a6666f6c indeo: Bound-check before applying motion compensation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-15 11:29:59 +02:00
Luca Barbato
dc79685195 indeo: Bound-check before applying transform
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-13 19:11:18 +02:00
Luca Barbato
cd78e934c2 indeo4: Validate scantable dimension
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-13 19:11:18 +02:00
Luca Barbato
6255ccf7d5 indeo4: Check the quantization matrix index
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-13 19:11:18 +02:00
Luca Barbato
8435bca087 indeo4: Do not access missing reference MV
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-13 19:11:18 +02:00
Martin Storsjö
031be5b41b ac3dec: Consistently use AC3_BLOCK_SIZE and sizeof
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-13 19:06:52 +03:00
Martin Storsjö
68e57cde68 ac3dec: Increment channel pointers only once per channel
If the channel mapping map multiple output channels to one
input channel, we should only increment the actual pointer once.

Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-13 18:55:07 +03:00
Nicolas Bertrand
886e1b36f5 jpeg2000: Remove unused passes array in Jpeg200Cblk structure
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-13 14:28:48 +02:00
Nicolas Bertrand
f56fe04de3 jpeg2000: Initialize only once mqc arrays
Improves decoding speed.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-13 07:54:12 +02:00
Luca Barbato
3802833bc1 dca: Respect the current limits in the downmixing capabilities
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-12 04:34:49 +02:00
Luca Barbato
f261e50845 dca: Error out on missing DSYNC
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-12 04:34:49 +02:00
Luca Barbato
c82da343e6 pcm: always use codec->id instead of codec_id
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-12 04:34:49 +02:00
Luca Barbato
c0d973c41b vdpau: use the correct namespace for the union
Vdp is used by libvdpau, use AVVDPAU as used for the rest.

Reported-by: Alexis Ballier <aballier@gentoo.org>
2013-07-12 04:34:49 +02:00
Luca Barbato
e9d394f3fa mlpdec: Do not set invalid context in read_restart_header
The faulty values rippled further down the codepath causing a
hard-to-track segfault in the assembly code.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-12 04:34:49 +02:00
Luca Barbato
2b379a9251 mlpdsp: x86: Respect cpuflags 2013-07-12 04:34:49 +02:00
Luca Barbato
3abde1a3b4 pcx: Do not overread source buffer in pcx_rle_decode
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-12 04:34:49 +02:00
Luca Barbato
170fb593c6 pcx: K&R formatting cosmetics 2013-07-12 04:34:49 +02:00
Luca Barbato
d14a26edb7 wmavoice: conceal clearly corrupted blocks
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-10 15:50:06 +02:00
Luca Barbato
f5c48f5ada wmavoice: use init_static_data 2013-07-10 15:49:58 +02:00
Luca Barbato
04e9853a21 wmavoice: return meaningful error codes 2013-07-10 15:49:51 +02:00
Luca Barbato
7d65e960c7 iff: Do not read over the source buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-10 15:24:42 +02:00
Luca Barbato
3865ba7b21 iff: K&R formatting cosmetics 2013-07-10 15:23:51 +02:00
Luca Barbato
4ecdb5ed44 qdm2: Conceal broken samples
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-09 15:57:46 +02:00
Luca Barbato
adadc3f244 qdm2: refactor joined stereo support
qdm2 does support only two channels. Loop over the run once.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-09 15:57:32 +02:00
Luca Barbato
12576afe20 adpcm: Write the correct number of samples for ima-dk4
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-09 10:49:29 +02:00
Luca Barbato
bbf6a4aa20 imc: Catch a division by zero
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-09 10:49:29 +02:00
Luca Barbato
50cf5a7fb7 atrac3: Error on impossible encoding/channel combinations
Joint stereo encoded mono is impossible.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-09 10:49:29 +02:00
Luca Barbato
22e76ec635 atrac3: set the getbits context the right buffer_end
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-09 10:49:29 +02:00
Luca Barbato
874c8a17ac atrac3: fix error handling
decode_tonal_components returns a proper AVERROR.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-09 10:49:29 +02:00
Luca Barbato
744a11c996 qdm2: check and reset dithering index per channel
Checking per subband would have the index exceed the
dithering noise table size.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-07 22:06:35 +02:00
Luca Barbato
76efedeadb qdm2: formatting cosmetics
Apply the usual style plus drop few unnecessary return at the end
of void functions.
2013-07-07 22:06:28 +02:00
Luca Barbato
f054e309c5 qdm2: use init_static_data 2013-07-07 22:06:20 +02:00
Luca Barbato
c4abc9098c vqavideo: check the version
Prevent out of buffer write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-07 22:04:05 +02:00
Ronald S. Bultje
46d208e1e0 vp8: Wait for prev_frame to parse segment_map before reading it
This fixes occasional failures of vp8-test-vector-010 with frame-level
multithreading enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-07 13:30:29 +03:00
Luca Barbato
4e7f0b082d kmvc: Clip pixel position to valid range
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-06 14:12:45 +02:00
Luca Barbato
8f68977054 kmvc: use fixed sized arrays in the context
Avoid some boilerplate code to dynamically allocate and then free the
buffers.
2013-07-06 14:12:42 +02:00
Luca Barbato
4972e5a186 bitstream_filter: K&R formatting cosmetics 2013-07-05 19:38:24 +02:00
Luca Barbato
6a10142faa indeo: reject negative array indexes
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-04 16:06:11 +02:00
Luca Barbato
6dfacd7ab1 indeo: Cosmetic formatting
Trim some overly long lines.
2013-07-04 16:06:10 +02:00
Luca Barbato
62256010e9 indeo: Refactor ff_ivi_init_tiles and ivi_decode_blocks
Spin large and mostly self contained blocks into stand alone
functions.
2013-07-04 16:06:10 +02:00
Luca Barbato
f6f36ca8ca indeo: Refactor ff_ivi_dec_huff_desc
Spare an indentation level.
2013-07-04 16:06:10 +02:00
Luca Barbato
e6d8acf6a8 indeo: use a typedef for the mc function pointer 2013-07-04 16:06:10 +02:00
Jason Garrett-Glaser
d222f6e39e cabac: x86 version of get_cabac_bypass
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-04 16:06:10 +02:00
Kostya Shishkov
410066986f aic: use chroma scan tables while decoding luma component in progressive mode
For some unclear reason Apple decided to use the same scan tables for luma and
chroma in the progressive mode while using different ones for luma in the
interlaced mode.
2013-07-04 12:09:45 +02:00
Michael Niedermayer
95a57d26d8 jpeg2000: Use the matching coding style struct for transform selection
Fixes a null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:48 +02:00
Michael Niedermayer
c4604b8792 jpeg2000: Merge rescaling with interleaving in 9/7 IDWT
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:48 +02:00
Michael Niedermayer
22e18ea39e jpeg2000: Optimize output sample conversion
67935 -> 29984 kcycles

Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:48 +02:00
Michael Niedermayer
f0552e63a6 jpeg2000: Reset s->numX/Ytiles on tile deallocation
Keep the structure fields more consistent after cleanup.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:48 +02:00
Michael Niedermayer
e11099db20 jpeg2000: Optimize dequantization
Float:   4700 -> 2700 cycles
Integer: 4400 -> 2800 cycles

(sandybridge  i7)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Michael Niedermayer
c1dcbc590d jpeg2000: Do not assume a single tile
In preparation of supporting multiple tiles.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Michael Niedermayer
53d5d89c1b jpeg2000: Speed up jpeg2000_decode_tile()
Skip processing bands with dimension set to 0.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Michael Niedermayer
64f6570c6e jpeg2000: Use EBCOT's CAUSAL and BYPASS mode in decode_cblk()
Speed it up a bit.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Michael Niedermayer
d57c737ac3 jpeg2000: Simplify jpeg2000_decode_packets()
Raise PATCHWELCOME error in case of non-implemented progression order.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Michael Niedermayer
09d5929f37 jpeg2000: Do not crash on NULL node in tag_tree_decode
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Michael Niedermayer
aa16bbaf9b jpeg2000: Refactor SOT marker parsing
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Luca Barbato
daeb4e3042 jpeg2000: Proper cleanup on failure in decode_frame()
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:47 +02:00
Michael Niedermayer
589e5b52f6 jpeg2000: Use the correct sizeof in memset for T1 data
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
5b73916d34 jpeg2000: Simplify init_tile()
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
33e665a6ab jpeg2000: Update pixel format support
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
db13e02c6f jpeg2000: Compute corrections of sub-band coordinates
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
690c8af97b jpeg2000: Remove unneeded variable initialization
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
5bf208f659 jpeg2000: Use separate fields for int and float codepaths
Split stepsize and data into int and float variants.
Eliminates a number of casts and simplifies spotting errors.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
a458b91cf4 jpeg2000: Split int/float codepaths depending on the DWT
DWT53 is always int, DWT97 is always float.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
f9581f1414 jpeg2000: Improve reduced resolution decoding
Correctly scale down the component coordinates and
clean up some redundant code.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:46 +02:00
Michael Niedermayer
952f7ed3c0 jpeg2000: Compute quantization for 'scalar derived' in the correct case.
Scalar derived case is represented by the JPEG2K_QSTY_SI define.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
4e11b15534 jpeg2000: Calculate code-block coord in ff_jpeg2000_init_component()
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
4cbd5ed11b jpeg2000: Fix compute precedence error in lut_gain index
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
b44925ae6b jpeg2000: Initialize code blocks structures in precincts to 0
Prevent use of uninitialized memory / valgrind failure.

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
cf04af2086 jpeg2000: Check that we have enough components for MCT
Avoid overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
b564784a20 jpeg2000: Check that there is a SOT before SOD
Avoid overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
2c3901b2c3 jpeg2000: Remove unneeded returns
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
ef35d6dbc6 jpeg2000: Propagate error code from get_cox()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
78962d3df4 jpeg2000: Check that nreslevels2decode has been initialized before use
Avoid buffer overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:45 +02:00
Michael Niedermayer
86a2602e16 jpeg2000: Drop unused and writeonly fields
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
ac921338a4 jpeg2000: Correctly calculate sgnd
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
fd54dd028b jpeg2000: check len before parsing header
Avoid overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
eae63e3c15 jpeg2000: Check component number in get_coc() and get_qcc()
Avoid overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
17e5d614a8 jpeg2000: Check zero bit-plane validity
Prevent integer overflows.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Luca Barbato
7e201d575d jpeg2000: Validate block lengthinc
Currently we are using an array with a static data size.

Similar to a patch with the same purpose by Michael Niedermayer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
278a923c51 jpeg2000: Validate SIZ parsing
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
d3cb302b88 jpeg2000: Validate SOT parsing
Avoid some overreads.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:44 +02:00
Michael Niedermayer
1a3598aae7 jpeg2000: Use bytestream2
Prevent a number of overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
5efadcb8cd jpeg2000: Clean up return paths and error messages
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
be3271009e jpeg2000: Define the maximum decomposition levels
And define the resolution levels according.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Michael Niedermayer
fbcc03db8f jpeg2000: Check code-block size
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
5650e331a7 jpeg2000: Validate resolution levels
There are 32 maximum decomposition levels, thus 33 resolution levels.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Luca Barbato
8bd9039900 Revert "indeo5: reject negative motion vectors"
Negative motion vectors are possible.

This reverts commit 1194a41080.
2013-07-01 06:49:46 +02:00
Luca Barbato
b36e1893ef indeo: check for reference when inheriting mvs
The same is done already for qdelta.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-01 04:20:58 +02:00
Luca Barbato
1194a41080 indeo5: reject negative motion vectors
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-01 04:20:51 +02:00
Luca Barbato
dd3754a488 indeo: use proper error code 2013-07-01 04:17:46 +02:00
Luca Barbato
7388c0c586 indeo: Properly forward the error codes
If the tile data size does not match the buffer size it did not
return an AVERROR_INVALIDDATA causing futher corruption later.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-07-01 04:17:46 +02:00
Loren Merritt
1221bb6239 x86: lpc: fix a segfault in av_evaluate_lls_sse2() 2013-06-30 23:11:19 +00:00
Luca Barbato
6765ee7b9c mjpeg: Check the unescaped size for overflows
And contextually check init_get_bits success and fix the reporting
message.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-30 08:48:51 +02:00
Luca Barbato
7520d9779c mjpeg: Move code out of else branch
Simplify the control flow and spare some vertical space.
2013-06-30 08:46:55 +02:00
Luca Barbato
02ec656af7 wmapro: error out on impossible scale factor offsets
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-29 18:11:59 +02:00
Luca Barbato
d4a217a408 wmapro: check the min_samples_per_subframe
Must be at least WMAPRO_BLOCK_MIN_SIZE.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-29 18:11:40 +02:00
Luca Barbato
183880cfc4 pictor: use the correct logging context
Broken in 6d97484d72
2013-06-29 18:11:12 +02:00
Loren Merritt
c93ccf5a4c lpc: use levinson for the first pass of multipass cholesky
Levinson is faster, and cholesky is only needed if we want to apply different
weights to different samples, which doesn't happen on the first pass.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:26:52 +02:00
Loren Merritt
502ab21af0 x86: lpc: simd av_update_lls
4x-6x faster on sandybridge

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Loren Merritt
41578f70cf lpc: use function pointers, in preparation for asm
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Loren Merritt
cc6714bb16 lpc: remove "decay" argument
We never used the rolling-average mode, and this makes av_update_lls 15% faster.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-29 13:23:57 +02:00
Luca Barbato
3822936252 wmapro: check num_vec_coeffs against the actual available buffer
Prevent yet another buffer overwrite.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-28 13:16:35 +02:00
Luca Barbato
6652338f43 wmapro: return early on unsupported condition
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-28 13:16:00 +02:00
Luca Barbato
e30b068ef7 wmapro: make sure there is room to store the current packet
Prevent horrid and hard to trace struct overwrite.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-28 13:15:40 +02:00
Luca Barbato
afe03092dd lavc: move put_bits_left in put_bits.h 2013-06-28 13:14:12 +02:00
Luca Barbato
07c52e2c7c aac: return meaningful errors 2013-06-27 01:22:36 +02:00
Luca Barbato
6d8629aac1 aac: K&R formatting cosmetics 2013-06-27 01:22:06 +02:00
Derek Buitenhuis
d9c89ef86b cllc: Use outbuf in RGB and ARGB functions
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 14:55:01 -04:00
Derek Buitenhuis
1ef6ac1071 cllc: Implement YUV support
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-06-24 14:54:46 -04:00
Kieran Kunhya
95d5246454 lavc: Add option to encode MPEG-2 AAC with libfdk-aac
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-24 08:03:26 +02:00
Anton Khirnov
720a1de52f lavc: free the padded last frame during audio encoding properly 2013-06-20 16:49:11 +02:00
Kostya Shishkov
bbb2945f2d smacker: check the return value of smacker_decode_tree
Also prevent a memory leak.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:56:50 +02:00
Kostya Shishkov
f52edef301 smacker: fix an off by one in huff.length computation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:55:53 +02:00
Janne Grunau
985f34b756 utils: fix avcodec_flush_buffers pre-reference counting compatibility
The to_free AVframe must be freed just like the other ones.
Indeed, the calling application may expect all frames to be
released.

(This regression caused use-after-free in VLC with hwaccel.)

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:10:58 +02:00
Luca Barbato
f80b60ad59 bitstream: forward error values and drop few abort() 2013-06-16 09:30:26 +02:00
Luca Barbato
f776899a17 bitstream: K&R formatting cosmetics 2013-06-16 09:30:25 +02:00
Luca Barbato
9e80eda26d h264_mp4toannexb_bsf: return a padded buffer
The code using the returned buffer might expect it to be
FF_INPUT_BUFFER_PADDING_SIZE padded as any other avpacket.
2013-06-15 16:14:45 +02:00
Luca Barbato
8d929afd25 h264_mp4toannexb_bsf: factor out extradata parsing 2013-06-15 16:14:33 +02:00
Luca Barbato
5d21ca4559 h264_mp4toannexb_bsf: K&R formatting cosmetics 2013-06-15 09:11:13 +02:00
Luca Barbato
59d7bb99b6 4xm: check bitstream_size boundary before using it
Prevent buffer overread.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
fbd0dacc8d 4xm: refactor decode_p_block
Directly return from code 1, 2 and 6 codepaths and simplify the
remaining one to have a single overflow check and a single call to
mcdc.
2013-06-12 14:45:46 +02:00
Luca Barbato
94aefb1932 4xm: do not overread the source buffer in decode_p_block
Check for out of picture macroblocks before calling mcdc.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
be373cb50d 4xm: do not overread the prestream buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
de2e5777e2 4xm: validate the buffer size before parsing it
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
145023f572 4xm: reject frames not compatible with the declared version
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
1f0c607560 4xm: drop pointless assert
Make sure the value of wlog2 is always between 0 and 3.
2013-06-12 14:45:46 +02:00
Luca Barbato
b8b809908e 4xm: forward errors from decode_p_block
Partially mitigate out of memory writes.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato
50ec1db62d 4xm: fold last_picture lazy allocation in decode_p_frame 2013-06-12 14:45:46 +02:00
Luca Barbato
e7a44f87d0 4xm: refactor fourxm_read_header
Split sound and video tag parsing in separate functions.
2013-06-12 14:45:46 +02:00
Luca Barbato
08859d19b4 4xm: use the correct logging context 2013-06-12 14:45:46 +02:00
Michael Niedermayer
7ad5708691 g2meet: Fix a typo in the height comparison
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-12 13:45:53 +02:00
Kostya Shishkov
7dfc3381dd g2meet: do not leak buffers 2013-06-12 09:54:45 +02:00