Commit Graph

17412 Commits

Author SHA1 Message Date
Martin Storsjö
86611ff123 pnm: Use av_pix_fmt_desc_get instead of accessing the array directly
This fixes boken fate tests with MSVC with DLLs, broken since
b5f536d24.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-28 18:29:03 +02:00
Diego Biurrun
ebc701993f x86: dsputil: Drop some unused function #defines 2013-02-26 23:36:24 +01:00
Diego Biurrun
845cfc92f9 x86: dsputil: Drop aliasing of ff_put_pixels8_mmx to ff_put_pixels8_mmxext
The external assembly function uses mmxext instructions and should not be
masqueraded as an mmx-only function. Instead, use the mmx-only inline
assembly function.
2013-02-26 23:36:24 +01:00
Diego Biurrun
096cc11ec1 x86: vc1dsp: Move ff_avg_vc1_mspel_mc00_mmxext out of dsputil_mmx.c 2013-02-26 23:36:24 +01:00
Martin Storsjö
31a23a0dc6 x86: dsputil_mmx: Remove leftover inline assembly fragments
These became unused in 71155d7b.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-27 00:17:05 +02:00
Diego Biurrun
c242bbd8b6 Remove unnecessary dsputil.h #includes 2013-02-26 00:51:34 +01:00
Diego Biurrun
76b19a3984 Fix a number of incorrect intmath.h #includes. 2013-02-26 00:51:34 +01:00
Justin Ruggles
699d02b839 libschroedinger: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Justin Ruggles
09031b4639 vorbisenc: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Justin Ruggles
e951b6d94c vorbisdec: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Luca Barbato
23bd9ef4b2 vorbisdec: Accept 0 amplitude_bits
The specification does not prevent an encoder to write the amplitude 0
as 0 amplitude_bits.

Our get_bits() implementation might not support a zero sized read
properly, thus the additional branch.
2013-02-25 07:34:00 +01:00
Luca Barbato
5b47c19bfd vorbisdec: Add missing checks
Rate and order must not be 0 even if the specification does not say that
explicitly.
2013-02-25 07:34:00 +01:00
Luca Barbato
fc386f2eea vorbisdec: cosmetics
Use the commonly used "if (!var)" instead of "if (var == 0)".
2013-02-25 07:34:00 +01:00
Michael Niedermayer
11dcecfcca vorbisdec: Error on bark_map_size equal to 0.
The value is used to calculate output LSP curve and a division by zero
and out of array accesses would occur.

CVE-2013-0894

CC: libav-stable@libav.org

Reported-by: Dale Curtis <dalecurtis@chromium.org>
Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-25 07:33:59 +01:00
Diego Biurrun
3d035d5a6a dsputil_alpha.h: Add missing stddef.h header to fix standalone compilation 2013-02-24 18:51:40 +01:00
Justin Ruggles
d7c450436f ac3dec: validate channel output mode against channel count
Damaged frames can lead to a mismatch, which can cause a segfault
due to using an incorrect channel mapping.

CC:libav-stable@libav.org
2013-02-23 16:59:39 -05:00
Diego Biurrun
94ee7da08d Remove pointless av_cold attributes in header files
The init functions marked as av_cold have to be executed in any case,
so there is no gain from trying to mark paths leading to such functions
as unlikely.
2013-02-23 20:13:47 +01:00
Kostya Shishkov
b5f536d24b pnm: add high-bitdepth PGMYUV support for both encoder and decoder 2013-02-23 16:49:22 +01:00
John Van Sickle
2f325a6fd4 libx264: change i_qfactor to use x264cli's default
This also allows libx264 to modify its i_qfactor value
when using the "-tune" setting. Previously it had a static
value of 1.25

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-23 13:34:52 +01:00
Anton Khirnov
d8a74d1d95 qtrle: use AV_LOG_ERROR in an error message. 2013-02-23 13:06:12 +01:00
Anton Khirnov
7b4f91155b qtrle: cosmetics, reformat CHECK_PIXEL_PTR() macro 2013-02-23 13:06:08 +01:00
Anton Khirnov
e106592447 qtrle: add more checks against pixel_ptr being negative.
CC:libav-stable@libav.org
2013-02-23 13:05:54 +01:00
Anton Khirnov
4f3b058c84 cavs: initialize various context tables to 0
Avoids crashes with corrupted files.

CC:libav-stable@libav.org
2013-02-23 13:05:43 +01:00
Anton Khirnov
0dff40bfb9 mlpdec: do not try to allocate a zero-sized output buffer.
CC:libav-stable@libav.org
2013-02-23 13:05:31 +01:00
Anton Khirnov
ddfe1246d9 flicvideo: avoid an infinite loop in byte run compression
When byte_run is 0, pixel_countdown is not touched and the loop will run
forever.

CC:libav-stable@libav.org
2013-02-23 09:22:30 +01:00
Anton Khirnov
067432c1c9 loco: check that there is data left after decoding a plane.
CC:libav-stable@libav.org
2013-02-23 09:20:42 +01:00
Anton Khirnov
de6dfa2bb8 lagarith: avoid infinite loop in lag_rac_refill()
range == 0 happens with corrupted files

