aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacenc_pred.h
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2025-02-08 04:42:54 +0100
committerLynne <dev@lynne.ee>2025-02-26 17:12:04 +0100
commit9b11fefb88c770b9c1d4d4583c61c6abde6c033c (patch)
tree1d165c2410b823929f244dd12ec8c5efac528f7a /libavcodec/aacenc_pred.h
parente24920375cd2bbdd579424c16cf0f9c66579ea24 (diff)
downloadffmpeg-9b11fefb88c770b9c1d4d4583c61c6abde6c033c.tar.gz
aacenc: remove support for AAC Main profile
The Main profile of AAC is... terrible. It enables the use of delta coding across coefficients of two frames to try to increase compression, and it enabled one more pole for TNS filters. What the AAC authors failed to take into account were basic mathematics, as MDCT leakage (e.g. the spread of each frequency when represented in a discrete spectrum) is significant in most audio codecs. This leads to huge variations between each frame, basically rendering prediction completely pointless. In fact, enabling AAC-Main prediction does not, in general, even recoup the metadata losses from signalling the profile and prediction properties in the first place. So you lose efficiency by using AAC Main. The rumor is that it was put in the AAC spec for patent reasons, though patent-wise, it has about as much use as a patent for a bicycle designed for use by snakes. The only other thing AAC Main changes is it permits 3-pole TNS filters. When AAC's bands are absolutely tiny, except for very high frequency bands, where you're likely to use PNS instead. Just get rid of it.
Diffstat (limited to 'libavcodec/aacenc_pred.h')
-rw-r--r--libavcodec/aacenc_pred.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/libavcodec/aacenc_pred.h b/libavcodec/aacenc_pred.h
deleted file mode 100644
index aa305f45a5..0000000000
--- a/libavcodec/aacenc_pred.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * AAC encoder main-type prediction
- * Copyright (C) 2015 Rostislav Pehlivanov
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * AAC encoder main-type prediction
- * @author Rostislav Pehlivanov ( atomnuker gmail com )
- */
-
-#ifndef AVCODEC_AACENC_PRED_H
-#define AVCODEC_AACENC_PRED_H
-
-#include "aacenc.h"
-
-/* Every predictor group needs to get reset at least once in this many frames */
-#define PRED_RESET_FRAME_MIN 240
-
-/* Any frame with less than this amount of frames since last reset is ok */
-#define PRED_RESET_MIN 64
-
-/* Raise to filter any low frequency artifacts due to prediction */
-#define PRED_SFB_START 10
-
-void ff_aac_apply_main_pred(AACEncContext *s, SingleChannelElement *sce);
-void ff_aac_adjust_common_pred(AACEncContext *s, ChannelElement *cpe);
-void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce);
-void ff_aac_encode_main_pred(AACEncContext *s, SingleChannelElement *sce);
-
-#endif /* AVCODEC_AACENC_PRED_H */