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>
2015-06-09 23:21:51 +02:00
Michael Niedermayer
ade8a46154
avcodec/sonic: More completely check sample_rate_index and channels
...
Fixes CID1271783
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 17:31:58 +02:00
Michael Niedermayer
c131a9fead
avcodec/sonic: check memory allocations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 17:26:54 +02:00
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>
2013-12-10 16:18:51 +01:00
Michael Niedermayer
c61daa68e4
avcodec/sonic: add larger version and minor_version fields with version >= 2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 15:56:01 +01:00
Michael Niedermayer
4c32629b82
avcodec/sonic: move version to the context
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 15:50:12 +01:00
Michael Niedermayer
ec4d761c74
avcodec/sonic: fix memleaks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 14:42:17 +01:00
Michael Niedermayer
8477e63d3c
sonic: use M_SQRT2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 14:38:38 +01:00
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325
.
2013-10-04 13:33:20 +00:00
Michael Niedermayer
6d05039c7e
avcodec/sonic: Fix usage of init_get_bits() and use init_get_bits8()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 13:40:08 +02:00
Michael Niedermayer
9375f5003d
sonic: use av_freep() as its safer than av_free()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23 19:45:39 +02:00
Michael Niedermayer
69d0a2922f
sonic: cleanup/simplify num_taps check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23 19:44:24 +02:00
Michael Niedermayer
db27dadcb0
sonic: replace divide() by ROUNDED_DIV()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23 19:42:24 +02:00
Michael Niedermayer
730e07f10b
sonic: avoid float sqrt() for integer input & output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23 01:35:34 +02:00
Michael Niedermayer
4ec7ef56bd
sonic: simplify quant cliping
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23 01:35:34 +02:00
Michael Niedermayer
bcb42fb6db
sonic: use av_calloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23 01:26:18 +02:00
Michael Niedermayer
37c7a8be19
sonic: replace literal numbers by sizeof()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22 22:25:18 +02:00
Michael Niedermayer
081a7f3ed0
sonic: replace some float by integers to improve platform independance
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22 21:58:13 +02:00
Michael Niedermayer
12de2933da
sonic: Improve error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22 21:42:04 +02:00
Michael Niedermayer
8689ee0eef
sonic: simplify shift_down()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22 21:34:11 +02:00
Michael Niedermayer
ddefb80c95
sonicenc: fix off by 1 error
...
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19 10:06:38 +02:00
Michael Niedermayer
694c2d1ab3
sonicenc: dont put multiple assignments per line
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19 10:06:10 +02:00
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>
2013-06-19 09:50:01 +02:00
Paul B Mahol
dc5c029f02
sonicenc: don't allocate unused avctx->coded_frame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-06-07 09:29:34 +00:00
Michael Niedermayer
4aa8503399
sonicdec: update to new buffer API
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 16:01:53 +01:00
Michael Niedermayer
85d7f54662
sonicenc: fix mono decorrelation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 15:49:22 +01:00
Michael Niedermayer
6ec037c5a9
sonicdec: fix frame size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 15:46:16 +01:00
Michael Niedermayer
1426291eb8
sonicdec: check decorrelation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 15:45:59 +01:00
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.
2013-03-13 19:00:10 +01:00
Michael Niedermayer
80e9e63c94
Merge commit '759001c534287a96dc96d1e274665feb7059145d'
...
* commit '759001c534287a96dc96d1e274665feb7059145d':
lavc decoders: work with refcounted frames.
Anton Khirnov (1):
lavc decoders: work with refcounted frames.
Clément Bœsch (47):
lavc/ansi: reset file
lavc/ansi: re-do refcounted frame changes from Anton
fraps: reset file
lavc/fraps: switch to refcounted frames
gifdec: reset file
lavc/gifdec: switch to refcounted frames
dsicinav: resolve conflicts
smc: resolve conflicts
zmbv: resolve conflicts
rpza: resolve conflicts
vble: resolve conflicts
xxan: resolve conflicts
targa: resolve conflicts
vmnc: resolve conflicts
utvideodec: resolve conflicts
tscc: resolve conflicts
ulti: resolve conflicts
ffv1dec: resolve conflicts
dnxhddec: resolve conflicts
v210dec: resolve conflicts
vp3: resolve conflicts
vcr1: resolve conflicts
v210x: resolve conflicts
wavpack: resolve conflicts
pngdec: fix compilation
roqvideodec: resolve conflicts
pictordec: resolve conflicts
mdec: resolve conflicts
tiertexseqv: resolve conflicts
smacker: resolve conflicts
vb: resolve conflicts
vqavideo: resolve conflicts
xl: resolve conflicts
tmv: resolve conflicts
vmdav: resolve conflicts
truemotion1: resolve conflicts
truemotion2: resolve conflicts
lcldec: fix compilation
libcelt_dec: fix compilation
qdrw: fix compilation
r210dec: fix compilation
rl2: fix compilation
wnv1: fix compilation
yop: fix compilation
tiff: resolve conflicts
interplayvideo: fix compilation
qpeg: resolve conflicts (FIXME/TESTME).
Hendrik Leppkes (33):
012v: convert to refcounted frames
8bps: fix compilation
8svx: resolve conflicts
4xm: resolve conflicts
aasc: resolve conflicts
bfi: fix compilation
aura: fix compilation
alsdec: resolve conflicts
avrndec: convert to refcounted frames
avuidec: convert to refcounted frames
bintext: convert to refcounted frames
cavsdec: resolve conflicts
brender_pix: convert to refcounted frames
cinepak: resolve conflicts
cinepak: avoid using AVFrame struct directly in private context
cljr: fix compilation
cpia: convert to refcounted frames
cscd: resolve conflicts
iff: resolve conflicts and do proper conversion to refcounted frames
4xm: fix reference frame handling
cyuv: fix compilation
dxa: fix compilation
eacmv: fix compilation
eamad: fix compilation
eatgv: fix compilation
escape124: remove unused variable.
escape130: convert to refcounted frames
evrcdec: convert to refcounted frames
exr: convert to refcounted frames
mvcdec: convert to refcounted frames
paf: properly free the frame data on decode close
sgirle: convert to refcounted frames
lavfi/moviesrc: use refcounted frames
Michael Niedermayer (56):
Merge commit '759001c534287a96dc96d1e274665feb7059145d'
resolve conflicts in headers
motion_est: resolve conflict
mpeg4videodec: fix conflicts
dpcm conflict fix
dpx: fix conflicts
indeo3: resolve confilcts
kmvc: resolve conflicts
kmvc: resolve conflicts
h264: resolve conflicts
utils: resolve conflicts
rawdec: resolve conflcits
mpegvideo: resolve conflicts
svq1enc: resolve conflicts
mpegvideo: dont clear data, fix assertion failure on fate vsynth1 with threads
pthreads: resolve conflicts
frame_thread_encoder: simple compilefix not yet tested
snow: update to buffer refs
crytsalhd: fix compile
dirac: switch to new API
sonic: update to new API
svq1: resolve conflict, update to new API
ffwavesynth: update to new buffer API
g729: update to new API
indeo5: fix compile
j2kdec: update to new buffer API
linopencore-amr: fix compile
libvorbisdec: update to new API
loco: fix compile
paf: update to new API
proresdec: update to new API
vp56: update to new api / resolve conflicts
xface: convert to refcounted frames
xan: fix compile&fate
v408: update to ref counted buffers
v308: update to ref counted buffers
yuv4dec: update to ref counted buffers
y41p: update to ref counted frames
xbm: update to refcounted frames
targa_y216: update to refcounted buffers
qpeg: fix fate/crash
cdxl: fix fate
tscc: fix reget buffer useage
targa_y216dec: fix style
msmpeg4: fix fate
h264: ref_picture() copy fields that have been lost too
update_frame_pool: use channel field
h264: Put code that prevents deadlocks back
mpegvideo: dont allow last == current
wmalossless: fix buffer ref messup
ff_alloc_picture: free tables in case of dimension mismatches
h264: fix null pointer dereference and assertion failure
frame_thread_encoder: update to bufrefs
ec: fix used arrays
snowdec: fix off by 1 error in dimensions check
h264: disallow single unpaired fields as references of frames
Paul B Mahol (2):
lavc/vima: convert to refcounted frames
sanm: convert to refcounted frames
Conflicts:
libavcodec/4xm.c
libavcodec/8bps.c
libavcodec/8svx.c
libavcodec/aasc.c
libavcodec/alsdec.c
libavcodec/anm.c
libavcodec/ansi.c
libavcodec/avs.c
libavcodec/bethsoftvideo.c
libavcodec/bfi.c
libavcodec/c93.c
libavcodec/cavsdec.c
libavcodec/cdgraphics.c
libavcodec/cinepak.c
libavcodec/cljr.c
libavcodec/cscd.c
libavcodec/dnxhddec.c
libavcodec/dpcm.c
libavcodec/dpx.c
libavcodec/dsicinav.c
libavcodec/dvdec.c
libavcodec/dxa.c
libavcodec/eacmv.c
libavcodec/eamad.c
libavcodec/eatgq.c
libavcodec/eatgv.c
libavcodec/eatqi.c
libavcodec/error_resilience.c
libavcodec/escape124.c
libavcodec/ffv1.h
libavcodec/ffv1dec.c
libavcodec/flicvideo.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/g723_1.c
libavcodec/gifdec.c
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_direct.c
libavcodec/h264_loopfilter.c
libavcodec/h264_refs.c
libavcodec/huffyuvdec.c
libavcodec/idcinvideo.c
libavcodec/iff.c
libavcodec/indeo2.c
libavcodec/indeo3.c
libavcodec/internal.h
libavcodec/interplayvideo.c
libavcodec/ivi_common.c
libavcodec/jvdec.c
libavcodec/kgv1dec.c
libavcodec/kmvc.c
libavcodec/lagarith.c
libavcodec/libopenjpegdec.c
libavcodec/mdec.c
libavcodec/mimic.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mmvideo.c
libavcodec/motion_est.c
libavcodec/motionpixels.c
libavcodec/mpc7.c
libavcodec/mpeg12.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/msrle.c
libavcodec/msvideo1.c
libavcodec/nuv.c
libavcodec/options_table.h
libavcodec/pcx.c
libavcodec/pictordec.c
libavcodec/pngdec.c
libavcodec/pnmdec.c
libavcodec/pthread.c
libavcodec/qpeg.c
libavcodec/qtrle.c
libavcodec/r210dec.c
libavcodec/rawdec.c
libavcodec/roqvideodec.c
libavcodec/rpza.c
libavcodec/smacker.c
libavcodec/smc.c
libavcodec/svq1dec.c
libavcodec/svq1enc.c
libavcodec/targa.c
libavcodec/tiertexseqv.c
libavcodec/tiff.c
libavcodec/tmv.c
libavcodec/truemotion1.c
libavcodec/truemotion2.c
libavcodec/tscc.c
libavcodec/ulti.c
libavcodec/utils.c
libavcodec/utvideodec.c
libavcodec/v210dec.c
libavcodec/v210x.c
libavcodec/vb.c
libavcodec/vble.c
libavcodec/vcr1.c
libavcodec/vmdav.c
libavcodec/vmnc.c
libavcodec/vp3.c
libavcodec/vp56.c
libavcodec/vp56.h
libavcodec/vp6.c
libavcodec/vqavideo.c
libavcodec/wavpack.c
libavcodec/xl.c
libavcodec/xxan.c
libavcodec/zmbv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 03:23:28 +01:00
James Zern
bcaf64b605
normalize calls to ff_alloc_packet2
...
- check ret < 0
- remove excessive error log
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-06 22:11:46 +01:00
Michael Niedermayer
874c5b02c4
Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'
...
* commit '594d4d5df3c70404168701dd5c90b7e6e5587793':
lavc: add a wrapper for AVCodecContext.get_buffer().
Conflicts:
libavcodec/4xm.c
libavcodec/8svx.c
libavcodec/bmv.c
libavcodec/cljr.c
libavcodec/cscd.c
libavcodec/dnxhddec.c
libavcodec/dpcm.c
libavcodec/dpx.c
libavcodec/eacmv.c
libavcodec/eamad.c
libavcodec/frwu.c
libavcodec/g723_1.c
libavcodec/gifdec.c
libavcodec/idcinvideo.c
libavcodec/iff.c
libavcodec/indeo3.c
libavcodec/internal.h
libavcodec/interplayvideo.c
libavcodec/kmvc.c
libavcodec/mpc7.c
libavcodec/mpegaudiodec.c
libavcodec/pcx.c
libavcodec/pngdec.c
libavcodec/pnmdec.c
libavcodec/rl2.c
libavcodec/snow.c
libavcodec/targa.c
libavcodec/tscc.c
libavcodec/txd.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/vb.c
libavcodec/vmdav.c
libavcodec/vp56.c
libavcodec/vqavideo.c
libavcodec/wavpack.c
libavcodec/wnv1.c
libavcodec/xl.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 15:18:12 +01:00
Michael Niedermayer
0b2ac679e2
sonic: factorize tail_size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-18 17:37:41 +02:00
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>
2012-09-18 17:33:55 +02:00
Michael Niedermayer
a44cbc1cbc
sonic: update to encode2() API
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-18 15:45:07 +02:00
Michael Niedermayer
7a72695c05
Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
...
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
Replace all CODEC_ID_* with AV_CODEC_ID_*
lavc: add AV prefix to codec ids.
Conflicts:
doc/APIchanges
doc/examples/decoding_encoding.c
doc/examples/muxing.c
ffmpeg.c
ffprobe.c
ffserver.c
libavcodec/8svx.c
libavcodec/avcodec.h
libavcodec/dnxhd_parser.c
libavcodec/dvdsubdec.c
libavcodec/error_resilience.c
libavcodec/h263dec.c
libavcodec/libvorbisenc.c
libavcodec/mjpeg_parser.c
libavcodec/mjpegenc.c
libavcodec/mpeg12.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/pcm.c
libavcodec/r210dec.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/version.h
libavdevice/alsa-audio-dec.c
libavdevice/bktr.c
libavdevice/v4l2.c
libavformat/asfdec.c
libavformat/asfenc.c
libavformat/avformat.h
libavformat/avidec.c
libavformat/caf.c
libavformat/electronicarts.c
libavformat/flacdec.c
libavformat/flvdec.c
libavformat/flvenc.c
libavformat/framecrcenc.c
libavformat/img2.c
libavformat/img2dec.c
libavformat/img2enc.c
libavformat/ipmovie.c
libavformat/isom.c
libavformat/matroska.c
libavformat/matroskadec.c
libavformat/matroskaenc.c
libavformat/mov.c
libavformat/movenc.c
libavformat/mp3dec.c
libavformat/mpeg.c
libavformat/mpegts.c
libavformat/mxf.c
libavformat/mxfdec.c
libavformat/mxfenc.c
libavformat/nsvdec.c
libavformat/nut.c
libavformat/oggenc.c
libavformat/pmpdec.c
libavformat/rawdec.c
libavformat/rawenc.c
libavformat/riff.c
libavformat/sdp.c
libavformat/utils.c
libavformat/vocenc.c
libavformat/wtv.c
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00
Michael Niedermayer
8a0cd58729
sonic: fix FPE
...
Fixes Ticket1397
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-26 00:38:05 +02:00
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>
2012-03-24 17:48:03 +01:00
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>
2012-03-23 19:03:45 +01:00
Michael Niedermayer
6f9803e5e0
sonic: update to new API
...
Fixes Ticket1075
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-16 15:11:18 +01:00
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.
2011-12-30 20:00:53 +01:00
Justin Ruggles
d7c91c4cea
sonic: fix sonic decoder to match encoder for sample rates other than 44100.
2011-05-04 23:33:59 +02:00
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>
2011-03-19 15:24:31 +00:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
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
)
2011-01-28 03:15:34 +01:00
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>
2011-01-26 16:08:45 +00:00
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
2010-11-12 11:04:40 +00:00
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
2010-04-20 14:45:34 +00:00
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
2010-03-30 23:30:55 +00:00
Diego Biurrun
359a9979ad
cosmetics: Move some code blocks to reduce the number of #ifdefs.
...
Originally committed as revision 19442 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-16 21:37:58 +00:00