CC:libav-stable@libav.org
2013-02-23 09:16:32 +01:00
Anton Khirnov
8097fc9a2d 4xm: check the return value of read_huffman_tables().
CC:libav-stable@libav.org
2013-02-23 09:13:08 +01:00
Matt Wolenetz
311443f6c7 x86: h264: Don't use redzone in AVX h264_deblock on Win64
This fixes crashes in chromium on win64 on machines with AVX
(crashes that apparently aren't triggered by fate).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-21 15:02:16 +02:00
Diego Biurrun
a0a1ac0f09 dxva2: Add missing #define to make header compile standalone 2013-02-20 14:24:07 +01:00
Diego Biurrun
3e85b46ecf arm: vp8: Add missing #includes for header to compile standalone 2013-02-20 14:24:07 +01:00
Martin Storsjö
26ee5ca03d h264: Get rid of unnecessary casts
This gets rid of a number of warnings about casts discarding
qualifiers from the pointer target, present since 7ebfb466a.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-20 00:25:29 +02:00
Ronald S. Bultje
fae6fd5b87 h264/svq3: Stop using draw_edges
Instead, only extend edges on-demand when the motion vector actually
crosses the visible decoded area using ff_emulated_edge_mc(). This
changes decoding time for cathedral from 8.722sec to 8.706sec, i.e.
0.2% faster overall. More generally (VP8 uses this also), low-motion
content gets significant speed improvements, whereas high-motion content
tends to decode in approximately the same time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:34:33 +02:00
Ronald S. Bultje
7ebfb466ae h264: Don't store intra pcm samples in h->mb
Instead, keep them in the bitstream buffer until we read them verbatim,
this saves a memcpy() and a subsequent clearing of the target buffer.
decode_cabac+decode_mb for a sample file (CAPM3_Sony_D.jsv) goes from
6121.4 to 6095.5 cycles, i.e. 26 cycles faster.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:34:14 +02:00
Ronald S. Bultje
9918f57dcf get_bits: Return pointer to buffer that is the result of the alignment
This allows more transparent mixing of get_bits and whole-byte access
without having to touch get_bits internals.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:52 +02:00
Ronald S. Bultje
2ed008204d h264: Add add_pixels4/8() to h264dsp, and remove add_pixels4 from dsputil
These functions are mostly H264-specific (the only other user I can
spot is bink), and this allows us to special-case some functionality
for H264. Also remove the 16-bit-coeff with >8bpp versions (unused)
and merge the duplicate 32-bit-coeff for >8bpp (identical).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:29 +02:00
Ronald S. Bultje
e5ffffe48d h264chroma: Remove duplicate 9/10 bit functions
These functions do the same thing in 16 bit space and don't need
any depth specific clipping.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:19 +02:00
Ronald S. Bultje
f859678f3f vp56: Remove clear_blocks call, and clear alpha plane U/V DC only
The non-alpha and alpha-Y planes are cleared in the idct_put/add()
calls. For the alpha U/V planes, we only care about the DC for entropy
context prediction purposes, the rest of the data is unused.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:11 +02:00
Daniel Kang
9acd23d655 x86: dsputil: Fix h263 loop filter link error in some configurations
This was caused by unconditionally referencing a conditionally compiled
table. Now the code is also compiled conditionally.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-02-18 17:09:00 +01:00
Daniel Kang
7a03145ed7 x86: dsputil: int --> ptrdiff_t for ff_put_pixels16_mmxext line_size param
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-02-18 15:23:03 +01:00
Matti Hamalainen
7f3624dc81 svq3: unbreak decoding
a7d2861d36 removed necessary braces.
2013-02-18 02:55:07 +01:00
Luca Barbato
aa11cb7931 build: make audio_frame_queue a stand-alone component
Encoders requiring it have the dependency expressed in the
configure.
2013-02-17 22:05:18 +01:00
Diego Biurrun
870a0c669e build: The libopencore-amrnb encoder depends on audio_frame_queue
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:25 +01:00
Diego Biurrun
8837f4396a libopencore-amrwb: Make AMR-WB ifdeffery more precise
The library might provide an encoder in the future, so it's better to
check for the presence of the decoder rather than just the library.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:25 +01:00
Diego Biurrun
e6bda9a9fd libopencore-amr: Conditionally compile decoder and encoder bits
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:25 +01:00
Diego Biurrun
56632fef65 libopencore-amrnb: cosmetics: Group all encoder-related code together
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-17 12:03:24 +01:00
Luca Barbato
0b70fb1d51 dsputil: convert remaining op_pixels_func
Convert to diffptr_t the line_size parameters still int.

Remove all the warnings in dsputil.c
2013-02-17 12:03:24 +01:00
Michael Niedermayer
488f87be87 roqvideodec: check dimensions validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ae6104511)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fee26d352a)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-02-17 11:31:20 +01:00
Michael Niedermayer
f7d18deb73 vqavideo: check chunk sizes before reading chunks
Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 13093f9767)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-02-17 11:31:20 +01:00
Michael Niedermayer
39bec05ed4 qdm2: check array index before use, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

(cherry picked from commit a7ee6281f7)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-02-17 11:31:20 +01:00