Michael Niedermayer
a15d904ad7
avcodec: Replace get_bits_long() by get_bits() where possible
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
James Almer
21d7eeafc1
avcodec/mlp_parse: move TrueHD channel layout and sample rate related code to the header
...
It will be needed by the next commit.
Signed-off-by: James Almer <jamrial@gmail.com>
5 years ago
James Almer
109b0d7c0f
avcodec/mlp_parser: split off shared code to its own file
...
Signed-off-by: James Almer <jamrial@gmail.com>
6 years ago
Michael Niedermayer
51ac3f43b8
avcodec/mlp_parser: Check if synccode is within buffer
...
Fixes: undefined shift
Fixes: 9216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-6281404575907840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
James Almer
ede6e7494f
avcodec/mlp_parser: reindent after last commit
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
James Almer
55ebf707d0
avcodec/mlp_parser: don't try to combine frames when full frames are provided
...
Attempting full frame reconstruction is unnecessary for non raw
containers, so just skip it altogether.
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Vittorio Giovara
970c76f322
mlp_parser: Drop in-parser downmix functionality
...
request_channel_layout is a decoder option and it makes no sense
to have it in a parser.
This feature was needed in the past when the decoder was allowed
to reuse the avctx from the demuxer. Nowadays the decoder receives
only the parameters from it, already containing the real channel
layout (and the correct request_channel_layout option).
After initialization the decoder overwrites the channel layout
with the downmixed one that is actually output, so there is no need
to preserve this functionality in the parser.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years ago
Vittorio Giovara
94c54d97e7
mlp: Factor out channel layout subset checks
8 years ago
Vittorio Giovara
cea7fd9afb
mlp: Drop ff_ prefix from a static function
8 years ago
Diego Biurrun
a25dac976a
Use bitstream_init8() where appropriate
8 years ago
Alexandra Hájková
00c72a1e01
mlp: Convert to the new bitstream reader
8 years ago
Vittorio Giovara
dc70c19476
lavc: Drop deprecated request_channels related functions
...
Deprecated in 04/2011.
10 years ago
Hendrik Leppkes
f36f6a608b
mlpdec: support major sync headers with optional extension blocks
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
ff34b2d6d3
mlpdec: support major sync headers with optional extension blocks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2d15554850
avcodec/mlp_parser: check ff_combine_frame() return code
...
Fixes CID602338
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Tim Walker
c1e7de8f62
mlp_parser: fix request_channel_layout behavior.
...
When request_channel_layout is 0,
all substreams should be decoded.
Thanks to Michael Niedermayer for spotting.
Also fix a mismatch between the parser and
decoder when request_channel_layout is a
subset of Stereo.
11 years ago
Michael Niedermayer
bd35d58463
avcodec/mlp_parser: fix multichannel
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Tim Walker
c0c45188e5
mlp: improve request_channel_layout behavior.
...
Don't decode further substreams if request_channel_layout
is a subset of the current substream's channel_layout.
Before, we would only discard further substreams if
request_channel_layout matched the substream's
channel_layout extactly, thus decoding additional
channels which the caller would probably end up downmixing.
11 years ago
Tim Walker
4b7f1a7ced
mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream.
11 years ago
Michael Niedermayer
1607a98545
avcodec/mlp: Fix bugs in libavs warning fixes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
12 years ago
Michael Niedermayer
6747b0be9b
mlp: fix channel order.
...
This fixes a regression introduced with todays merge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Tim Walker
ed1b01131e
mlp: implement support for AVCodecContext.request_channel_layout.
...
Also wrap usage of AVCodecContext.request_channels in FF_API_REQUEST_CHANNELS directives.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Tim Walker
b0c7e3ffd0
mlp_parser: account for AVCodecContext.request_channels when setting the channel layout.
...
Allows users to configure the output based on what's actually decoded, rather than the full native layout.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Tim Walker
99ccd2ba10
mlp: store the channel layout for each substream.
...
Also stop storing the channel arrangement in the header info, as it's unused outside of ff_mlp_read_major_sync.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
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
df727d408c
mlp_parser: print error when ff_combine_frame() fails to add the current buffer
...
Fixes part of CID602338
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2a672652bb
mlp_parser: dont override existing channel geometry.
...
This prevents race conditions
And partly fixes Ticket1726
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Tim Walker
3844572887
mlp_parser: avoid mapping multiple disctinct TrueHD channels to the same Libav channel.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Michael Niedermayer
5c44c2de80
mlp_parser: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tim Walker
0a9efe4c6e
mlp_parser: fix the channel mask value used for the top surround channel
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Tim Walker
6bbaf6e0dd
mlpdec_parser: fix a few channel layouts.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Justin Ruggles
b3a4c7e0f1
mlp parser: set duration instead of frame_size
13 years ago
Michael Niedermayer
e146ad95d7
mlp_parser: Fix infinite loop with 0 bytes_left.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Hendrik Leppkes
b7bf93b923
mlp: Use correct speaker locations in TrueHD channel layout.
...
(cherry picked from commit d7787835ad737d4f4d8b6f17e04d981632eeaa91)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
cc276c85d1
Make channel layout masks unsigned
...
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.
Fixes a few invalid shifts.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Anton Khirnov
5511ad14fe
lavc: use designated initialisers for parsers.
13 years ago
Justin Ruggles
82be06bbb3
mlpdec: return meaningful error codes instead of -1
13 years ago
Carl Eugen Hoyos
0aac0403c5
Map mlp surround channels to FFmpeg rear channels.
...
This allows more 3rd party applications to correctly read
the resulting wav files.
14 years ago
Carl Eugen Hoyos
9b53bb8b3b
Only ask once in the code for a TrueHD sample with strange channel layout.
14 years ago
Carl Eugen Hoyos
280a789fe2
Make MLP/TrueHD channel layout functions visible to the decoder.
14 years ago
Anton Khirnov
6f3d3eacf6
lavc: add missing audioconvert includes
14 years ago
Carl Eugen Hoyos
2a0bd2bfc9
Make a plausibility check when setting channel layout for TrueHD.
...
TrueHD supports more channels than FFmpeg, so a valid sample
could set the channel layout to a value that represents less
channels than the sample actually consists of.
14 years ago
John Stebbins
4b6f097b21
mlp_parse.c: set AVCodecContext channel_layout
...
The channel layout isn't getting set for mlp and truehd audio.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69
)
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Stefano Sabatini
5d6e4c160a
Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
...
SampleFormat with AVSampleFormat.
Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago