Michael Niedermayer
052e692e85
avcodec/ac3dec: Print the value of out of range exponents
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
7b11eead1b
avcodec/ac3: always use hardcoded tables
...
The table in question is a 253 byte one. In fact, it turns out that
dynamic generation of the table results in an increased binary size.
Code compiled with GCC 5.2.0, x86-64 (size in bytes), before and after
patch:
old: 62321064 libavcodec/libavcodec.so.57
new: 62320536 libavcodec/libavcodec.so.57
Thus, it always make sense to statically allocate this.
Tested with FATE with/without --enable-hardcoded-tables.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Andreas Cadhalpun
957f92729a
avcodec: drop 2 suffix from avpriv_ac3_parse_header2
...
avpriv_ac3_parse_header was removed in commit 3dfb643
.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Vittorio Giovara
dc70c19476
lavc: Drop deprecated request_channels related functions
...
Deprecated in 04/2011.
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
Michael Niedermayer
71258e5d87
avcodec/ac3dec: Put CONFIG* first in if()
...
This may fix build failures with EAC3 disabled and is more consistent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
bf2bd5b807
avcodec/ac3dec_fixed: fix compilation when ac3dec is disabled
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Michael Niedermayer
94ccbad488
avcodec/ac3dec: Fix undefined shifts
...
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
73ebbfdff0
ac3dec: cosmetics
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
c4bf3833f4
ac3_fixed: fix computation of spx_noise_blend
...
It was set to 1 instead of sqrt(3)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Christophe Gisquet
b083440060
ac3_fixed: fix out-of-bound read
...
Should also improve decoding, but actually doesn't...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Paul B Mahol
c93a7b264f
avcodec/ac3dec: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Michael Niedermayer
8bce5c8e74
avcodec/ac3dec: Use avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Jean-Francois Thibert
12df9b9a15
Improved AC3 decoder level support (heavy drc, dialnorm)
...
Added support for AC3 heavy dynamic range compression used
to restrict the output range and added a setting to specify
the output target level and use the dialog normalization
field to apply it in the digital domain.
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
Michael Niedermayer
c00f368caa
avcodec/ac3dec: use av_freep() for saftey
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
91b105ce5b
avcodec/ac3dec: avoid #if, use if() instead, its cleaner and shorter
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nedeljko Babic <nbabic@mips.com>
11 years ago
Michael Niedermayer
b219142921
avcodec/ac3: rename identifier used to select the fixed point variant
...
the CONFIG_ prefix is used by configure, using it for other things
is potentially confusing to the reader
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nedeljko Babic <nbabic@mips.com>
11 years ago
Nedeljko Babic
696e34a6e1
libavcodec: Implementation of AC3 fixedpoint decoder
...
Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
eadc21cfe7
avcodec/ac3_parser: add avpriv_ac3_parse_header2() and use it in libavcodec
...
The new function has the ability to allocate the structure, allowing it to grow
without needing major bumps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Tim Walker
9cd4bc4176
ac3dec: set AV_FRAME_DATA_DOWNMIX_INFO side data.
11 years ago
John Stebbins
23d461fe87
ac3dec: Allow asymmetric application of DRC when drc_scale > 1
...
Amplification of quiet sounds is enhanced.
Inspired by gbooker's A52Decoder.
11 years ago
Tim Walker
ade75fb811
(e)ac3: clip surround mix level indexes.
...
Values 0-2 are reserved, 3 (-1.5dB) should be used instead.
11 years ago
Tim Walker
c229f571fd
(e)ac3: parse and store the Lt/Rt and LFE mix levels.
11 years ago
Tim Walker
1f604f96ea
ac3: set default matrix encoding modes in parse_frame_header.
...
Deduplicates some code.
11 years ago
Tim Walker
7840c40445
(e)ac3dec: set AV_FRAME_DATA_MATRIXENCODING side data.
11 years ago
Tim Walker
13345fc1f8
(e)ac3: parse and store the Dolby Surround, Surround EX and Headphone mode flags.
11 years ago
John Stebbins
c9ca220ef2
ac3dec: make drc_scale exponentially
...
The a52 spec suggests that "partial compression" should scale the
drc value in this manner.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Michael Niedermayer
4782c4284f
avcodec/ac3dec: check bap before use.
...
Fixes out of array read
Fixes assertion failure
Fixes asan_static-oob_16431c0_8036_rio_bravo_mono_64_spx.ac3
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Tim Walker
48b24bd2d2
ac3dec: Fix out-of-array read
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
2cbf27b08a
libavcodec/ac3dec: fix channel_layout
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Tim Walker
d4df02131b
ac3dec: Remove write-only channel_layout field from AC3DecodeContext
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Tim Walker
b532854622
ac3: implement request_channel_layout.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Tim Walker
ffb0af7f17
ac3dec: simplify an expression
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
6c82c87dbb
ac3dec: fix outptr increment.
...
Fixes corrupt data errors when downmixing in the AC-3 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
11 years ago
Anton Khirnov
23a211cbba
lavc: change all decoders to behave consistently with AV_EF_CRCCHECK.
...
Just crccheck prints a warning, crccheck+explode returns an error.
Also document this behavior.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Luca Barbato
b1f9cdc37f
ac3: Return proper error codes
11 years ago
Luca Barbato
818d1f1a3e
ac3: Clean up the error paths
11 years ago
Christophe Gisquet
b6293e2798
fmtconvert: Explicitly use int32_t instead of int
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Martin Storsjö
8f24c12be7
ac3dec: Don't consume more data than the actual input packet size
...
This was handled properly in the normal return case at the end
of the function, but not in this special case.
Returning a value larger than the input packet size can cause
problems for certain library users.
Returning the actual input buffer size unconditionally, since
it is not guaranteed that frame_size is set to a sensible
value at this point.
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
031be5b41b
ac3dec: Consistently use AC3_BLOCK_SIZE and sizeof
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
68e57cde68
ac3dec: Increment channel pointers only once per channel
...
If the channel mapping map multiple output channels to one
input channel, we should only increment the actual pointer once.
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Christophe Gisquet
f49564c607
fmtconvert: int32_t input to int32_to_float_fmul_scalar
...
It was previously declared as int.
Does not change fate results for x86.
Conflicts:
libavcodec/ppc/fmtconvert_altivec.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> 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
Michael Niedermayer
e0f716a9d9
ac3dec: use AVFrame accessor functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago