Andreas Cadhalpun
05c57ba2f4
takdec: ensure chan2 is a valid channel index
...
If chan2 is not smaller than the number of channels, it can cause
segmentation faults due to dereferencing a NULL pointer.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
03616af2c9
Revert "takdec: pad filter coeff buffer for DSP functions"
...
This reverts commit e0c7ba40cf
.
Valgrind complains about invalid reads, which generate segfaults in some
systems.
10 years ago
Christophe Gisquet
e0c7ba40cf
takdec: pad filter coeff buffer for DSP functions
...
Currently, a part of the loop has to be handled in plain C, because of DSP
function requirements of having batches of 16 elements to process.
Instead, pad the buffer with 0 where the DSP functions are overreading.
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Peter Meerwald
9abc80f1ed
libavcodec: Make use of av_clip functions
...
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Vittorio Giovara
5ac06633cb
takdec: check av_samples_get_buffer_size() return value
...
CC: libav-stable@libav.org
Bug-Id: CID 747734
10 years ago
Michael Niedermayer
4fed019821
avcodec/takdec: remove unused variable
...
Found-by: CSA
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7dbc27dc1d
avcodec/takdec: move tmp declaration to where its used
...
Makes the code a bit easier to read
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
9a9e2f1c8a
dsputil: Split audio operations off into a separate context
11 years ago
Michael Niedermayer
ce4ae18405
avcodec/takdec: Always initialize hsize, silence "may be used uninitialized" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f58eab1512
avcodec/takdec: always check bits_per_raw_sample
...
Fixes out of array access
Fixes: asan_heap-oob_19c7a94_6470_cov_1453611734_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
2886d6cbb7
avcodec/takdec: also do crc check when er compliant is set
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Paul B Mahol
8491f40500
tak: use crc table from lavu
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
ff0bdf9375
lavc: copy AVCodecContext for threads
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
61d900fd0d
lavc: add ONLY_IF_THREADS_ENABLED where it is missing
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
d97044640c
takdec: frame multi-threading support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
13cb6ed3c4
takdec: simplify use of scalarproduct_int16 in decode_subframe()
...
Makes decoding little faster.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Justin Ruggles
4a2b26fc1b
tak: decode directly to the user-provided AVFrame
12 years ago
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
12 years ago
Paul B Mahol
9efceaf1f7
takdec: switch to init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4c7515286b
takdec: silence/fix warning for undefined behavior
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
cef28b5602
tak: reduce difference with qatar
...
Mostly cosmetics changes, but also makes
decoding little faster here.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Josh Allmann
b3deec3253
takdec: fix initialisation of LOCAL_ALIGNED array
...
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years ago
Mans Rullgard
cd71af90a9
takdec: fix initialisation of LOCAL_ALIGNED array
...
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Paul B Mahol
57231e4d5b
tak: demuxer, parser, and decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Paul B Mahol
6777aa6387
lavc/takdec: s/get_b/get_bits_esc4
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
1c779854b5
lavc/takdec: simplify code
...
Merge get_scale/get_shift into set_sample_rate_params().
Rename tak_set_bps to set_bps_params and remove 2nd argument.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
f8d68822c0
takdec: use samplefmt.h from libavutil
...
Instead of having own code for calculating decoded buffer size
just use already provided functions from libavutil.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4e4a95b18e
takdec: remove get_code() and use get_sbits() directly
...
As found by Justin, this is probably bug in reference decoder.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
0a8360c4f9
takdec: add .sample_fmts
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4dcf71aacc
takdec: stop decoding in case of unknown bps
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
56519d7d14
takdec: s/bits_per_coded_sample/bits_per_raw_sample
...
bits_per_coded_sample should be set from demuxer and
not from decoder.
Prior to this change value set from demuxer would get
overwritten in decoder.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
d7a4739265
TAK demuxer, decoder and parser
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago