Commit Graph

18216 Commits

Author SHA1 Message Date
Derek Buitenhuis
bc31a7a3b6 tablegen: Don't use cbrtf in host tools
You cannot count on them being present on all systems, and you
cannot include libm.h in a host tool, so just hard code baseline
implementations.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-15 17:00:28 +01:00
Derek Buitenhuis
884fd4d259 tableprint: Fix use of a size_t print with MSVC
%zu was introduced in C99, so MSVC has its own way to handle it,
namely %Iu.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-15 17:00:28 +01:00
Luca Barbato
39185ec4fa cavs: Check for negative cbp
Sample-Id: 00000647-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-13 17:52:53 +02:00
Luca Barbato
1b20d0f581 cavs: Return meaningful error values 2013-10-13 17:52:53 +02:00
Luca Barbato
14ddbb477f cavs: K&R formatting cosmetics 2013-10-13 17:52:53 +02:00
Derek Buitenhuis
eb90a2091f pthread: Fix deadlock during thread initialization
Sometimes, if pthread_create() failed, then pthread_cond_wait() could
accidentally be called in the worker threads after the uninit function
had already called pthread_cond_broadcast(), leading to a deadlock.

Don't call pthread_cond_wait() if c->done is set.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-13 05:50:00 -04:00
Luca Barbato
c9ef6b0932 indeo4: Check the inherited quant_mat
Invalidate it if not supported.

Sample-Id: 00000262-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-13 01:38:21 +02:00
Luca Barbato
0cb83c5638 indeo4: Check the block size if reusing the band configuration
Sample-Id: 00000287-google

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-13 01:38:20 +02:00
Anton Khirnov
16ea20c827 lavc doxy: extend/clarify avcodec_decode_audio4() doxy
Elaborate on flushing the decoder.
2013-10-12 15:10:21 +02:00
Anton Khirnov
66d3f5fd5c lavc doxy: remove false statements about alignment requirements.
The packet data does not need to be aligned.
2013-10-12 15:09:38 +02:00
Luca Barbato
c0de9a23c7 prores: Reject negative run and level values
Sample-Id: 00000611-google

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-10 21:02:10 +02:00
Tim Walker
5f5ada3dbf shorten: Fix out-of-array read
pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-10-10 17:52:14 +02:00
Maxim Poliakovski
ed796fba76 atrac3: Better name for IMDCT window initialization
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-10 14:29:54 +02:00
Maxim Poliakovski
be76415047 atrac3: Remove unused gain compensation tables
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-10 14:26:13 +02:00
Luca Barbato
2df7f7714a prores: Error out only on surely incomplete ac_coeffs 2013-10-10 10:26:31 +02:00
Luca Barbato
44690dfa68 prores: Add a codepath for decoding errors 2013-10-10 09:47:03 +02:00
Martin Storsjö
41a10f3ba1 vp6: Support cropping to AVCodecContext.width/height
In these cases, there is no extradata but only the properly set
width/height values by the demuxer.

This makes sure VP6 in F4V files is cropped properly.

