X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fopus_pvq.c;h=a4ab7c46ebb7382975081e9423cd81ee47bbf231;hb=930391e5988abe126d29c5e9b09fab459e0b8936;hp=0dbf14184d11e863dd7b4c2fd94e4865b70eff44;hpb=b8eb0827f053230dd919bc73e25381b47b4fe1a7;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;