FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavcodec
cfhd.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Kieran Kunhya
3
*
4
* This file is part of FFmpeg.
5
*
6
* FFmpeg is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* FFmpeg is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with FFmpeg; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef AVCODEC_CFHD_H
22
#define AVCODEC_CFHD_H
23
24
#include <stdint.h>
25
26
#include "
libavutil/avassert.h
"
27
28
#include "
avcodec.h
"
29
#include "
bytestream.h
"
30
#include "
get_bits.h
"
31
#include "
vlc.h
"
32
33
#define VLC_BITS 9
34
#define SUBBAND_COUNT 10
35
36
typedef
struct
CFHD_RL_VLC_ELEM
{
37
int16_t
level
;
38
int8_t
len
;
39
uint16_t
run
;
40
}
CFHD_RL_VLC_ELEM
;
41
42
#define DWT_LEVELS 3
43
44
typedef
struct
SubBand
{
45
int
level
;
46
int
orientation
;
47
ptrdiff_t
stride
;
48
int
a_width
;
49
int
width
;
50
int
a_height
;
51
int
height
;
52
int
pshift
;
53
int
quant
;
54
uint8_t
*
ibuf
;
55
}
SubBand
;
56
57
typedef
struct
Plane
{
58
int
width
;
59
int
height
;
60
ptrdiff_t
stride
;
61
62
int16_t *
idwt_buf
;
63
int16_t *
idwt_tmp
;
64
65
/* TODO: merge this into SubBand structure */
66
int16_t *
subband
[
SUBBAND_COUNT
];
67
int16_t *
l_h
[8];
68
69
SubBand
band
[
DWT_LEVELS
][4];
70
}
Plane
;
71
72
typedef
struct
Peak
{
73
int
level
;
74
int
offset
;
75
GetByteContext
base
;
76
}
Peak
;
77
78
typedef
struct
CFHDContext
{
79
AVCodecContext
*
avctx
;
80
81
CFHD_RL_VLC_ELEM
table_9_rl_vlc
[2088];
82
VLC
vlc_9
;
83
84
CFHD_RL_VLC_ELEM
table_18_rl_vlc
[4572];
85
VLC
vlc_18
;
86
87
GetBitContext
gb
;
88
89
int
coded_width
;
90
int
coded_height
;
91
int
cropped_height
;
92
enum
AVPixelFormat
coded_format
;
93
int
progressive
;
94
95
int
a_width
;
96
int
a_height
;
97
int
a_format
;
98
99
int
bpc
;
// bits per channel/component
100
int
channel_cnt
;
101
int
subband_cnt
;
102
int
channel_num
;
103
uint8_t
lowpass_precision
;
104
uint16_t
quantisation
;
105
int
wavelet_depth
;
106
int
pshift
;
107
108
int
codebook
;
109
int
difference_coding
;
110
int
subband_num
;
111
int
level
;
112
int
subband_num_actual
;
113
114
uint8_t
prescale_shift
[3];
115
Plane
plane
[4];
116
Peak
peak
;
117
}
CFHDContext
;
118
119
int
ff_cfhd_init_vlcs
(
CFHDContext
*
s
);
120
121
#endif
/* AVCODEC_CFHD_H */
SubBand::quant
int quant
Definition:
cfhd.h:53
CFHDContext::channel_cnt
int channel_cnt
Definition:
cfhd.h:100
GetByteContext
Definition:
bytestream.h:33
CFHDContext::difference_coding
int difference_coding
Definition:
cfhd.h:109
CFHDContext::vlc_18
VLC vlc_18
Definition:
cfhd.h:85
CFHDContext::avctx
AVCodecContext * avctx
Definition:
cfhd.h:79
SubBand::a_height
int a_height
Definition:
cfhd.h:50
Peak::level
int level
Definition:
cfhd.h:73
vlc.h
CFHDContext::cropped_height
int cropped_height
Definition:
cfhd.h:91
Plane::idwt_tmp
int16_t * idwt_tmp
Definition:
cfhd.h:63
CFHDContext::a_width
int a_width
Definition:
cfhd.h:95
SubBand::stride
ptrdiff_t stride
Definition:
cfhd.h:47
CFHDContext::subband_num_actual
int subband_num_actual
Definition:
cfhd.h:112
CFHDContext
Definition:
cfhd.h:78
SubBand::width
int width
Definition:
cfhd.h:49
uint8_t
uint8_t
Definition:
audio_convert.c:194
Plane::idwt_buf
int16_t * idwt_buf
Definition:
cfhd.h:62
CFHDContext::a_format
int a_format
Definition:
cfhd.h:97
get_bits.h
bitstream reader API header.
SUBBAND_COUNT
#define SUBBAND_COUNT
Definition:
cfhd.h:34
SubBand
Definition:
cfhd.h:44
CFHD_RL_VLC_ELEM::len
int8_t len
Definition:
cfhd.h:38
CFHDContext::table_18_rl_vlc
CFHD_RL_VLC_ELEM table_18_rl_vlc[4572]
Definition:
cfhd.h:84
CFHDContext::table_9_rl_vlc
CFHD_RL_VLC_ELEM table_9_rl_vlc[2088]
Definition:
cfhd.h:81
CFHDContext::prescale_shift
uint8_t prescale_shift[3]
Definition:
cfhd.h:114
CFHDContext::vlc_9
VLC vlc_9
Definition:
cfhd.h:82
Plane::l_h
int16_t * l_h[8]
Definition:
cfhd.h:67
DWT_LEVELS
#define DWT_LEVELS
Definition:
cfhd.h:42
avassert.h
simple assert() macros that are a bit more flexible than ISO C assert().
CFHD_RL_VLC_ELEM
Definition:
cfhd.h:36
bytestream.h
Peak
Definition:
cfhd.h:72
VLC
Definition:
vlc.h:26
SubBand::a_width
int a_width
Definition:
cfhd.h:48
SubBand::orientation
int orientation
Definition:
cfhd.h:46
CFHD_RL_VLC_ELEM::run
uint16_t run
Definition:
cfhd.h:39
Plane::band
SubBand band[DWT_LEVELS][4]
Definition:
cfhd.h:69
Peak::base
GetByteContext base
Definition:
cfhd.h:75
SubBand::ibuf
uint8_t * ibuf
Definition:
cfhd.h:54
CFHDContext::subband_cnt
int subband_cnt
Definition:
cfhd.h:101
CFHDContext::quantisation
uint16_t quantisation
Definition:
cfhd.h:104
s
#define s(width, name)
Definition:
cbs_vp9.c:257
CFHDContext::channel_num
int channel_num
Definition:
cfhd.h:102
CFHDContext::gb
GetBitContext gb
Definition:
cfhd.h:87
CFHDContext::wavelet_depth
int wavelet_depth
Definition:
cfhd.h:105
avcodec.h
Libavcodec external API header.
AVCodecContext
main external API structure.
Definition:
avcodec.h:1533
CFHDContext::codebook
int codebook
Definition:
cfhd.h:108
CFHDContext::subband_num
int subband_num
Definition:
cfhd.h:110
CFHDContext::pshift
int pshift
Definition:
cfhd.h:106
CFHDContext::coded_format
enum AVPixelFormat coded_format
Definition:
cfhd.h:92
CFHDContext::peak
Peak peak
Definition:
cfhd.h:116
CFHDContext::level
int level
Definition:
cfhd.h:111
SubBand::pshift
int pshift
Definition:
cfhd.h:52
CFHDContext::coded_width
int coded_width
Definition:
cfhd.h:89
GetBitContext
Definition:
get_bits.h:61
Plane::stride
ptrdiff_t stride
Definition:
cfhd.h:60
CFHDContext::bpc
int bpc
Definition:
cfhd.h:99
CFHDContext::a_height
int a_height
Definition:
cfhd.h:96
SubBand::height
int height
Definition:
cfhd.h:51
Plane::width
int width
Definition:
cfhd.h:58
Peak::offset
int offset
Definition:
cfhd.h:74
ff_cfhd_init_vlcs
int ff_cfhd_init_vlcs(CFHDContext *s)
Definition:
cfhddata.c:276
CFHDContext::progressive
int progressive
Definition:
cfhd.h:93
CFHD_RL_VLC_ELEM::level
int16_t level
Definition:
cfhd.h:37
CFHDContext::plane
Plane plane[4]
Definition:
cfhd.h:115
Plane::height
int height
Definition:
cfhd.h:59
CFHDContext::lowpass_precision
uint8_t lowpass_precision
Definition:
cfhd.h:103
Plane::subband
int16_t * subband[SUBBAND_COUNT]
Definition:
cfhd.h:66
AVPixelFormat
AVPixelFormat
Pixel format.
Definition:
pixfmt.h:64
Plane
Definition:
cfhd.h:57
SubBand::level
int level
Definition:
cfhd.h:45
CFHDContext::coded_height
int coded_height
Definition:
cfhd.h:90
Generated on Tue Nov 6 2018 18:11:02 for FFmpeg by
1.8.6