Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Diego Biurrun
0f40c90984
Drop pointless assert.h #includes
9 years ago
Ganesh Ajjanagadde
db1a642cd2
all: move ff_exp10, ff_exp10f, ff_fast_powf to lavu/ffmath.h
...
The idea is to use ffmath.h for internal implementations of math functions.
Currently, it is used for variants of libm functions, but is by no means
limited to such things.
Note that this is not exported; use lavu/mathematics for such purposes.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
9 years ago
Ganesh Ajjanagadde
1fb5ae44c4
lavc/wmadec: replace pow by faster functions
...
Further speedups possible by getting rid of exp2f...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Ganesh Ajjanagadde
62765c0014
lavc/wmadec: replace pow(10,x) by ff_exp10(x)
...
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
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
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
a48b24e5eb
avcodec/wmadec: Fix undefined shift in wma_decode_block()
...
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
305cbe76d3
avcodec/wma: remove unneeded #includes, there are no assert() only av_assert*
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e2db9a736f
avcodec/wmadec: fix 0 frame bit_reservoir
...
Fixes Ticket968
partly fixes Ticket691
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a8bc901033
avcodec/wmadec: also print the number of bits left in the nb_frames <= 0 case
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2fbb9e647c
avcodec/wma: Use avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gabriel Dume
d2a4e4b9cc
wma: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Carl Eugen Hoyos
ced0d6c14d
Use correct msvc type specifiers for ptrdiff_t and size_t.
...
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472 .
Reviewed-by: Ronald Bultje
11 years ago
Michael Niedermayer
d1122b7ce5
avcodec/wmadec: initialize max_exponent to valid values
...
Fixes generation of NaN output
Fixes: nan_example.wma
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
Carl Eugen Hoyos
ec8a4841f7
Avoid a deadlock when decoding wma.
...
Fixes ticket #2925 .
11 years ago
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
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
ea1136baaf
wmadec: require block_align to be set.
...
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
6c6dc8ccea
wmadec: check nb_frames
...
Improves error message for Ticket968
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
c815ca3641
wma: decode directly to the user-provided AVFrame
12 years ago
Ronald S. Bultje
5959bfaca3
floatdsp: move butterflies_float from dsputil to avfloatdsp.
...
This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
12 years ago
Ronald S. Bultje
42d3246948
floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
...
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
12 years ago
Ronald S. Bultje
55aa03b9f8
floatdsp: move vector_fmul_add from dsputil to avfloatdsp.
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
Justin Ruggles
2ed40608e9
wma: do not keep private copies of some AVCodecContext fields
...
channels, sample_rate, bit_rate, and block_align can be used directly from
the AVCodecContext
12 years ago
Justin Ruggles
7ebfe5b44a
wmadec: use float planar sample format output
12 years ago
Diego Biurrun
d25fe4cc65
wmadec: Adjust debug printf argument length modifier
12 years ago
Diego Biurrun
1218777ffd
avcodec: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Diego Biurrun
9c6cf7f2c9
avcodec: Drop silly and/or broken printf debug output
12 years ago
Diego Biurrun
6f6b0311a3
avcodec: Drop some silly commented-out av_log() invocations
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Paul B Mahol
137e80817d
lavc: build some codecs only if they are actually enabled
...
Saves few bytes if only some of them in same file are enabled.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Ronald S. Bultje
b4bccf3e4e
wma: fix off-by-one in array bounds check.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
349b7977e4
wma: fix invalid buffer size assumptions causing random overreads.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Michael Niedermayer
d964db5742
wmadec: fix off by 1 error on the pow_tab index check.
...
Fixes global out of array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
9d3050d3e9
wma: don't return 0 on invalid packets.
...
Return 0 means "please return the same data again", i.e. it causes an
infinite loop. Instead, return an error.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Alex Converse
48f1e5212c
wmadec: Verify bitstream size makes sense before calling init_get_bits.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
13 years ago
Justin Ruggles
0eea212943
Add avcodec_decode_audio4().
...
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
13 years ago
Michael Niedermayer
20431a9982
wma: Check channel number before init.
...
Fixes Ticket240
Based on patch by ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
d0b1b1c5c7
wmadec: consolidate 2 output buffer size checks into 1 check
13 years ago
Diego Biurrun
8671488799
Use explicit struct initializers for AVCodec declarations.
13 years ago
Michael Niedermayer
3cb64e327a
wma: fix infinite loop
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
eb97d4d611
wmadec: avoid infinit loop.
...
Fixes ticket183
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Diego Biurrun
2e15305b70
Remove some disabled printf debug cruft.
14 years ago
Michael Niedermayer
f08d171caa
WMADEC: fix ticket125
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
05815b3545
Fix issue1503, this fix may be incomplete we need more samples to know for sure.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago