OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/base/sample_format.h" | 5 #include "media/base/sample_format.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace media { | 9 namespace media { |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 return "Signed 16-bit planar"; | 44 return "Signed 16-bit planar"; |
45 case kSampleFormatPlanarF32: | 45 case kSampleFormatPlanarF32: |
46 return "Float 32-bit planar"; | 46 return "Float 32-bit planar"; |
47 case kSampleFormatPlanarS32: | 47 case kSampleFormatPlanarS32: |
48 return "Signed 32-bit planar"; | 48 return "Signed 32-bit planar"; |
49 } | 49 } |
50 NOTREACHED() << "Invalid sample format provided: " << sample_format; | 50 NOTREACHED() << "Invalid sample format provided: " << sample_format; |
51 return ""; | 51 return ""; |
52 } | 52 } |
53 | 53 |
54 bool IsPlanar(SampleFormat sample_format) { | |
DaleCurtis
2015/11/24 21:40:08
Might be worth making these both fully-qualified s
jrummell
2015/11/24 22:34:41
Done.
| |
55 return sample_format == kSampleFormatPlanarF32 || | |
56 sample_format == kSampleFormatPlanarS16 || | |
57 sample_format == kSampleFormatPlanarS32; | |
58 } | |
59 | |
60 bool IsInterleaved(SampleFormat sample_format) { | |
61 return sample_format == kSampleFormatU8 || | |
62 sample_format == kSampleFormatS16 || | |
63 sample_format == kSampleFormatS32 || sample_format == kSampleFormatF32; | |
64 } | |
65 | |
54 } // namespace media | 66 } // namespace media |
OLD | NEW |