summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-10-12 01:42:43 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-10-12 01:42:43 +0100
commitd25c033ddd7326d06a2fa91905e10720063952ce (patch)
tree1162a97f6e31647db22c7bb8107463721c3b4f84
parent5f760da6b60033def749a620ee0639b47afcbaec (diff)
aaccoder_twoloop.h: simplify and comment ff_pns_bits()
-rw-r--r--libavcodec/aaccoder_twoloop.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/aaccoder_twoloop.h b/libavcodec/aaccoder_twoloop.h
index 21a4aed6cb..f4bb01c2a6 100644
--- a/libavcodec/aaccoder_twoloop.h
+++ b/libavcodec/aaccoder_twoloop.h
@@ -56,14 +56,10 @@
#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;
}
/**