Ganesh Ajjanagadde
26ac80d235
lavc/imc: 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
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Andreas Cadhalpun
75fd5ce4c1
imc: use correct position for flcoeffs2 calculation
...
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.
This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3
without updating the position.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
1410eeb6ea
imc: Use correct position for flcoeffs2 calculation
...
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.
This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3
without updating the position.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Janne Grunau
210921722b
imc: add required padding for GetBitContext buffer
...
Fixes stack buffer overflow errors detected by address sanitizer in
fate-imc.
CC: libav-stable@libav.org
10 years ago
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