James Almer
7c1566fec3
avcodec/tta: Don't try to read more than MIN_CACHE_BITS bits
...
This fixes assertion failures introduced in 4fbb56acbe
.
Reviewed-by: michaelni
Reviewed-by: durandal_1707
8 years ago
Diego Biurrun
a25dac976a
Use bitstream_init8() where appropriate
8 years ago
Alexandra Hájková
fc322d6a70
tta: Convert to the new bitstream reader
8 years ago
Alexandra Hájková
fa64aea12e
unary: Convert to the new bitstream reader
8 years ago
Anton Khirnov
4adbb44ad1
tta: avoid undefined shifts
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Anton Khirnov
dc4b625028
tta: use get_unary() instead of a custom implementation
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
James Almer
d950279cbf
avcodec/ttadsp: cosmetics
...
Clean some header includes and use the same naming scheme as
in ttaencdsp
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Diego Biurrun
b668662939
get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes
...
This avoids the danger that get_bits.h might get indirectly #included before
BITSTREAM_READER_LE is defined.
Also sort headers into canonical order where appropriate.
9 years ago
Michael Niedermayer
46f3015f35
avcodec/tta: Un-break build without threads
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
2cbaa078d1
avcodec: use HAVE_THREADS header guards to silence -Wunused-function
...
When compiled with --disable-pthreads, e.g
http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7 ,
a bunch of -Wunused-functions are reported due to missing header guards
around threading related functions.
This patch should silence such warnings.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Michael Niedermayer
f1593e4ca5
avcodec/tta: Check init_get_bits8() for failure
...
Fixes: CID1322319
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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>
10 years ago
Michael Niedermayer
b9792afad1
avcodec/tta: Use av_freep() to avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
925bd174f2
avcodec/tta: fix macro ()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bb0d9aedcb
avcodec/tta: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
429f742a61
tta: split off hybrid filter processing as ttadsp
...
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
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
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
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