summaryrefslogtreecommitdiff
path: root/libavcodec/opus_celt.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2017-12-04 06:36:42 +0000
committerRostislav Pehlivanov <atomnuker@gmail.com>2017-12-04 07:28:45 +0000
commit1b8649c2ce95da0a12d90f6acf7171b4fc6580db (patch)
tree40eeb3616dea4963f080594b996cd906524f95ef /libavcodec/opus_celt.c
parentfe05f93013c4a3616926fa9370be2d9c93a94659 (diff)
downloadffmpeg-1b8649c2ce95da0a12d90f6acf7171b4fc6580db.tar.gz
opus: add an option to toggle intensity stereo phase inversion
Due to a somewhat high volume of complains, phase inversion has been made optional with RFC8251. This allows for better bass frequency response when partially downmixing to play on systems with an LFE speaker. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/opus_celt.c')
-rw-r--r--libavcodec/opus_celt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/opus_celt.c b/libavcodec/opus_celt.c
index 2bbb96bded..72b299a19c 100644
--- a/libavcodec/opus_celt.c
+++ b/libavcodec/opus_celt.c
@@ -997,7 +997,8 @@ void ff_celt_free(CeltFrame **f)
av_freep(f);
}
-int ff_celt_init(AVCodecContext *avctx, CeltFrame **f, int output_channels)
+int ff_celt_init(AVCodecContext *avctx, CeltFrame **f, int output_channels,
+ int apply_phase_inv)
{
CeltFrame *frm;
int i, ret;
@@ -1014,6 +1015,7 @@ int ff_celt_init(AVCodecContext *avctx, CeltFrame **f, int output_channels)
frm->avctx = avctx;
frm->output_channels = output_channels;
+ frm->apply_phase_inv = apply_phase_inv;
for (i = 0; i < FF_ARRAY_ELEMS(frm->imdct); i++)
if ((ret = ff_mdct15_init(&frm->imdct[i], 1, i + 3, -1.0f/32768)) < 0)