aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2024-05-15 00:24:32 +0200
committerLynne <dev@lynne.ee>2024-06-02 18:34:43 +0200
commitf8543f376381a3aee593201ed9bff0144c68547a (patch)
tree8bc737069b038ceb83e23c2825b238f261a731b1
parent0f2303f629078f3704323b5a3d97c68512eacdf5 (diff)
downloadffmpeg-f8543f376381a3aee593201ed9bff0144c68547a.tar.gz
aacdec: expose decode_tns
USAC has the same syntax, with one minor change we can check for.
-rw-r--r--libavcodec/aac/aacdec.c6
-rw-r--r--libavcodec/aac/aacdec.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index 40554ff9e4..a7e5b2a369 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -1542,7 +1542,7 @@ static int decode_pulses(Pulse *pulse, GetBitContext *gb,
*
* @return Returns error status. 0 - OK, !0 - error
*/
-static int decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns,
+int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns,
GetBitContext *gb, const IndividualChannelStream *ics)
{
int w, filt, i, coef_len, coef_res, coef_compress;
@@ -1690,7 +1690,7 @@ int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce,
}
tns->present = get_bits1(gb);
if (tns->present && !er_syntax) {
- ret = decode_tns(ac, tns, gb, ics);
+ ret = ff_aac_decode_tns(ac, tns, gb, ics);
if (ret < 0)
goto fail;
}
@@ -1704,7 +1704,7 @@ int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce,
// I see no textual basis in the spec for this occurring after SSR gain
// control, but this is what both reference and real implmentations do
if (tns->present && er_syntax) {
- ret = decode_tns(ac, tns, gb, ics);
+ ret = ff_aac_decode_tns(ac, tns, gb, ics);
if (ret < 0)
goto fail;
}
diff --git a/libavcodec/aac/aacdec.h b/libavcodec/aac/aacdec.h
index bea0578e92..499bd8eefc 100644
--- a/libavcodec/aac/aacdec.h
+++ b/libavcodec/aac/aacdec.h
@@ -351,6 +351,9 @@ int ff_aac_decode_init_fixed(AVCodecContext *avctx);
int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce,
GetBitContext *gb, int common_window, int scale_flag);
+int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns,
+ GetBitContext *gb, const IndividualChannelStream *ics);
+
int ff_aac_set_default_channel_config(AACDecContext *ac, AVCodecContext *avctx,
uint8_t (*layout_map)[3],
int *tags,