Michael Niedermayer
1be9a28f8e
avcodec/rangecoder: factorize termination version code
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Andreas Cadhalpun
9637c2531f
sonic: make sure num_taps * channels is not larger than frame_size
...
If that is the case, the loop setting predictor_state in
sonic_decode_frame causes out of bounds reads of int_samples, which has
only frame_size number of elements.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Michael Niedermayer
6ae1a32d8a
avcodec/sonic: Check init_get_bits8() for failure
...
Fixes: CID1322310
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
e36db49b7b
avcodec: Add a min size parameter to ff_alloc_packet2()
...
This parameter can be used to inform the allocation code about how much
downsizing might occur, and can be used to optimize how to allocate the
packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Andreas Cadhalpun
58995f647b
sonic: set avctx->channels in sonic_decode_init
...
Otherwise it can be 0 in sonic_decode_frame, causing SIGFPE crashes.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
10 years ago
Michael Niedermayer
ade8a46154
avcodec/sonic: More completely check sample_rate_index and channels
...
Fixes CID1271783
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c131a9fead
avcodec/sonic: check memory allocations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6026a5ad4f
sonic: Switch to rangecoder
...
significantly improves compression rate
This also bumps version to 2 and drops support for version 0/1
If someone used version 0/1 despite their experimental status then support
for these can and should be added back
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c61daa68e4
avcodec/sonic: add larger version and minor_version fields with version >= 2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4c32629b82
avcodec/sonic: move version to the context
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ec4d761c74
avcodec/sonic: fix memleaks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8477e63d3c
sonic: use M_SQRT2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325
.
11 years ago
Michael Niedermayer
6d05039c7e
avcodec/sonic: Fix usage of init_get_bits() and use init_get_bits8()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9375f5003d
sonic: use av_freep() as its safer than av_free()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
69d0a2922f
sonic: cleanup/simplify num_taps check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
db27dadcb0
sonic: replace divide() by ROUNDED_DIV()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
730e07f10b
sonic: avoid float sqrt() for integer input & output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4ec7ef56bd
sonic: simplify quant cliping
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bcb42fb6db
sonic: use av_calloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
37c7a8be19
sonic: replace literal numbers by sizeof()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
081a7f3ed0
sonic: replace some float by integers to improve platform independance
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
12de2933da
sonic: Improve error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8689ee0eef
sonic: simplify shift_down()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ddefb80c95
sonicenc: fix off by 1 error
...
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
694c2d1ab3
sonicenc: dont put multiple assignments per line
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6df61c3ae0
sonicenc: set supported samples formats array
...
This ensures that only supported formats are input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
dc5c029f02
sonicenc: don't allocate unused avctx->coded_frame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
4aa8503399
sonicdec: update to new buffer API
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
85d7f54662
sonicenc: fix mono decorrelation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6ec037c5a9
sonicdec: fix frame size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1426291eb8
sonicdec: check decorrelation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
James Zern
bcaf64b605
normalize calls to ff_alloc_packet2
...
- check ret < 0
- remove excessive error log
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0b2ac679e2
sonic: factorize tail_size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
512beea529
sonicenc: limit quant so that golomb codes are less than 32 bits long
...
before they could become 33 bits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a44cbc1cbc
sonic: update to encode2() API
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8a0cd58729
sonic: fix FPE
...
Fixes Ticket1397
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
7ed9abf793
sonic: mark as experimental
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
89cd95b19c
sonic: fix warning about incompatible pointer types
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6f9803e5e0
sonic: update to new API
...
Fixes Ticket1075
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
ba10207bbe
Use more designated initializers.
...
Also remove some pointless NULL/0 assigments.
C++ code must be left as it is because named struct
initializers are not supported by C++ standard.
13 years ago
Justin Ruggles
d7c91c4cea
sonic: fix sonic decoder to match encoder for sample rates other than 44100.
14 years ago
Mans Rullgard
42cfb3835b
Remove Sonic experimental audio codec
...
Since initially committed in 2004, this codec has only been touched
for maintenanance. Functionally, it contains no novel ideas and
its intended audience is better served by existing mature codecs.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69
)
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Stefano Sabatini
5d6e4c160a
Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
...
SampleFormat with AVSampleFormat.
Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
72415b2adb
Define AVMediaType enum, and use it instead of enum CodecType, which
...
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago