]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aaccoder_twoloop.h
aaccoder_twoloop.h: simplify and comment ff_pns_bits()
[ffmpeg] / libavcodec / aaccoder_twoloop.h
index 21a4aed6cb19558708f6e9569bc6b090af7d20cf..f4bb01c2a68c85d978ee7edea179ac21205c1cc3 100644 (file)
 
 #define sclip(x) av_clip(x,60,218)
 
-
-static av_always_inline int ff_pns_bits(const SingleChannelElement *sce, int w, int g)
+/* Reflects the cost to change codebooks */
+static inline int ff_pns_bits(SingleChannelElement *sce, int w, int g)
 {
-    if (!g || !sce->zeroes[w*16+g-1] || !sce->can_pns[w*16+g-1]) {
-        return 9;
-    } else {
-        return 5;
-    }
+    return (!g || !sce->zeroes[w*16+g-1] || !sce->can_pns[w*16+g-1]) ? 9 : 5;
 }
 
 /**