This is similar to what is done for H264 for letting the container
width/height override what's in the bitstream, since 30f515091.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-10 10:41:21 +03:00
Luca Barbato
1018a92219 jpeg2000: Check block length
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 22:25:19 +02:00
Luca Barbato
071e29af4d vmnc: Use meaningful return values 2013-10-09 22:25:01 +02:00
Luca Barbato
5e992a4682 vmnc: Check the cursor dimensions
And manage the reallocation failure path.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 22:25:01 +02:00
Luca Barbato
61cd19b8bc vmnc: Port to bytestream2
Fix some buffer overreads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 22:25:01 +02:00
Luca Barbato
a66aa0daf2 vmnc: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-09 22:25:01 +02:00
Luca Barbato
b2148faca9 shorten: Extend fixed_coeffs to properly support pred_order 0
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 03:34:10 +02:00
Diego Biurrun
6405ca7d4a x86: h264_idct: Update comments to match 8/10-bit depth optimization split 2013-10-07 21:46:46 +02:00
Henrik Gramner
bbe4a6db44 x86inc: Utilize the shadow space on 64-bit Windows
Store XMM6 and XMM7 in the shadow space in functions that
clobbers them. This way we don't have to adjust the stack
pointer as often, reducing the number of instructions as
well as code size.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-07 06:25:35 -04:00
Diego Biurrun
ce1e8045e0 x86: fdct: Employ more specific ifdefs
This avoids building mmxext and sse2 code when disabled by configure.
2013-10-06 22:02:25 +02:00
Diego Biurrun
2ddb35b911 x86: dsputil: Separate ff_add_hfyu_median_prediction_cmov from dsputil_mmx
The function does not depend on MMX and compilation without MMX enabled
fails if the function is compiled conditional on MMX availability.
2013-10-05 19:21:15 +02:00
Diego Biurrun
258414d077 x86: fdct: Initialize optimized fdct implementations in the standard way 2013-10-05 18:20:52 +02:00
Diego Biurrun
0b8b2ae5e9 x86: xviddct: Employ more specific ifdefs
This avoids building mmxext and sse2 code when disabled by configure.
2013-10-05 18:14:58 +02:00
Diego Biurrun
6cc133ec58 x86: fdct: Only build fdct code if encoders have been enabled
fdct is only initialized if encoders are enabled.
2013-10-04 10:50:44 +02:00
Diego Biurrun
b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Maxim Poliakovski
6a5bfd4d49 atrac: Add missing av_cold
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 23:00:09 +02:00
Maxim Poliakovski
79cbac8cd4 atrac3: Generalize gain compensation code
Move it to the ATRAC common code, to reuse in the upcoming ATRAC3+ decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 18:20:01 +02:00
Diego Biurrun
5ce04c14dd Use correct Doxygen syntax 2013-10-03 17:53:51 +02:00
Maxim Poliakovski
4be292dac7 atrac: Move doxygen comments to the header
Also update copyright info and file description.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 17:53:51 +02:00
Diego Biurrun
be0b4c70ec atrac3: Replace a silly counter variable name with plain 'j' 2013-10-03 17:53:51 +02:00
Anton Khirnov
451606f7ce lavc: mark deprecated AVCodec.max_lowres for removal on next bump 2013-10-02 16:41:08 +02:00
Martin Storsjö
ff07ec143e pcx: Return an error on broken palette if err_detect is set to 'explode'
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 21:05:16 +03:00
Martin Storsjö
d1d99e3bef pcx: Check the packet size before assuming it fits a palette
This fixes reads out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:03:12 +03:00
Martin Storsjö
7ba0cedbfe rpza: Fix a buffer size check
We read 2 bytes for 15 out of 16 pixels, therefore we need to
have at least 30 bytes, not 16.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:42 +03:00
Martin Storsjö
aa0dd52434 xxan: Disallow odd width
Decoded data is always written in pairs within this decoder.
This fixes writes out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:32 +03:00
Martin Storsjö
fc739b3eef xan: Only read within the data that actually was initialized
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:19 +03:00
Martin Storsjö
30db94dc39 xan: Use bytestream2 to limit reading to within the buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:50 +03:00
Martin Storsjö
9fb0de86b4 pcx: Consume the whole packet if giving up due to missing palette
Previously, we returned 0, meaning successful decoding but 0
bytes consumed, leading to an infinite loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:29 +03:00
Martin Storsjö
a81cad8f86 pngdec: Stop trying to decode once inflate returns Z_STREAM_END
If the input buffer contains more data after the deflate stream,
the loop previously left running infinitely, with inflate returning
Z_STREAM_END.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:03 +03:00
Martin Storsjö
59480abce7 alac: Do bounds checking of lpc_order read from the bitstream
In lpc_prediction(), we write up to array element 'lpc_order' in
an array allocated to hold 'max_samples_per_frame' elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:57:10 +03:00
Paul B Mahol
7e52080cb1 pcm: support 24-bit/32-bit little-endian planar
Used by LXF.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Kostya Shishkov
4370f65be8 g2meet: Respect cursor_stride properly everywhere
This fixes a regression with rgb cursors since b1e46988.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-25 17:42:01 +03:00
Anton Khirnov
5f4b1b1cbd lavc doxy: document that avcodec_flush_buffers() invalidates decoded frames 2013-09-24 17:34:00 +02:00
Anton Khirnov
cab8c5f8e1 h264: do not reinitialize the global cabac tables at each slice header 2013-09-24 17:13:52 +02:00