diff options
author | foo86 <foobaz86@gmail.com> | 2016-05-01 08:42:14 -0700 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-05-01 16:50:32 -0300 |
commit | 1fee770a1cece01f1e31a3127f7039e784a449eb (patch) | |
tree | 46452af20bb49fddebf01b0c67540e1a25d76a5c /libavcodec/dca_exss.c | |
parent | 2df7d4fa4524b6f83c65428d75192267a2d0c113 (diff) | |
download | ffmpeg-1fee770a1cece01f1e31a3127f7039e784a449eb.tar.gz |
avcodec/dca: move channel counter utility into dca.h
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dca_exss.c')
-rw-r--r-- | libavcodec/dca_exss.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/dca_exss.c b/libavcodec/dca_exss.c index 4579f2350f..36314c210b 100644 --- a/libavcodec/dca_exss.c +++ b/libavcodec/dca_exss.c @@ -21,11 +21,6 @@ #include "dcadec.h" #include "dcadata.h" -static int count_chs_for_mask(int mask) -{ - return av_popcount(mask) + av_popcount(mask & 0xae66); -} - static void parse_xll_parameters(DCAExssParser *s, DCAExssAsset *asset) { // Size of XLL data in extension substream @@ -141,7 +136,7 @@ static int parse_descriptor(DCAExssParser *s, DCAExssAsset *asset) // Standard loudspeaker layout mask for (i = 0; i < spkr_remap_nsets; i++) - nspeakers[i] = count_chs_for_mask(get_bits(&s->gb, spkr_mask_nbits)); + nspeakers[i] = ff_dca_count_chs_for_mask(get_bits(&s->gb, spkr_mask_nbits)); for (i = 0; i < spkr_remap_nsets; i++) { // Number of channels to be decoded for speaker remapping @@ -470,7 +465,7 @@ int ff_dca_exss_parse(DCAExssParser *s, uint8_t *data, int size) // Speaker layout mask for mixer output channels for (i = 0; i < s->nmixoutconfigs; i++) - s->nmixoutchs[i] = count_chs_for_mask(get_bits(&s->gb, spkr_mask_nbits)); + s->nmixoutchs[i] = ff_dca_count_chs_for_mask(get_bits(&s->gb, spkr_mask_nbits)); } } else { s->npresents = 1; |