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
b28851a1d6
alac: frame multi-threading support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
b257d9a01f
alac: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
chinshou
b619a54853
alac: Fix order of values in comment
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
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
Justin Ruggles
5cd597f22f
alac: decode directly to the user-provided AVFrame
12 years ago
Justin Ruggles
68a04b0cce
alacdec: do not be too strict about the extradata size
...
Sometimes the extradata has duplicate atoms, but that shouldn't prevent
decoding. Just ensure that it is at least 36 bytes as a sanity check.
CC: libav-stable@libav.org
12 years ago
Justin Ruggles
5e1bbb8c7e
alacenc: add support for multi-channel encoding
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
Michael Niedermayer
001af703c6
alac: check channel count more completely, fix out of array read
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Michael Niedermayer
a1e093a6fb
alac: fix bps check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b53f89710b
alac: Check channel indexes more completely, fix out of array accesses.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3920d13878
alac: fix integer overflow leading to subsequent out of array accesses.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fd4f4923cc
alac: fix nb_samples < order case
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
46a86c6194
alacdec: set bits_per_raw_sample
12 years ago
Piotr Bandurski
53241b5dc7
lavc: add missing new line to some messages
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Paul B Mahol
c2502b7b34
alac: remove redundant "alac: " from log messages
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Justin Ruggles
81f548de57
alac: check for truncated packets
...
This will give a clearer error message when the error is caused by a
truncated packet.
12 years ago
Justin Ruggles
fb57e913e1
alac: reverse lpc coeff order, simplify filter
...
Reversing the lpc coefficient order simplifies indexing in the filter.
12 years ago
Michael Niedermayer
17352ad315
alacdec: fix packed sample output with 5.1
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7c6ebe2b97
alac: drop packed sample output support with the next major bump
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
5e99df019a
alacdec: several players have problems with planar audio still thus temporary put packed output back by default
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
4cd22b7738
alac: fix channel pointer assignment for 24 and 32-bit
...
Needs to be done separately for each element.
13 years ago
Justin Ruggles
eeb55f5f2f
alac: cosmetics: general pretty-printing and comment clean up
13 years ago
Justin Ruggles
f3e5a7844b
alac: calculate buffer size outside the loop in allocate_buffers()
13 years ago
Justin Ruggles
bae83f2c74
alac: change some data types to plain int
13 years ago
Justin Ruggles
2aebac6918
alac: cosmetics: rename some variables and function names
13 years ago
Andrew D'Addesio
1b3ef155d7
alac: multi-channel decoding support
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Justin Ruggles
81c9e2e6d0
alac: split element parsing into a separate function
...
This will make multi-channel implementation simpler.
Based partially on a patch by Andrew D'Addesio <modchipv12@gmail.com>.
13 years ago
Justin Ruggles
cd632619d9
alac: support a read sample size of up to 32
...
Use get_bits_long() in decode_scalar().
Use unsigned int for decoded value.
13 years ago
Justin Ruggles
73dc0db486
alac: output in planar sample format
...
Avoids unneeded interleaving and allows for reusing the AVFrame output buffer
as the internal buffer for 24-bit and 32-bit sample size.
13 years ago
Justin Ruggles
6482bd8831
alac: add 32-bit decoding support
13 years ago
Andrew D'Addesio
6cda74c155
alac: simplify channel interleaving
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Justin Ruggles
5138ff143f
alac: use AVPacket fields directly in alac_decode_frame()
13 years ago
Justin Ruggles
7a206eb32f
alac: fix check for valid max_samples_per_frame
13 years ago
Justin Ruggles
1193d3fedd
alac: use get_sbits() to read LPC coefficients instead of casting
13 years ago
Justin Ruggles
7a50ec6799
alac: move the current samples per frame to the ALACContext
...
This will simplify the multi-channel implementation.
13 years ago
Justin Ruggles
46043962ea
alac: avoid using a double-negative when checking if the frame is compressed
13 years ago
Justin Ruggles
9a6c528e08
alac: factor out output_size check in predictor_decompress_fir_adapt()
13 years ago
Justin Ruggles
ebd4c3add1
alac: factor out loading of next decoded sample in LPC prediction
13 years ago
Justin Ruggles
a4ecd41442
alac: use index into buffer_out instead of incrementing the pointer
13 years ago
Justin Ruggles
f2515cd629
alac: simplify lpc coefficient adaptation
13 years ago
Justin Ruggles
abc4376b31
alac: reduce the number of local variables needed in lpc prediction
13 years ago
Justin Ruggles
01880d287b
alac: simplify 1st order prediction and reading of warm-up samples
13 years ago
Justin Ruggles
d0c0bf0d3e
alac: cosmetics: reindent after last commit
13 years ago