Luca Barbato
73fc82f343
vlc: Add header #include when the types are used
...
Do not rely on indirectly including it from bitstream.h.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Diego Biurrun
a25dac976a
Use bitstream_init8() where appropriate
8 years ago
Paul B Mahol
24d31a8074
avcodec/qdm2: make use of bytestream2
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Alexandra Hájková
0b5a26e8bc
qdm2: Convert to the new bitstream reader
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years ago
Adriano Pallavicino
25866680fd
lavc/qdm2: increase code clarity
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Josh de Kock <josh@itanimul.li>
8 years ago
Anton Khirnov
5ebef79abe
Fix instances of broken indentation found by gcc 6
8 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
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Diego Biurrun
0f40c90984
Drop pointless assert.h #includes
9 years ago
Diego Biurrun
29c2d06d67
cosmetics: Drop empty comment lines
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>
9 years ago
Himangi Saraogi
f3e045263e
qdm2: Return meaningful error codes
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Paul B Mahol
3db9960e0a
avcodec/qdm2: remove unneeded #include, there are no assert()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Reimar Döffinger
70d80ed40f
qdm2: Allow hard-coding VLC tables.
...
Also adds a lot of infrastructure necessary for it.
Some of it is a bit ugly though.
Increases binary size for hardcoded tables by about 12 kB,
which is about 15 kB from qdm2_table minus data and code
saved that was only used for creating it.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Vittorio Giovara
1f80742f49
qdm2: avoid integer overflow
...
CC: libav-stable@libav.org
Bug-Id: CID 700555
10 years ago
Gabriel Dume
4b1f5e5090
cosmetics: Write NULL pointer inequality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Michael Niedermayer
976fc5911c
avcodec/qdm2: move static init to normal init to avoid initializing tables that might never be used
...
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
Luca Barbato
45ee556d51
qdm2: Whitespace cosmetics
11 years ago
Michael Niedermayer
8f09957194
avcodec/qdm2: initialize sign_bits
...
Fixes non deterministic output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fbe159e850
avcodec/qdm2: store bits in an integer instead of float variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
4ecdb5ed44
qdm2: Conceal broken samples
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
adadc3f244
qdm2: refactor joined stereo support
...
qdm2 does support only two channels. Loop over the run once.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
744a11c996
qdm2: check and reset dithering index per channel
...
Checking per subband would have the index exceed the
dithering noise table size.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
76efedeadb
qdm2: formatting cosmetics
...
Apply the usual style plus drop few unnecessary return at the end
of void functions.
12 years ago
Luca Barbato
f054e309c5
qdm2: use init_static_data
12 years ago
Roberto Togni
8017683647
qdm2: initialize coeff_per_sb_select from bit_rate
...
The value of coeff_per_sb_select depends on the bit rate, not on
sub_sampling.
Also remove the calculation of tmp, no longer needed.
Fixes tickets #1868 and #742 (only audio part)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
34f87a5853
qdm2: check that the FFT size is a power of 2
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
12 years ago
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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
Michael Niedermayer
a3541896c6
qdm2: check "AC" codewords
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Michael Niedermayer
39bec05ed4
qdm2: check array index before use, fix out of array accesses
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a7ee6281f7
)
CC: libav-stable@libav.org
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
12 years ago
Justin Ruggles
e01e1a4673
qdm2: decode directly to the user-provided AVFrame
12 years ago
Michael Niedermayer
d106679fb5
qdm2: disable superblocktype_2_3==0 code
...
The code is untested and contained bugs, we need a sample if any files
use this branch.
Suggested-by: Roberto Togni
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ccfd8cffe8
qdm2: Fix data type used in multiplication.
...
Avoid unintended truncation.
Fixes CID700555
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2b12d1ffd8
qdm2: fix out of stack array read.
...
The read value is not used when its outside the array.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
a7ee6281f7
qdm2: check array index before use, 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
0efcf16a3e
replace av_log(0, by av_log(NULL,
...
The first parameter is a pointer and NULL is more correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Peter Ross
9ccc349f77
ensure comment blocks that contain doxygen commands start with double asterix
...
Reveiwed-by: Stefano Sabatini <stefasab@gmail.com>
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
5ee008e01d
qdm2: check that coding_method is valid before using it.
...
Fixes out of array reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
eb38d8fe92
qdm2: remove unneeded checks for channel count
12 years ago
Justin Ruggles
be2ab8b75a
qdm2: make sure channels is not <= 0 and set channel layout
12 years ago
Diego Biurrun
36a8c43073
doxygen: qdm2: Drop documentation for non-existing function parameters
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago