Vittorio Giovara
65b96aba28
wmalossless: Warn when decoding 24 bit depth
...
See ticket #4134
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Andreas Cadhalpun
42e7a5b3c7
wmalosslessdec: reset frame->nb_samples on packet loss
...
Otherwise a frame with non-zero nb_samples but without any data can be
returned.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
f9020d514e
wmalosslessdec: avoid reading 0 bits with get_bits
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
f144e4ddff
avcodec/wmalosslessdec: use sizeof() instead of a literal number
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
dfc2a3982f
avcodec/wmalosslessdec: Add () to protect the arguments of WMASIGN()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
zhaoxiu.zeng
9e6198f0a4
avcodec/wmalosslessdec: simplify
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
zhaoxiu.zeng
80f1378005
avcodec/wmalosslessdec: optimize sign operation
...
Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
zhaoxiu.zeng
bc0a440e88
avcodec/wmalosslessdec: change type of acfilter_coeffs from int64_t to int16_t
...
Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
46e2afa4dc
wmalossless: reset lms_update
...
It may contain garbage at the end, and zeroing allows using DSP
with longer loops.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ce6141259b
avcodec/wmalosslessdec: support 24bit lossless
...
Not checked if its actually lossless
Fixes Ticket1847
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
849b9d34c7
wmalosslessdec: fix mclms_coeffs* array size
...
Fixes corruption of context
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
Bug-Id: CVE-2014-2098
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Michael Niedermayer
49bf712a89
libavcodec/wmalosslessdec: add missing emms
...
prevent failure with mmx2
should fix fate failure on freebsd mmx2 client
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Christophe Gisquet
adf4ee40e7
wma lossless: reuse scalarproduct_and_madd_int16
...
This is done by padding the coefficient buffer with 0s, because the order
may be only a multiple of 4, and the DSP function requires batches of 8.
However, no sample with such a case was found, so request one if it uses
that kind of order.
Approximate relative speedup depending on instruction set:
plain C: -6%
mmxext: 51%
sse2: 54%
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
11 years ago
Michael Niedermayer
ec9578d54d
avcodec/wmalosslessdec: fix mclms_coeffs* array size
...
Fixes corruption of context
Fixes: 8835659dde6a4f7dcdf341de6a45c6c8-signal_sigsegv_1dce67b_4564_cov_2504444599_classical_22_16_1_14000_v3c_0_extend_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2a03eb4c99
avcodec/wmalosslessdec: use sizeof() instead of literal number
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6b18a6839b
avcodec/wmalosslessdec: shrink output on error so no uninitialized data is returned
...
Fixes use of uninitialized memory
partly fixes: msan_uninit-mem_7f7834b6a530_6473_luckynight-partial.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ae3856dcaf
avcodec/wmalosslessdec: deallocate uninitialized frame on decode_tilehdr() failure
...
Fixes use of uninitialized memory
partly fixes: msan_uninit-mem_7f7834b6a530_6473_luckynight-partial.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
03fff09b32
avcodec/wmalosslessdec: Pass on error code from decode_tilehdr()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e2742d6ad6
avcodec/wmalosslessdec: completely initialize contains_subframe
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f60c46325d7_6415_luckynight.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4fb14f8492
avcodec/wmalosslessdec: fix data flushing at the end
...
Fixes ffplay -autoexit
Fixes Ticket3000
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
286beebdc3
avcodec/wmalosslessdec: check block_align
...
Code copied from wmaprodec
Fixes null pointer dereference
Fixes Ticket3002
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
851a6e2f1a
avcodec/wmalosslessdec: Fix return code for invalid buffer sizes
...
Fixes infinite loop
Fixes Ticket2979
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
Paul B Mahol
4511973901
wmalosslessdec: do not set avctx->coded_frame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
6471f63da2
wmalosslessdec: make arrays indexed by ch large enough for maximum number of channels
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
f3298f1299
Return proper error code after av_log_ask_for_sample()
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Diego Biurrun
8f4c414df6
Improve wording and spelling of av_log_missing_feature messages.
12 years ago
Justin Ruggles
2725ce7c7c
wmalossless: output in planar sample format
12 years ago
Michael Niedermayer
89074e9066
wmalosslessdec: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d65d834731
wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
...
Fixes CVE-2012-2799
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
6a99310fce
wmalosslessdec: Fix reading too many bits in decode_channel_residues()
...
Fixes a part of CVE-2012-2795
CC:libav-stable@libav.org
Based on a patch by Michael Niedermayer <michaelni@gmx.at>
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years ago
Michael Niedermayer
f48fbf2eb5
wmalosslessdec: fix a get_bits(0) in decode_ac_filter
...
Fixes a part of CVE-2012-2795
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Michael Niedermayer
607f57152c
wmalosslessdec: make MCLMS arrays big enough for what is written into them.
...
Fixes a part of CVE-2012-2795
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
065b3a1cfa
wmalosslessdec: increase channel_coeffs/residues size
...
Fixes CVE-2012-2792
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years ago
Anton Khirnov
4a969030e4
wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
12 years ago
Michael Niedermayer
b0545800bd
wmalosslessdec: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
30b1961c66
Mark a number of variables only used in av_dlog() calls as av_unused.
...
This fixes a number of unused-but-set gcc warnings.
13 years ago