Michael Niedermayer
f86e7c5d00
avcodec/ac3_parser: Avoid floats in bitrate computation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
fccd85b9f3
avcodec: fix aac/ac3 parser bitstream buffer size
...
Buffers containing copies of the AAC and AC3 header bits were not padded
before parsing, violating init_get_bits() buffer padding requirement,
leading to potential buffer read overflows.
This change adds FF_INPUT_BUFFER_PADDING_SIZE bytes to the bit buffer
for parsing the header in each of aac_parser.c and ac3_parser.c.
Based on patch by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
eadc21cfe7
avcodec/ac3_parser: add avpriv_ac3_parse_header2() and use it in libavcodec
...
The new function has the ability to allocate the structure, allowing it to grow
without needing major bumps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Tim Walker
13345fc1f8
(e)ac3: parse and store the Dolby Surround, Surround EX and Headphone mode flags.
11 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
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Justin Ruggles
3798205a77
mov: set channel layout for AC-3 streams based on the 'dac3' atom info
...
fixes Bug 225
13 years ago
Michael Niedermayer
e6d9fa66f1
ac3dec: Move center and surround mix level tables to the parser.
...
That way all mix levels as exported by avpriv_ac3_parse_header()
will have the same meaning.
Previously the 3-bit center mix level for E-AC-3 was used to index in a
4-entry table, leading to out-of-array reads.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Michael Niedermayer
99a42f3fa9
ac3dec: Move center&surround mix level tables to parser.
...
That way all mix levels as exported by the parser
will have the same meaning.
Previously the 3bit center mix level for eac3 was
used to index in a 4 entry table leading to out of array reads.
this change removes the table and offsets the ac3 variable by 4
so it matches the meanings for eac3 except the reserved case.
The reserved case is then explicitly handled.
Idea-by: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
5511ad14fe
lavc: use designated initialisers for parsers.
13 years ago
Anton Khirnov
6f89efeaa7
lavc: use avpriv_ prefix for ff_ac3_parse_header.
...
It's used in lavf.
13 years ago
Justin Ruggles
be18738801
Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser
...
and decoder, and vice-versa for the AC-3 encoder.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Reinhard Tartler
7ffe76e540
Merge libavcore into libavutil
...
Done to keep ABI compatible. Otherwise this is just silly
14 years ago
Reinhard Tartler
737eb5976f
Merge libavcore into libavutil
...
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
14 years ago
Anton Khirnov
fbdcdaee6e
Replace remaining occurrences of deprecated CH_* with AV_CH_*
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c2fcd0a7a4
)
14 years ago
Anton Khirnov
c2fcd0a7a4
Replace remaining occurrences of deprecated CH_* with AV_CH_*
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.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
Diego Elio Pettenò
998d9ee7a4
Remove unused ff_ac3_parse_header_full function.
...
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 676f1f533e
)
14 years ago
Diego Elio Pettenò
676f1f533e
Remove unused ff_ac3_parse_header_full function.
...
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
14 years ago
Måns Rullgård
8fc0162ac4
Add av_ prefix to bswap macros
...
Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Måns Rullgård
e6b22522c9
bswap: change ME to NE in macro names
...
Other parts of FFmpeg use NE (native endian) rather than ME (machine).
This makes it consistent.
Originally committed as revision 24169 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Justin Ruggles
a26f1d1092
ac3: make the value of codec_id during (E-)AC-3 parsing stay CODEC_ID_EAC3
...
if any E-AC-3 frames have been detected instead of switching back and forth for
AC-3 core + dependent E-AC-3 substream(s).
Fixes Issue 2022.
Originally committed as revision 24103 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Justin Ruggles
bfeca7beb6
Add channel layout support to the AC-3 decoder and AC-3 parser.
...
Originally committed as revision 18622 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Stefano Sabatini
9106a698e7
Rename bitstream.h to get_bits.h.
...
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Justin Ruggles
a169df2f76
Set the correct number of samples for E-AC-3 in the AC3 parser.
...
Originally committed as revision 17472 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Joakim Plate
4cff8dc88f
Allow AC-3 parser to modify codec_id.
...
Patch by Joakim Plate (elupus A ecce D se).
Originally committed as revision 17447 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
406792e7b0
cosmetics: Remove pointless period after copyright statement non-sentences.
...
Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Alex Converse
11d6f38cc9
Factorise enum of AC3 error types to be usable by AAC in the ADTS patch that
...
will follow
Patch by Alex Converse ( alex converse gmail com )
Originally committed as revision 16479 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Måns Rullgård
6c414bb6d4
AC3: fix strict aliasing violation in parser
...
Originally committed as revision 16181 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Justin Ruggles
2988c93d94
create a separate codec_id for E-AC-3
...
Originally committed as revision 15143 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Justin Ruggles
14b7062829
cosmetics: make all references to AC-3 capitalized and hyphenated
...
Originally committed as revision 14523 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
David Liu
7694a7d93f
Close parse context.
...
Patch by David LIU david liu st com
Originally committed as revision 13962 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Justin Ruggles
30f71adc46
move mix level tables from parser to decoder. have parser read bitstream value instead of using an index to a table in the decoder.
...
Originally committed as revision 13696 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Justin Ruggles
caf0fbc889
add more gain levels and adjust mix level tables accordingly.
...
Originally committed as revision 13695 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Justin Ruggles
30cc3ac20e
set default mix levels regardless of bitstream id
...
Originally committed as revision 13693 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Justin Ruggles
3596aa6fe6
get substreamid from ac3 parser
...
Originally committed as revision 13689 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Justin Ruggles
6730e9f300
get the number of blocks from the ac3 parser and use in the ac3 decoder.
...
Originally committed as revision 13688 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Bartlomiej Wolowiec
0c79b1402a
add a ff_ac3_parse_header_full() which calls ff_ac3_parse_header()
...
and then reads the channel_map stuff
Originally committed as revision 12944 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Bartlomiej Wolowiec
55736cfbd2
change ff_ac3_parse_header() to take a GetBitContext instead of const char*
...
Originally committed as revision 12922 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
144b5bdc70
Make most of E-AC-3 work without breaking regression tests.
...
Originally committed as revision 12903 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
c087748f26
Part 2 of EAC3 support, this is still disabled as it breaks regressions
...
due to bugs elsewhere.
Originally committed as revision 12897 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
133ac890fb
Add new_frame_start and need_next_header.
...
based on a patch by Bartlomiej
Originally committed as revision 12895 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
454064ad1e
Change aac and ac3 parsers to use ff_combine_frame().
...
Originally committed as revision 12894 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
8c731c9743
remove AACAC3FrameFlag
...
Originally committed as revision 12888 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Bartlomiej Wolowiec
469d8816d6
undo changes in aac_ac3_parser
...
Originally committed as revision 12778 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Bartlomiej Wolowiec
c09ed33e18
Corrections of errors in aac_ac3_parser
...
Originally committed as revision 12759 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Bartlomiej Wolowiec
0a5754c3b7
change of aac_ac3_parser, so it is able to send complete portion of data to decoder
...
Originally committed as revision 12758 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Bartlomiej Wolowiec
79b25a27b8
change name from stream type to frame type in AC3 code
...
Originally committed as revision 12623 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago