Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Michael Niedermayer
3ba1050292
avcodec/imc: dont read bits beyond the end
...
Fixes use of uninitialized memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
cbf09545f2
avcodec/imc: only check remaining bits in case bits will be read
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
291747581e
imc: make issue non-fatal
...
The "faulty" samples actually sound fine when ignoring this issue.
For ticket #3886 , more samples are decoded.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
21ded9ce67
avcodec/imc: Use avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
1ac5a29b2e
imc: fix order of operations in coefficients read
...
Reported-by: Ruoyu <liangry@ucweb.com>
10 years ago
Michael Niedermayer
7444cf9a9c
avcodec/imc: Fix bitstream buffer padding
...
Fixes buffer overread
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
4728cdd880
imc: reject files with unfathomable sampling rates
...
With huge sampling rates, the table derivation method does not converge fast
enough. While fixing it using e.g. Newton-Rhapson-like methods (the curve is
nicely convex) is possible, it is much simpler to reject these cases.
The value of 96000 was arbitrarily chosen as a realistic value, though
1000000 would still work and converge.
Fixes ticket #3868 .
Suggested-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
c67b449beb
dsputil: Split bswap*_buf() off into a separate context
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
3e0c78bac6
avcodec/imc: Check flcoeffs5
...
Fixes infinite loop
Fixes Ticket2996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Kostya Shishkov
4eb4bb3a02
imc: support mode 1
11 years ago
Luca Barbato
87fb18c3e4
imc: Catch a division by zero
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Kostya Shishkov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
bbf6a4aa20
imc: Catch a division by zero
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
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
Justin Ruggles
9b28e58357
imc/iac: decode directly to the user-provided AVFrame
12 years ago
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
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
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
Michael Niedermayer
b5b9686615
imc: flush decoder
...
Fixes Ticket1899
Based on code by ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2f74f8d7dc
imc: sanity check scalefactors.
...
This fixes undefined behavior
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Justin Ruggles
1c7a016153
imc: set channels to 1 instead of validating it
12 years ago
Justin Ruggles
3fca0d7210
iac/imc: use planar sample format
12 years ago
Diego Biurrun
1218777ffd
avcodec: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Diego Biurrun
6f6b0311a3
avcodec: Drop some silly commented-out av_log() invocations
12 years ago
Michael Niedermayer
363d302ea3
imc: use exp2 instead of pow(2,...)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
d752509b74
Use log2(x) instead of log(x) / log(2)
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Mans Rullgard
b40ea0f41d
imc: remove unused field IMCContext.one_div_log2
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
bc90230b98
imc: fix size of a memset()
...
IMCContext was changed from an array to a pointer in 66b84e4
,
but this memset() was not updated.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
2b6804328e
imc: remove empty if() block
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
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
Kostya Shishkov
cac4760bf4
iac: generate codec tables as they are supposed to be
...
Unlike its predecessor, Indeo Audio codec generates tables depending on
sampling rate. Previously decoder used pre-generated tables for 22050 Hz
which obviously doesn't work with other frequencies.
Many thanks to Maxim Poliakovsky for providing all needed information
for this.
13 years ago
Kostya Shishkov
c6061443f7
Indeo Audio decoder
13 years ago
Kostya Shishkov
34271cabac
imc: make IMDCT support stereo output
...
This will be useful for Indeo Audio decoder which is almost the same
but supports stereo.
13 years ago
Kostya Shishkov
c45e2da617
imc: move channel-specific data into separate context
...
This will be useful for Indeo Audio decoder which is almost the same
but supports stereo.
13 years ago
Kostya Shishkov
d073f122ea
imc: some cosmetics
13 years ago
Kostya Shishkov
f05b69a79f
fix typo in comment
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
9cf0841ef3
dsputil: Add ff_ prefix to the dsputil*_init* functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Mans Rullgard
a1e98f198e
get_bits: remove A32 variant
...
The A32 bitstream reader variant is only used on ARMv5 and for
Prores due to the larger bit cache this decoder requires.
In benchmarks on ARMv5 (Marvell Sheeva) with gcc 4.6, the only
statistically significant difference between ALT and A32 is
a 4% advantage for ALT in FLAC decoding. There is thus no (longer)
any reason to keep the A32 reader from this point of view.
This patch adds an option to the ALT reader increasing the bit
cache to 32 bits as required by the Prores decoder. Benchmarking
shows no significant change in speed on Intel i7. Again, the
A32 reader fails to justify its existence.
Signed-off-by: Mans Rullgard <mans@mansr.com>
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
Justin Ruggles
a4998e448f
imc: return error codes instead of 0 for error conditions.
...
This fixes a bug where the whole buffer was returned as decoded audio due to
*data_size not being set to zero and the return value being >= 0.
13 years ago
Justin Ruggles
08e5cd3810
imc: return meaningful error codes instead of -1
13 years ago
Justin Ruggles
0473f29b60
imc: do not set channel layout for stereo
...
we only support decoding of mono imc
13 years ago
Justin Ruggles
7b7f47e733
imc: validate channel count
...
ask for a sample if not mono
13 years ago