ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Feb 16 
19:31:31 2022 +0100| [698de27f25bea278ce7155fc387b3d59b478d46b] | committer: Paul B 
Mahol

avfilter/af_speechnorm: speed up filtering code

Reduce some asserts by default.

http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=698de27f25bea278ce7155fc387b3d59b478d46b
---

 libavfilter/af_speechnorm.c | 133 ++++++++++++++++++++++++--------------------
 1 file changed, 73 insertions(+), 60 deletions(-)

diff --git a/libavfilter/af_speechnorm.c b/libavfilter/af_speechnorm.c
index 212a926f36..7fa87f814a 100644
--- a/libavfilter/af_speechnorm.c
+++ b/libavfilter/af_speechnorm.c
@@ -128,7 +128,7 @@ static int get_pi_samples(PeriodItem *pi, int start, int 
end, int remain)
             start = 0;
         if (pi[start].type == 0)
             break;
-        av_assert0(pi[start].size > 0);
+        av_assert1(pi[start].size > 0);
         sum += pi[start].size;
     }
@@ -156,7 +156,7 @@ static void consume_pi(ChannelContext *cc, int nb_samples)
     if (cc->pi_size >= nb_samples) {
         cc->pi_size -= nb_samples;
     } else {
-        av_assert0(0);
+        av_assert1(0);

You removed an assert meant to always trigger if that path is chosen. This has nothing to do with speed.

Same at the end of the commit.

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to