Clamp integer to [0, 255] range.
| 31 | |
| 32 | // Clamp integer to [0, 255] range. |
| 33 | inline fl::u8 clampU8(int v) FL_NOEXCEPT { |
| 34 | if (v < 0) return 0; |
| 35 | if (v > 255) return 255; |
| 36 | return static_cast<fl::u8>(v); |
| 37 | } |
| 38 | |
| 39 | // Split Annex B bytestream into individual NAL units. |
| 40 | // Finds 0x00 0x00 0x00 0x01 start codes and returns data between them. |