summaryrefslogtreecommitdiff
path: root/libavcodec/opus_pvq.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-04-27 00:33:24 -0300
committerJames Almer <jamrial@gmail.com>2017-04-27 00:33:24 -0300
commit453f8ea2423617ed6d027f1442500084ae11b432 (patch)
treec97bd69a11fa822777cd409c2e010de3cd9b38c5 /libavcodec/opus_pvq.c
parent6ca82975b7a8eaf676a52738ec8e7e36732327cc (diff)
avcodec/opus_pvq: fix recursive inlining compilation failures
They were introduced by f16180f44859587e0211170bd82b1bfd26f24b5a
Diffstat (limited to 'libavcodec/opus_pvq.c')
-rw-r--r--libavcodec/opus_pvq.c48
1 files changed, 32 insertions, 16 deletions
diff --git a/libavcodec/opus_pvq.c b/libavcodec/opus_pvq.c
index 3109e70f17..d4c2bcbdd6 100644
--- a/libavcodec/opus_pvq.c
+++ b/libavcodec/opus_pvq.c
@@ -746,10 +746,14 @@ static av_always_inline uint32_t quant_band_template(CeltFrame *f, OpusRangeCode
if (mbits >= sbits) {
/* In stereo mode, we do not apply a scaling to the mid
* because we need the normalized mid for folding later */
- cm = quant_band_template(f, rc, band, X, NULL, N, mbits, blocks,
- lowband, duration, next_lowband_out1,
- next_level, stereo ? 1.0f : (gain * mid),
- lowband_scratch, fill, quant);
+ cm = quant ? ff_celt_encode_band(f, rc, band, X, NULL, N, mbits, blocks,
+ lowband, duration, next_lowband_out1,
+ next_level, stereo ? 1.0f : (gain * mid),
+ lowband_scratch, fill) :
+ ff_celt_decode_band(f, rc, band, X, NULL, N, mbits, blocks,
+ lowband, duration, next_lowband_out1,
+ next_level, stereo ? 1.0f : (gain * mid),
+ lowband_scratch, fill);
rebalance = mbits - (rebalance - f->remaining2);
if (rebalance > 3 << 3 && itheta != 0)
@@ -757,17 +761,25 @@ static av_always_inline uint32_t quant_band_template(CeltFrame *f, OpusRangeCode
/* For a stereo split, the high bits of fill are always zero,
* so no folding will be done to the side. */
- cm |= quant_band_template(f, rc, band, Y, NULL, N, sbits, blocks,
- next_lowband2, duration, NULL,
- next_level, gain * side, NULL,
- fill >> blocks, quant) << ((B0 >> 1) & (stereo - 1));
+ cm |= quant ? ff_celt_encode_band(f, rc, band, Y, NULL, N, sbits, blocks,
+ next_lowband2, duration, NULL,
+ next_level, gain * side, NULL,
+ fill >> blocks) << ((B0 >> 1) & (stereo - 1)) :
+ ff_celt_decode_band(f, rc, band, Y, NULL, N, sbits, blocks,
+ next_lowband2, duration, NULL,
+ next_level, gain * side, NULL,
+ fill >> blocks) << ((B0 >> 1) & (stereo - 1));
} else {
/* For a stereo split, the high bits of fill are always zero,
* so no folding will be done to the side. */
- cm = quant_band_template(f, rc, band, Y, NULL, N, sbits, blocks,
- next_lowband2, duration, NULL,
- next_level, gain * side, NULL,
- fill >> blocks, quant) << ((B0 >> 1) & (stereo - 1));
+ cm = quant ? ff_celt_encode_band(f, rc, band, Y, NULL, N, sbits, blocks,
+ next_lowband2, duration, NULL,
+ next_level, gain * side, NULL,
+ fill >> blocks) << ((B0 >> 1) & (stereo - 1)) :
+ ff_celt_decode_band(f, rc, band, Y, NULL, N, sbits, blocks,
+ next_lowband2, duration, NULL,
+ next_level, gain * side, NULL,
+ fill >> blocks) << ((B0 >> 1) & (stereo - 1));
rebalance = sbits - (rebalance - f->remaining2);
if (rebalance > 3 << 3 && itheta != 16384)
@@ -775,10 +787,14 @@ static av_always_inline uint32_t quant_band_template(CeltFrame *f, OpusRangeCode
/* In stereo mode, we do not apply a scaling to the mid because
* we need the normalized mid for folding later */
- cm |= quant_band_template(f, rc, band, X, NULL, N, mbits, blocks,
- lowband, duration, next_lowband_out1,
- next_level, stereo ? 1.0f : (gain * mid),
- lowband_scratch, fill, quant);
+ cm |= quant ? ff_celt_encode_band(f, rc, band, X, NULL, N, mbits, blocks,
+ lowband, duration, next_lowband_out1,
+ next_level, stereo ? 1.0f : (gain * mid),
+ lowband_scratch, fill) :
+ ff_celt_decode_band(f, rc, band, X, NULL, N, mbits, blocks,
+ lowband, duration, next_lowband_out1,
+ next_level, stereo ? 1.0f : (gain * mid),
+ lowband_scratch, fill);
}
}
} else {