Lines Matching refs:header
221 OpusHeader* header) { in ParseOpusHeader() argument
253 header->channels = *(data + kOpusHeaderChannelsOffset); in ParseOpusHeader()
254 if (header->channels <= 0 || header->channels > kMaxChannels) { in ParseOpusHeader()
255 ALOGE("Invalid Header, wrong channel count: %d", header->channels); in ParseOpusHeader()
259 header->skip_samples = ReadLE16(data, in ParseOpusHeader()
263 header->gain_db = static_cast<int16_t>(ReadLE16(data, in ParseOpusHeader()
267 header->channel_mapping = *(data + kOpusHeaderChannelMappingOffset); in ParseOpusHeader()
268 if (!header->channel_mapping) { in ParseOpusHeader()
269 if (header->channels > kMaxChannelsWithDefaultLayout) { in ParseOpusHeader()
273 header->num_streams = 1; in ParseOpusHeader()
274 header->num_coupled = header->channels > 1; in ParseOpusHeader()
275 header->stream_map[0] = 0; in ParseOpusHeader()
276 header->stream_map[1] = 1; in ParseOpusHeader()
279 if (data_size < kOpusHeaderStreamMapOffset + header->channels) { in ParseOpusHeader()
281 "count: %d", header->channels); in ParseOpusHeader()
284 header->num_streams = *(data + kOpusHeaderNumStreamsOffset); in ParseOpusHeader()
285 header->num_coupled = *(data + kOpusHeaderNumCoupledOffset); in ParseOpusHeader()
286 if (header->num_streams + header->num_coupled != header->channels) { in ParseOpusHeader()
290 for (int i = 0; i < header->channels; ++i) in ParseOpusHeader()
291 header->stream_map[i] = *(data + kOpusHeaderStreamMapOffset + i); in ParseOpusHeader()