diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-04-25 23:26:56 +0300 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-04-26 18:14:57 +0300 |
commit | 1f6e5dd4d4dd9c02371ad211049d27edb6d95286 (patch) | |
tree | cccd185ffcc96094de2627bf0858aeb5c702af16 /libavcodec/mlpdec.c | |
parent | bee89ed3ec61a4a0e72255ae6f4a4274d25b5ccd (diff) |
mlp: Rename the channel layout variable
Purely cosmetic change, will make code more readable once the new
channel layout takes over.
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index a606213f97..9ce32c832e 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -67,7 +67,7 @@ typedef struct SubStream { /// For each channel output by the matrix, the output channel to map it to uint8_t ch_assign[MAX_CHANNELS]; /// The channel layout for this substream - uint64_t ch_layout; + uint64_t mask; /// The matrix encoding mode for this substream enum AVMatrixEncoding matrix_encoding; @@ -383,17 +383,17 @@ static int read_major_sync(MLPDecodeContext *m, BitstreamContext *bc) * major sync. */ if (m->avctx->codec_id == AV_CODEC_ID_MLP) { if ((substr = (mh.num_substreams > 1))) - m->substream[0].ch_layout = AV_CH_LAYOUT_STEREO; - m->substream[substr].ch_layout = mh.channel_layout_mlp; + m->substream[0].mask = AV_CH_LAYOUT_STEREO; + m->substream[substr].mask = mh.channel_layout_mlp; } else { if ((substr = (mh.num_substreams > 1))) - m->substream[0].ch_layout = AV_CH_LAYOUT_STEREO; + m->substream[0].mask = AV_CH_LAYOUT_STEREO; if (mh.num_substreams > 2) if (mh.channel_layout_thd_stream2) - m->substream[2].ch_layout = mh.channel_layout_thd_stream2; + m->substream[2].mask = mh.channel_layout_thd_stream2; else - m->substream[2].ch_layout = mh.channel_layout_thd_stream1; - m->substream[substr].ch_layout = mh.channel_layout_thd_stream1; + m->substream[2].mask = mh.channel_layout_thd_stream1; + m->substream[substr].mask = mh.channel_layout_thd_stream1; } /* Parse the TrueHD decoder channel modifiers and set each substream's @@ -511,12 +511,12 @@ static int read_restart_header(MLPDecodeContext *m, BitstreamContext *bc, s->max_channel = max_channel; s->max_matrix_channel = max_matrix_channel; - if (m->avctx->request_channel_layout && (s->ch_layout & m->avctx->request_channel_layout) == + if (m->avctx->request_channel_layout && (s->mask & m->avctx->request_channel_layout) == m->avctx->request_channel_layout && m->max_decoded_substream > substr) { av_log(m->avctx, AV_LOG_DEBUG, "Extracting %d-channel downmix (0x%"PRIx64") from substream %d. " "Further substreams will be skipped.\n", - s->max_channel + 1, s->ch_layout, substr); + s->max_channel + 1, s->mask, substr); m->max_decoded_substream = substr; } @@ -543,9 +543,9 @@ static int read_restart_header(MLPDecodeContext *m, BitstreamContext *bc, for (ch = 0; ch <= s->max_matrix_channel; ch++) { int ch_assign = bitstream_read(bc, 6); if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD) { - uint64_t channel = thd_channel_layout_extract_channel(s->ch_layout, + uint64_t channel = thd_channel_layout_extract_channel(s->mask, ch_assign); - ch_assign = av_get_channel_layout_channel_index(s->ch_layout, + ch_assign = av_get_channel_layout_channel_index(s->mask, channel); } if (ch_assign < 0 || ch_assign > s->max_matrix_channel) { @@ -587,7 +587,7 @@ static int read_restart_header(MLPDecodeContext *m, BitstreamContext *bc, if (substr == m->max_decoded_substream) { m->avctx->channels = s->max_matrix_channel + 1; - m->avctx->channel_layout = s->ch_layout; + m->avctx->channel_layout = s->mask; m->dsp.mlp_pack_output = m->dsp.mlp_select_pack_output(s->ch_assign, s->output_shift, s->max_matrix_channel, |