Michael Niedermayer
22458ccbcc
avcodec/tta: use init_get_bits8()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
495db0e3b0
ttadec: frame multi-threading support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
0f740fea85
tta: use interger instead of pointer to iterate output samples for 24-bit case
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
e2f89f7804
tta: move GetBitContext out of private context
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
2e67dde954
tta: move code that will be shared with encoder to separate file
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
58b36959dd
tta: use get_unary()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
710940bec1
tta: stop checking header checksum in extradata
...
It's redundant now as check in done in demuxer instead.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
c4e0e31424
tta: remove pointless code
...
Checking seek table crc in decoder is pointless, as seek table is not used in
decoder anyway, so also stop storing seek table into extradata.
12 years ago
Paul B Mahol
7469be099e
lavc/tta: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Diego Biurrun
2832ea26f3
Remove commented-out debug #define cruft
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
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
James Almer
2e988fd689
lavc/tta: Use a safer check for encrypted streams
...
The user can provide a password even when the stream
is not encrypted, so check the value of s->format
instead of s->pass in ttafilter_init().
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
ad2104ba44
tta: decode directly to the user-provided AVFrame
12 years ago
James Almer
0957041221
lavc/tta: Add support for encrypted streams
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
056664ff25
lavc/tta: remove nonsense s->avctx indirection, use avctx directly
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Justin Ruggles
5778299c7e
ttadec: fix last frame handling when seeking
...
Using a frame count, as is done currently, does not work at all with
seeking. Instead, when the number of samples in the final frame has
been decoded, we check if only the 32-bit CRC is remaining. If so, we
assume that it is the final frame.
There is no longer a need to keep total_frames in TTAContext.
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
Paul B Mahol
4ebf305951
lavc/tta: do not overwrite bits_per_coded_sample
...
It is supposed to be set in libavformat only.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
1ade37ae9c
lavc/tta: use meaningful error codes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Diego Biurrun
717addecad
Use proper return values in case of missing features
12 years ago
Paul B Mahol
01c9ffa913
tta: let samples declaration match cast
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
13 years ago
Aneesh Dogra
46ea46357a
tta: Fix comment about channel number; TTA supports >2 channels.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Ronald S. Bultje
ac80b812cd
tta: prevents overflows for 32bit integers in header.
...
This prevents sample_rate/data_length from going negative, which
caused various crashes and undefined behaviour further down.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
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
Michael Niedermayer
936951ca5c
tm2dec: check total_frames and extradata_size.
...
Fixes overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
15e07348fe
ttadec: refactor ttafilter_process()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
ea1d64ab10
ttadec: unbreak playback of matroska files
...
Matroska demuxer needs to recreate tta header, so just display
crc error without aborting.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Paul B Mahol
e04ca1d4ce
ttadec: cosmetics: reindent
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Justin Ruggles
f2a4559c77
ttadec: use branchless unsigned-to-signed unfolding
13 years ago
Paul B Mahol
323b9da969
ttadec: remove dead code
...
The unused code being removed is for encoding only and therefore is not needed
by the decoder.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Paul B Mahol
2af3dc8698
ttadec: CRC checking
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Paul B Mahol
07dbea7033
tta: reindent
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
7416d61036
tta: error out if samplerate is zero.
...
Prevents a division by zero later on.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Justin Ruggles
6ab681a4c1
ttadec: fix invalid free when an error occurs while decoding 24-bit tta
13 years ago
Michael Niedermayer
ed83f97235
tta: Add some safety precautions to avoid freeing things that have not been allocated.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
c6abf21492
tta: do not leak memory if bps == 3
...
In bps == 3 case output is decoded directly.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
9aff2d1753
tta: use skip_bits_long()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Justin Ruggles
01ed1c390d
tta: cast output data pointer to the correct type
...
fixes "warning: assignment from incompatible pointer type"
13 years ago
Paul B Mahol
dd319f17e6
tta: remove obsolete and useless error message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
52e9854a83
tta: fix 24-bit decoding.
...
Decode to the correct output buffer.
13 years ago
Michael Niedermayer
c88f0b728c
tta: Fix regression of 24bit decoding.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
aaf47bcde7
Drop ALT_ prefix from BITSTREAM_READER_LE name.
...
The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.
13 years ago
Michael Niedermayer
bd35dfeaa0
tta: Fix several warning: initialization from incompatible pointer type [enabled by default]
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago