]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavcodec/cook.c
Add cook channel count function, part of multichannel cook
[frescor/ffmpeg.git] / libavcodec / cook.c
index 1c1bf72c62c11cf80792acb1acb53949a589980c..e476dede2da6731e16bf25944c45525adef94952 100644 (file)
@@ -1018,6 +1018,16 @@ static void dump_cook_context(COOKContext *q)
 }
 #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
  *