Home | History | Annotate | Download | only in src

Lines Matching refs:layout

73    ChannelLayout layout;
94 for (s=0;s<st->layout.nb_streams;s++)
96 if (s < st->layout.nb_coupled_streams)
101 return (opus_val32*)(ptr+st->layout.nb_channels*120*sizeof(opus_val32));
113 for (s=0;s<st->layout.nb_streams;s++)
115 if (s < st->layout.nb_coupled_streams)
123 static int validate_encoder_layout(const ChannelLayout *layout)
126 for (s=0;s<layout->nb_streams;s++)
128 if (s < layout->nb_coupled_streams)
130 if (get_left_channel(layout, s, -1)==-1)
132 if (get_right_channel(layout, s, -1)==-1)
135 if (get_mono_channel(layout, s, -1)==-1)
414 st->layout.nb_channels = channels;
415 st->layout.nb_streams = streams;
416 st->layout.nb_coupled_streams = coupled_streams;
423 for (i=0;i<st->layout.nb_channels;i++)
424 st->layout.mapping[i] = mapping[i];
425 if (!validate_layout(&st->layout) || !validate_encoder_layout(&st->layout))
431 for (i=0;i<st->layout.nb_coupled_streams;i++)
439 for (;i<st->layout.nb_streams;i++)
612 if (st->bitrate_bps > st->layout.nb_channels*40000)
615 stream_offset = st->bitrate_bps/st->layout.nb_channels/2;
639 nb_coupled = st->layout.nb_coupled_streams;
640 nb_uncoupled = st->layout.nb_streams-nb_coupled-nb_lfe;
655 for (i=0;i<st->layout.nb_streams;i++)
657 if (i<st->layout.nb_coupled_streams)
714 channels = st->layout.nb_streams + st->layout.nb_coupled_streams;
744 ALLOC(bandSMR, 21*st->layout.nb_channels, opus_val16);
747 surround_analysis(celt_mode, pcm, bandSMR, mem, preemph_mem, frame_size, 120, st->layout.nb_channels, Fs, copy_channel_in);
750 if (max_data_bytes < 4*st->layout.nb_streams-1)
763 for (s=0;s<st->layout.nb_streams;s++)
767 if (s < st->layout.nb_coupled_streams)
777 equiv_rate -= 60*(Fs/frame_size - 50)*st->layout.nb_channels;
778 if (equiv_rate > 10000*st->layout.nb_channels)
780 else if (equiv_rate > 7000*st->layout.nb_channels)
782 else if (equiv_rate > 5000*st->layout.nb_channels)
786 if (s < st->layout.nb_coupled_streams)
798 for (s=0;s<st->layout.nb_streams;s++)
807 if (s < st->layout.nb_coupled_streams)
811 left = get_left_channel(&st->layout, s, -1);
812 right = get_right_channel(&st->layout, s, -1);
814 pcm, st->layout.nb_channels, left, frame_size);
816 pcm, st->layout.nb_channels, right, frame_size);
830 int chan = get_mono_channel(&st->layout, s, -1);
832 pcm, st->layout.nb_channels, chan, frame_size);
847 curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1);
849 if (!vbr && s == st->layout.nb_streams-1)
852 pcm, analysis_frame_size, c1, c2, st->layout.nb_channels, downmix);
863 data, max_data_bytes-tot_size, s != st->layout.nb_streams-1, !vbr && s == st->layout.nb_streams-1);
1003 for (s=0;s<st->layout.nb_streams;s++)
1008 if (s < st->layout.nb_coupled_streams)
1050 for (s=0;s<st->layout.nb_streams;s++)
1054 if (s < st->layout.nb_coupled_streams)
1082 for (s=0;s<st->layout.nb_streams;s++)
1087 if (s < st->layout.nb_coupled_streams)
1103 if (stream_id<0 || stream_id >= st->layout.nb_streams)
1112 if (s < st->layout.nb_coupled_streams)
1142 OPUS_CLEAR(ms_get_preemph_mem(st), st->layout.nb_channels);
1143 OPUS_CLEAR(ms_get_window_mem(st), st->layout.nb_channels*120);
1145 for (s=0;s<st->layout.nb_streams;s++)
1149 if (s < st->layout.nb_coupled_streams)