[FFmpeg-cvslog] avcodec/opus_pvq: fix recursive inlining compilation failures

James Almer git at videolan.org
Thu Apr 27 06:42:31 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Apr 27 00:33:24 2017 -0300| [453f8ea2423617ed6d027f1442500084ae11b432] | committer: James Almer

avcodec/opus_pvq: fix recursive inlining compilation failures

They were introduced by f16180f44859587e0211170bd82b1bfd26f24b5a

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=453f8ea2423617ed6d027f1442500084ae11b432
---

 libavcodec/opus_pvq.c | 48 ++++++++++++++++++++++++++++++++----------------
 1 file 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 {



More information about the ffmpeg-cvslog mailing list