Classes | Macros | Typedefs | Variables
GPMF_bitstream.h File Reference

GPMF Parser library include. More...

#include <stdint.h>
Include dependency graph for GPMF_bitstream.h:

Go to the source code of this file.

Classes

struct  bitstream
 
struct  rlv
 
struct  RLVTABLE
 

Macros

#define _BITMASK(n)   ((((BITSTREAM_WORD_TYPE )1 << (n))) - 1)
 
#define BITMASK(n)   _bitmask[n]
 
#define BITSTREAM_ERROR_OVERFLOW   1
 
#define BITSTREAM_WORD_SIZE   16
 
#define BITSTREAM_WORD_TYPE   uint16_t
 
#define HUFF_END_CODE_ENTRY   1
 
#define HUFF_ESC_CODE_ENTRY   0
 

Typedefs

typedef struct bitstream BITSTREAM
 
typedef struct rlv RLV
 

Variables

static const BITSTREAM_WORD_TYPE _bitmask []
 
static RLVTABLE enccontrolcodestable
 
static RLVTABLE enchuftable
 
static RLVTABLE enczerorunstable
 

Detailed Description

GPMF Parser library include.

Some GPMF streams may contain compressed data, this is useful for high frequency sensor data that is highly correlated like IMU data. The compression is Huffman coding of the delta between samples, with addition codewords for runs of zeros, and optional quantization. The compression scheme is similar to the Huffman coding in JPEG. As it intended for lossless compression (with quantize set to 1) it can only compress/decompress integer based streams.

Version
1.2.0

(C) Copyright 2017 GoPro Inc (http://gopro.com/).

Licensed under either:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file GPMF_bitstream.h.

Macro Definition Documentation

◆ _BITMASK

#define _BITMASK (   n)    ((((BITSTREAM_WORD_TYPE )1 << (n))) - 1)

Definition at line 58 of file GPMF_bitstream.h.

◆ BITMASK

#define BITMASK (   n)    _bitmask[n]

Definition at line 57 of file GPMF_bitstream.h.

◆ BITSTREAM_ERROR_OVERFLOW

#define BITSTREAM_ERROR_OVERFLOW   1

Definition at line 55 of file GPMF_bitstream.h.

◆ BITSTREAM_WORD_SIZE

#define BITSTREAM_WORD_SIZE   16

Definition at line 54 of file GPMF_bitstream.h.

◆ BITSTREAM_WORD_TYPE

#define BITSTREAM_WORD_TYPE   uint16_t

Definition at line 53 of file GPMF_bitstream.h.

◆ HUFF_END_CODE_ENTRY

#define HUFF_END_CODE_ENTRY   1

Definition at line 141 of file GPMF_bitstream.h.

◆ HUFF_ESC_CODE_ENTRY

#define HUFF_ESC_CODE_ENTRY   0

Definition at line 140 of file GPMF_bitstream.h.

Typedef Documentation

◆ BITSTREAM

typedef struct bitstream BITSTREAM

◆ RLV

typedef struct rlv RLV

Variable Documentation

◆ _bitmask

const BITSTREAM_WORD_TYPE _bitmask[]
static
Initial value:
=
{
_BITMASK(8), _BITMASK(9), _BITMASK(10), _BITMASK(11),
_BITMASK(12), _BITMASK(13), _BITMASK(14), _BITMASK(15),
0xFFFF
}

Definition at line 60 of file GPMF_bitstream.h.

◆ enccontrolcodestable

RLVTABLE enccontrolcodestable
static
Initial value:
= {
2,
{
{ 16, 0b1110001111000100, 0, 0 },
{ 16, 0b1110001111000101, 0, 0 },
}
}

Definition at line 142 of file GPMF_bitstream.h.

◆ enchuftable

RLVTABLE enchuftable
static

Definition at line 83 of file GPMF_bitstream.h.

◆ enczerorunstable

RLVTABLE enczerorunstable
static
Initial value:
= {
4,
{
{ 7, 0b1111110, 16, 0 },
{ 8, 0b11111110, 32, 0 },
{ 9, 0b111111111, 64, 0 },
{ 10,0b1111111101, 128, 0 },
}
}

Definition at line 130 of file GPMF_bitstream.h.

_BITMASK
#define _BITMASK(n)
Definition: GPMF_bitstream.h:58


gpmf_metadata_extractor
Author(s): Martin Pecka , Liam Samuel Pach
autogenerated on Wed May 28 2025 02:07:33