[FFmpeg-devel] [PATCH] af_pan: comment a tricky piece of code.
Nicolas George
nicolas.george at normalesup.org
Wed Feb 15 19:43:42 CET 2012
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
libavfilter/af_pan.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
I wrote it and I had trouble remembering what it did...
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index 9f293a6..0280ab2 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -66,6 +66,7 @@ static int parse_channel_name(char **arg, int *rchannel, int *rnamed)
if (sscanf(*arg, " %7[A-Z] %n", buf, &len)) {
layout0 = layout = av_get_channel_layout(buf);
+ /* channel_id <- first set bit in layout */
for (i = 32; i > 0; i >>= 1) {
if (layout >= (int64_t)1 << i) {
channel_id += i;
--
1.7.9
More information about the ffmpeg-devel
mailing list