Alexandra Khirnova
58b42345b3
dcadec: reorganise context data
...
place primary audio coding header data into DCAAudioHeader
structure to make DCAContext clearer
and move channel related data to DCAChan structure to make
them easier to use by extensions
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Vittorio Giovara
4c160fa239
dcadec: Always initialize return variable
...
Silence an uninitialized warning from clang.
9 years ago
Alexandra Khirnova
d0a3e89d41
dcadec: make a number of samples per subband per subsubframe a named constant
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Ganesh Ajjanagadde
9db6c8815d
avcodec/dcadec: fix a -Wsometimes-unitialized on clang
...
This fixes a genuine -Wsometimes-unitialized reported on clang, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7 .
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Alexandra Hájková
7778859835
dcadec: set channel layout in a separate function
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Alexandra Hájková
971177f751
dcadec: scan for extensions in a separate function
...
to make dca_decode_frame more readable
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Vittorio Giovara
dc70c19476
lavc: Drop deprecated request_channels related functions
...
Deprecated in 04/2011.
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
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
James Almer
a3b721d10d
avcodec/dcadec: silence request_channels deprecation warnings
...
This also prevents an eventual compilation failure once request_channels
is removed.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Michael Niedermayer
4ae15605f6
avcodec/dcadec: Search and decode frame in case it starts later in a packet
...
This fixes decoding the first frame of some dts files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
fc624ec9ba
avcodec/dcadec: Check active_bands
...
Fixes CID1297594 part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0f3e6959bf
avcodec/dcadec: Check scale table index
...
Fixes CID1297594 part 1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a9bf628bfd
avcodec/dcadec: Check subsubframes
...
Fixes: CID1239152
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a6a45774d0
avcodec/dcadec: Check nchans
...
Fixes CID1239110
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Carl Eugen Hoyos
7f1ea38868
lavc/dts: Do not set bitrate for DTS-HD Master and High Resolution.
...
Fixes ticket #4375 .
Reviewed-by: Hendrik Leppkes
10 years ago
Michael Niedermayer
e802abd6e3
avcodec/dcadec: if XLL is enabled use xll channels
...
Fixes outputting 14 channels instead of 7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
21d25441c6
avcodec/dcadec: Only upsample as much data as is there
...
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Niels Möller
217e4ff4d1
dca: Support for XLL (lossless extension)
...
Cleanup and integration by Diego Biurrun.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Diego Biurrun
25f613f8be
dca: Move syncword definitions to a separate header
10 years ago
Michael Niedermayer
588361dd26
avcodec/dca: move remaining tables to dcadata
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
f8c1719771
dca: Remove separate header for DCA ExSS
...
There is no point in having a separate header for a single declaration.
10 years ago
Diego Biurrun
3a651f599a
dca: Move data tables from a header to an object file
...
This allows sharing them with the DCA XLL extension w/o duplication.
10 years ago
Michael Niedermayer
8123e19e61
avcodec/dcadec: Move remaining tables to dcadata.h
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
2a9c6fae92
dca: Move all tables into dcadata.h
10 years ago
Diego Biurrun
8a213179af
dca: Remove trace debugging code
10 years ago
Diego Biurrun
b339019de4
dca: Split code for handling the EXSS extension off into a separate file
10 years ago
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Michael Niedermayer
7d593495e4
avcodec/dcadec: Check that the added xch channel isnt already there
...
Fixes null pointer dereference
Fixes: signal_sigsegv_369609d_623_cov_2008234281_ES_6.1_16bit.dts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
b054054c9b
avcodec/dcadec: Use avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
d5d2d6c3b8
dcadec: initialize variables before use
...
CC: libav-stable@libav.org
Bug-Id: CID 700751 / CID 700752
10 years ago
Diego Biurrun
103391ca90
dca: Remove some commented-out cruft
10 years ago
Gabriel Dume
45ff7c93dd
dca: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Michael Niedermayer
7a34b7d80f
avcodec/dca: Make ff_dca_convert_bitstream() available to libavformat, needed for dts_probe()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a740cae4a0
avcodec/dcadec: remove unsignedness from constant
...
POSIX gurantees >=32bit so it all fits in signed int
Also >=32bit ints are assumed througout the codebase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Niels Möller
f2ce63246f
dcadec: replace ldexpf with a multiplication by a constant
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Michael Niedermayer
98ff07d1c6
avcodec/dcadec: Check dca_dmixtable index
...
Found-by: Niels Möller <nisse@lysator.liu.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
47313bbb5f
avcodec/dcadec: remove fishy FFMAX()
...
These where intended to maintain the previous behavior before dca_dmix_code()
but it is unclear (to me) which way is correct and no sample seem to trigger
the case, also they are incomplete for the purprose of error checking
Found-by: Niels Möller <nisse@lysator.liu.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Lou Logan
88f2586adb
fix various typos
...
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6b88f22e89
avcodec/dcadec: dont use hex float, msvc doesnt support it
...
Found-by: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9ccb5455ca
avcodec/dcadec: use a constant instead of assuming every compiler can optimize pow(2,-15)
...
Idea-by: nevcairiel and wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6da06ef6bb
avcodec/dcadec: make dca_dmix_code() 650% faster
...
This effectively replaces the ldexpf() function call by a multiplication
with a constant.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4e4dbb9983
dcadec: fix xxch_dmix_coeff and xxch_dmix_sf after merge
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Niels Möller
6b7b8585d7
dca: Convert dca_dmixtable to integers
...
Also include zero in the table, eliminating a special case in the
decoder.
Signed-off-by: Niels Möller <nisse@southpole.se>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Michael Niedermayer
62a9725bc9
avcodec/dcadec: add an assert to silence a uninitialized variable warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7e79d72c28
avcodec/dcadec: remove always true if()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f202af29c9
avcodec/dcadec: fix error message suppression code
...
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Niels Möller
b3d905b702
dcadec: Delete redundant init_get_bits call
...
No initialization is needed in dca_decode_frame, because the next
thing it does is calling dca_parse_frame_header, which takes care of
the needed initialization.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Tim Walker
801c39e1e3
dcadec: Use correct channel count in stereo downmix check
...
s->prim_channels is greater than num_core_channels
when an XCh extension is present in the bitstream.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago