MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / decode_channel_map

Function decode_channel_map

libavcodec/aacdec.c:285–294  ·  view source on GitHub ↗

* Decode an array of 4 bit element IDs, optionally interleaved with a stereo/mono switching bit. * * @param cpe_map Stereo (Channel Pair Element) map, NULL if stereo bit is not present. * @param sce_map mono (Single Channel Element) map * @param type speaker type/position for these channels */

Source from the content-addressed store, hash-verified

283 * @param type speaker type/position for these channels
284 */
285static void decode_channel_map(enum ChannelPosition *cpe_map,
286 enum ChannelPosition *sce_map,
287 enum ChannelPosition type,
288 GetBitContext *gb, int n)
289{
290 while (n--) {
291 enum ChannelPosition *map = cpe_map && get_bits1(gb) ? cpe_map : sce_map; // stereo or mono map
292 map[get_bits(gb, 4)] = type;
293 }
294}
295
296/**
297 * Decode program configuration element; reference: table 4.2.

Callers 1

decode_pceFunction · 0.85

Calls 2

get_bits1Function · 0.85
get_bitsFunction · 0.85

Tested by

no test coverage detected