Andreas Rheinhardt
a2874c5721
avcodec/aac_ac3_parser: Use ff_adts_header_parse_buf()
...
instead of avpriv_adts_header_parse(). Using the former avoids
an indirection.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
7 months ago
James Almer
65ddc74988
avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 months ago
James Almer
35af1695a9
avcodec/aac_ac3_parser: add preprocessor checks for codec specific code
...
Should fix ticket #10421 .
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
James Almer
4c35bb53f9
avcodec/ac3_parser: improve false positive detection when parsing sync frames
...
A two byte sync word is not enough to ensure we got a real syncframe, nor are
all the range checks we do in the first seven bytes. Do therefore an integrity
check for the sync frame in order to prevent the parser from filling avctx with
bogus information.
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
James Almer
ffb6918783
avcodec/aac_ac3_parser: reindent after previous commit
...
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
James Almer
57117c0ef6
avcodec/aac_ac3_parser: don't try to sync when the parser is configured to handle complete frames
...
Should speed up parsing when the frames come from non raw containers.
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
James Almer
b5abf6fdfc
avcodec/aac_ac3_parser: don't fill stream info in the sync function
...
Have it only find frame boundaries. The stream props will then be filled once
we have an assembled frame.
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
Martin Storsjö
a78f136f3f
configure: Use a separate config_components.h header for $ALL_COMPONENTS
...
This avoids unnecessary rebuilds of most source files if only the
list of enabled components has changed, but not the other properties
of the build, set in config.h.
Signed-off-by: Martin Storsjö <martin@martin.st>
3 years ago
Vittorio Giovara
111ed1b16b
ac3: convert to new channel layout API
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Anton Khirnov
494760f971
aac: convert to new channel layout API
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years ago
Piotr Uracz
7ceceee8b6
avcodec/aac_ac3_parser: fix channel information parsing in case decoder is disabled
...
Fixes #7372
4 years ago
Alexander Strasser
ecd71916d1
lavc/aac_ac3_parser: fix potential overflow when averaging bitrate
...
The new code is analog to how it's done in our mpegaudio parser.
Acked-by: Jun Zhao <barryjzhao@tencent.com>
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
4 years ago
Jun Zhao
60d79b1df9
lavc/aac_ac3_parser: improve the raw AAC file bit rate calculation
...
Now we just use one ADTS raw frame to calculate the bit rate, it's
lead to a larger error when get the duration from bit rate, the
improvement cumulate Nth ADTS frames to get the average bit rate.
e,g used the command get the duration like:
ffprobe -show_entries format=duration -i fate-suite/aac/foo.aac
before this improvement dump the duration=2.173935
after this improvement dump the duration=1.979267
in fact, the real duration can be get by command like:
ffmpeg -i fate-suite/aac/foo.aac -f null /dev/null with time=00:00:01.97
Also update the fate-adtstoasc_ticket3715.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years ago
Hendrik Leppkes
8df8a92993
avcodec/aac_ac3_parser: account for data already in the parsing buffer
...
If a frame starts very close to a packet boundary, the start code may
already have been added to the parsing buffer, indicated by a small
negative value of "i", while the header is still being tracked in the
"state" variable.
Reduce the remaining size accordingly, otherwise trying to find the next
frame could skip over the frame header and lump two frames together as
one.
7 years ago
Paul B Mahol
ae92970976
avcodec/eac3: add support for dependent stream
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Vittorio Giovara
dd3aa85b68
aac_ac3_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
Rodger Combs
f0ea536c47
lavc/aac_ac3_parser: reindent
9 years ago
Rodger Combs
9f5baf9085
lavc/aac_ac3_parser: avoid zeroing codec parameters if we haven't read a frame
...
This caused issues when seeking in some unusual MPEGTS files
9 years ago
Vittorio Giovara
dc70c19476
lavc: Drop deprecated request_channels related functions
...
Deprecated in 04/2011.
9 years ago
Tim Walker
b532854622
ac3: implement request_channel_layout.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Tim Walker
69d4dbfd1f
aac_ac3_parser: simplify an expression
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Justin Ruggles
16e54ac725
(e)ac3 parser: set duration instead of frame_size
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
Alex Converse
65bec42e33
Cosmetics: Re-indent after last commit.
...
Originally committed as revision 22195 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
ca1fa4144f
AAC parser: Don't write channels, sample rate, and frame size each frame.
...
Thanks to backwards compatible HE-AAC signalling these values are unreliable.
Originally committed as revision 22194 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
f2e5c8b96a
Cosmetics after last commit
...
Originally committed as revision 18816 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Alex Converse
90350d73f8
Allow parsing and decoding of ADTS AAC files with channel config = 0
...
Originally committed as revision 18815 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 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
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
Michael Niedermayer
bf2cdefc6a
Reset state after some frame header is found.
...
Fixes issue704
Originally committed as revision 15742 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
8dbd9cb695
Fix all the recent problems Justin had run into with the AC3 parser,
...
including issue 459.
Originally committed as revision 15381 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 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
17 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
Michael Niedermayer
8870cf8277
This fixes the code so it is correct on both sides of the if().
...
Originally committed as revision 12902 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
7bc5f6e53e
indent
...
Originally committed as revision 12901 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
e4d5a18558
100l I broke AC3 in MPEG seeking.
...
Originally committed as revision 12898 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Michael Niedermayer
8629e7562d
part 1 of EAC3 support
...
Originally committed as revision 12896 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
e9089a5240
Correction of typo in aac_ac3_parser
...
Originally committed as revision 12768 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
be1e2a2bfa
removal of stream_type in AACAC3ParseContext and adding AACAC3FrameFlag
...
Originally committed as revision 12622 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago
Justin Ruggles
c599e297e7
Pass AACAC3ParseContext to sync() instead of individual arguments. Patch by
...
Bartlomiej Wolowiec (bartek wolowiec gmail com)
Originally committed as revision 12564 to svn://svn.ffmpeg.org/ffmpeg/trunk
17 years ago