1 /*
2  * ScreenPressor version 3 decoder
3  *
4  * Copyright (c) 2017 Paul B Mahol
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_SCPR3_H
24 #define AVCODEC_SCPR3_H
25 
26 #include <stdint.h>
27 
28 typedef struct PixelModel3 {
29     uint8_t    type;
30     uint8_t    length;
31     uint8_t    maxpos;
32     uint8_t    fshift;
33     uint16_t   size;
34     uint32_t   cntsum;
35     uint8_t    symbols[256];
36     uint16_t   freqs[256];
37     uint16_t   freqs1[256];
38     uint16_t   cnts[256];
39     uint8_t    dectab[32];
40 } PixelModel3;
41 
42 typedef struct FillModel3 {
43     uint32_t   cntsum;
44     uint16_t   freqs[2][5];
45     uint16_t   cnts[5];
46     uint8_t    dectab[32];
47 } FillModel3;
48 
49 typedef struct OpModel3 {
50     uint32_t   cntsum;
51     uint16_t   freqs[2][6];
52     uint16_t   cnts[6];
53     uint8_t    dectab[32];
54 } OpModel3;
55 
56 typedef struct RunModel3 {
57     uint32_t   cntsum;
58     uint16_t   freqs[2][256];
59     uint16_t   cnts[256];
60     uint8_t    dectab[32];
61 } RunModel3;
62 
63 typedef struct SxyModel3 {
64     uint32_t   cntsum;
65     uint16_t   freqs[2][16];
66     uint16_t   cnts[16];
67     uint8_t    dectab[32];
68 } SxyModel3;
69 
70 typedef struct MVModel3 {
71     uint32_t   cntsum;
72     uint16_t   freqs[2][512];
73     uint16_t   cnts[512];
74     uint8_t    dectab[32];
75 } MVModel3;
76 
77 #endif /* AVCODEC_SCPR3_H */
78