adts_constants.cc 1.1 KB

123456789101112131415161718192021222324252627
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "media/formats/mpeg/adts_constants.h"
  5. #include <iterator>
  6. namespace media {
  7. // The following conversion table is extracted from ISO 14496 Part 3 -
  8. // Table 1.16 - Sampling Frequency Index.
  9. const int kADTSFrequencyTable[] = {96000, 88200, 64000, 48000, 44100,
  10. 32000, 24000, 22050, 16000, 12000,
  11. 11025, 8000, 7350};
  12. const size_t kADTSFrequencyTableSize = std::size(kADTSFrequencyTable);
  13. // The following conversion table is extracted from ISO 14496 Part 3 -
  14. // Table 1.17 - Channel Configuration.
  15. const media::ChannelLayout kADTSChannelLayoutTable[] = {
  16. media::CHANNEL_LAYOUT_NONE, media::CHANNEL_LAYOUT_MONO,
  17. media::CHANNEL_LAYOUT_STEREO, media::CHANNEL_LAYOUT_SURROUND,
  18. media::CHANNEL_LAYOUT_4_0, media::CHANNEL_LAYOUT_5_0_BACK,
  19. media::CHANNEL_LAYOUT_5_1_BACK, media::CHANNEL_LAYOUT_7_1};
  20. const size_t kADTSChannelLayoutTableSize = std::size(kADTSChannelLayoutTable);
  21. } // namespace media