X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fopus_pvq.c;h=a4ab7c46ebb7382975081e9423cd81ee47bbf231;hb=6e30b35b85b81c802e52a1078ec7a3097e353c6d;hp=0dbf14184d11e863dd7b4c2fd94e4865b70eff44;hpb=73d193d1d0ff62a029a905d1404c0fd357f4c880;p=ffmpeg diff --git a/libavcodec/opus_pvq.c b/libavcodec/opus_pvq.c index 0dbf14184d1..a4ab7c46ebb 100644 --- a/libavcodec/opus_pvq.c +++ b/libavcodec/opus_pvq.c @@ -627,7 +627,7 @@ static av_always_inline uint32_t quant_band_template(CeltPVQ *pvq, CeltFrame *f, } } else if (stereo) { if (quant) { - inv = itheta > 8192; + inv = f->apply_phase_inv ? itheta > 8192 : 0; if (inv) { for (i = 0; i < N; i++) Y[i] *= -1; @@ -903,8 +903,8 @@ int av_cold ff_celt_pvq_init(CeltPVQ **pvq, int encode) s->pvq_search = ppp_pvq_search_c; s->quant_band = encode ? pvq_encode_band : pvq_decode_band; - if (ARCH_X86) - ff_opus_dsp_init_x86(s); + if (CONFIG_OPUS_ENCODER && ARCH_X86) + ff_celt_pvq_init_x86(s); *pvq = s;