changeset 9176:e353d3a41e0b libavcodec

Add cook channel count function, part of multichannel cook
author banan
date Sun, 15 Mar 2009 19:36:45 +0000
parents da3196ebcf99
children 4b1736ba9f2f
files cook.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cook.c	Sun Mar 15 19:34:52 2009 +0000
+++ b/cook.c	Sun Mar 15 19:36:45 2009 +0000
@@ -1018,6 +1018,16 @@
 }
 #endif
 
+static av_cold int cook_count_channels(unsigned int mask){
+    int i;
+    int channels = 0;
+    for(i = 0;i<32;i++){
+        if(mask & (1<<i))
+            ++channels;
+    }
+    return channels;
+}
+
 /**
  * Cook initialization
  *