2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
13 class CBitstreamReader
16 CBitstreamReader(const uint8_t *buf
, int len
);
17 uint32_t ReadBits(int nbits
);
18 void SkipBits(int nbits
);
19 uint32_t GetBits(int nbits
);
20 unsigned int Position() { return m_posBits
; }
21 unsigned int AvailableBits() { return length
* 8 - m_posBits
; }
24 const uint8_t *buffer
, *start
;
25 int offbits
= 0, length
, oflow
= 0;
29 const uint8_t* find_start_code(const uint8_t* p
, const uint8_t* end
, uint32_t* state
);