[FFmpeg-cvslog] aaccoder_twoloop.h: simplify and comment ff_pns_bits()
Rostislav Pehlivanov
git at videolan.org
Mon Oct 12 02:44:23 CEST 2015
ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Mon Oct 12 01:42:43 2015 +0100| [d25c033ddd7326d06a2fa91905e10720063952ce] | committer: Rostislav Pehlivanov
aaccoder_twoloop.h: simplify and comment ff_pns_bits()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d25c033ddd7326d06a2fa91905e10720063952ce
---
libavcodec/aaccoder_twoloop.h | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/libavcodec/aaccoder_twoloop.h b/libavcodec/aaccoder_twoloop.h
index 21a4aed..f4bb01c 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;
}
/**
More information about the ffmpeg-cvslog
mailing list