summaryrefslogtreecommitdiff
path: root/libavcodec/opus_pvq.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_pvq.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_pvq.c')
-rw-r--r--libavcodec/opus_pvq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/opus_pvq.c b/libavcodec/opus_pvq.c
index 2f7aa74da4..449215f814 100644
--- a/libavcodec/opus_pvq.c
+++ b/libavcodec/opus_pvq.c
@@ -643,6 +643,7 @@ static av_always_inline uint32_t quant_band_template(CeltPVQ *pvq, CeltFrame *f,
}
} else {
inv = (b > 2 << 3 && f->remaining2 > 2 << 3) ? ff_opus_rc_dec_log(rc, 2) : 0;
+ inv = f->apply_phase_inv ? inv : 0;
}
itheta = 0;
}