1/* Implementation header.
2
3   Copyright (C) 2022 Free Software Foundation, Inc.
4
5   This file is part of libsframe.
6
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation; either version 3 of the License, or
10   (at your option) any later version.
11
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20#ifndef _SFRAME_IMPL_H
21#define _SFRAME_IMPL_H
22
23#include "sframe-api.h"
24
25#ifdef  __cplusplus
26extern "C"
27{
28#endif
29
30#include <assert.h>
31#define sframe_assert(expr) (assert (expr))
32
33struct sframe_decoder_ctx
34{
35  sframe_header sfd_header;	      /* SFrame header.  */
36  uint32_t *sfd_funcdesc;	      /* SFrame function desc entries table.  */
37  void *sfd_fres;		      /* SFrame FRE table.  */
38  int sfd_fre_nbytes;		      /* Number of bytes needed for SFrame FREs.  */
39};
40
41struct sframe_encoder_ctx
42{
43  sframe_header sfe_header;		/* SFrame header.  */
44  uint32_t *sfe_funcdesc;		/* SFrame function desc entries table.  */
45  sframe_frame_row_entry *sfe_fres;	/* SFrame FRE table.  */
46  uint32_t sfe_fre_nbytes;		/* Number of bytes needed for SFrame FREs.  */
47  char *sfe_data;			/* SFrame data buffer.  */
48  size_t sfe_data_size;			/* Size of the SFrame data buffer.  */
49};
50
51#ifdef  __cplusplus
52}
53#endif
54
55#endif /* _SFRAME_IMPL_H */
56