Commit graph

12 commits

Author SHA1 Message Date
Stéphane Cerveau
c1b47c0780 fdkaac: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038>
2021-03-23 14:19:16 +00:00
Stéphane Cerveau
4b72e8cad5 fdkaacdec: add support for mpegversion=2
Fix for #1199
2020-02-04 07:52:22 +00:00
Yeongjin Jeong
52e4a20b4e fdkaacdec: Fix build for fdkaac < 0.1.4
The fdkaac decoder supports 6.1 / 7.1 channels with downmixer
since v0.1.4. Old versions can use AAC_PCM_OUTPUT_CHANNELS
instead of AAC_PCM_MAX_OUTPUT_CHANNELS.

Fixes #873
2019-01-25 15:50:31 -05:00
Jan Alexander Steffens (heftig)
f964fb38b6 fdkaac: Syntax tweaks to increase readability
Mostly move some assignments out of conditionals that gst-indent
completely destroys.
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig)
c5a17000b6 fdkaacdec: Enable 8-channel playback
The decoder seems to default to 6 channels max, downmixing 7.1 to 5.1.
Disable the channel limit to expose all channels to GStreamer.

In addition, none of the standard configurations use ACT_SIDE channels.
The rear channels of the 7.1 configuration have to be taken from
ACT_BACK. See the table in aacenc_lib.h, reproduced here:

----------------------------------------------------------------------------------------
 ChannelMode           | ChCfg | Height | front_El      | side_El  | back_El  | lfe_El
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_1                 |     1 | NORM   | SCE           |          |          |
MODE_2                 |     2 | NORM   | CPE           |          |          |
MODE_1_2               |     3 | NORM   | SCE, CPE      |          |          |
MODE_1_2_1             |     4 | NORM   | SCE, CPE      |          | SCE      |
MODE_1_2_2             |     5 | NORM   | SCE, CPE      |          | CPE      |
MODE_1_2_2_1           |     6 | NORM   | SCE, CPE      |          | CPE      | LFE
MODE_1_2_2_2_1         |     7 | NORM   | SCE, CPE, CPE |          | CPE      | LFE
MODE_6_1               |    11 | NORM   | SCE, CPE      |          | CPE, SCE | LFE
MODE_7_1_BACK          |    12 | NORM   | SCE, CPE      |          | CPE, CPE | LFE
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_7_1_TOP_FRONT     |    14 | NORM   | SCE, CPE      |          | CPE      | LFE
                       |       | TOP    | CPE           |          |          |
-----------------------+-------+--------+---------------+----------+----------+---------
MODE_7_1_REAR_SURROUND |     0 | NORM   | SCE, CPE      |          | CPE, CPE | LFE
MODE_7_1_FRONT_CENTER  |     0 | NORM   | SCE, CPE, CPE |          | CPE      | LFE
----------------------------------------------------------------------------------------
- NORM: Normal Height Layer.     - TOP: Top Height Layer.  - BTM: Bottom Height Layer.
- SCE: Single Channel Element.   - CPE: Channel Pair.      - LFE: Low Frequency Element.

Restores 8 channels to
https://www2.iis.fraunhofer.de/AAC/7.1auditionOutLeader_v2_rtb.mp4
2018-12-17 12:39:13 +00:00
Jan Alexander Steffens (heftig)
19d34f6b5e fdkaacdec: Use WAV channel mapping instead of interleave setting
The latter is going away in libfdk-aac 2.0.0. Instead, MPEG-style output
is always non-interleaved and WAV-style output is always interleaved.
Earlier libfdk-aac also defaults interleaving accordingly.

Since our reordering looks at the associated PCE indices instead of the
actual channel order, we're agnostic to the mapping.

For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
2018-12-05 21:50:03 +00:00
Vincent Penquerc'h
ce59031b10 fdkaacenc: fix accessing freed memory
The buffer data is not always copied in _Fill, and will be
read in _DecodeFrame. We unmap at the end of the function,
whether we get there via failure or early out, and keep a
ref to the buffer to ensure we can use it to unmap the
memory even after _finish_frame is called, as it unrefs
the buffer.

Note that there is an access beyond the allocated buffer,
which is only apparent when playing from souphttpsrc (ie,
not from filesrc). This appears to be a bug in the bit
reading code in libfdkaac AFAICT.

https://bugzilla.gnome.org/show_bug.cgi?id=772186
2016-09-29 15:13:07 +01:00
Vincent Penquerc'h
58bb21c463 fdkaacdec: avoid memory corruption on decoding error
The buffer size is expected to be in multiples of the sample size,
not in bytes.

https://bugzilla.gnome.org/show_bug.cgi?id=772186
2016-09-29 15:13:07 +01:00
Vincent Penquerc'h
95de5bf193 fdkaacenc: fix buffer leak
https://bugzilla.gnome.org/show_bug.cgi?id=772186
2016-09-29 15:13:07 +01:00
Vincent Penquerc'h
fed624a208 fdkaacdec: do not error out of out of sync return
The docs say we should continue feeding in data and decoding

https://bugzilla.gnome.org/show_bug.cgi?id=772067
2016-09-27 17:20:18 +01:00
Olivier Crête
1b0cdcdf3e fdkaac: fix mixup setting interleaved output
https://bugzilla.gnome.org/show_bug.cgi?id=770455
2016-09-26 11:43:22 +01:00
Sebastian Dröge
cb20432f9f fdkaac: Add FDK AAC based decoder element
Missing is support for error concealment, etc.
2016-08-07 15:42:15 +03:00