Look up the format corresponding to a channel. * * @param[in] channel Channel type. * * @return Format that contains the given channel. */
| 143 | * @return Format that contains the given channel. |
| 144 | */ |
| 145 | inline Format get_format_for_channel(Channel channel) |
| 146 | { |
| 147 | switch (channel) |
| 148 | { |
| 149 | case Channel::R: |
| 150 | case Channel::G: |
| 151 | case Channel::B: |
| 152 | return Format::RGB888; |
| 153 | default: |
| 154 | throw std::runtime_error("Unsupported channel"); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | /** Return the format of a channel. |
| 159 | * |
no outgoing calls
no test coverage detected