FFmpeg
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
g
h
i
o
q
r
s
v
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
a
d
e
f
h
i
j
l
m
n
p
r
s
v
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
libavcodec
mjpegenc_huffman.h
Go to the documentation of this file.
1
/*
2
* MJPEG encoder
3
* Copyright (c) 2016 William Ma, Ted Ying, Jerry Jiang
4
*
5
* This file is part of FFmpeg.
6
*
7
* FFmpeg is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
11
*
12
* FFmpeg 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 GNU
15
* Lesser General Public License for more details.
16
*
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with FFmpeg; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
*/
21
22
/**
23
* @file
24
* Huffman table generation for MJPEG encoder.
25
*/
26
27
#ifndef AVCODEC_MJPEGENC_HUFFMAN_H
28
#define AVCODEC_MJPEGENC_HUFFMAN_H
29
30
#include <stdint.h>
31
32
typedef
struct
MJpegEncHuffmanContext
{
33
int
val_count
[256];
34
}
MJpegEncHuffmanContext
;
35
36
// Uses the package merge algorithm to compute the Huffman table.
37
void
ff_mjpeg_encode_huffman_init
(
MJpegEncHuffmanContext
*
s
);
38
static
inline
void
ff_mjpeg_encode_huffman_increment
(
MJpegEncHuffmanContext
*
s
,
39
uint8_t
val
)
40
{
41
s
->val_count[
val
]++;
42
}
43
void
ff_mjpeg_encode_huffman_close
(
MJpegEncHuffmanContext
*
s
,
44
uint8_t
bits
[17], uint8_t
val
[],
45
int
max_nval);
46
47
#endif
/* AVCODEC_MJPEGENC_HUFFMAN_H */
val
static double val(void *priv, double ch)
Definition:
aeval.c:77
s
#define s(width, name)
Definition:
cbs_vp9.c:198
bits
uint8_t bits
Definition:
vp3data.h:128
MJpegEncHuffmanContext
Definition:
mjpegenc_huffman.h:32
ff_mjpeg_encode_huffman_close
void ff_mjpeg_encode_huffman_close(MJpegEncHuffmanContext *s, uint8_t bits[17], uint8_t val[], int max_nval)
Produces a Huffman encoding with a given input.
Definition:
mjpegenc_huffman.c:159
ff_mjpeg_encode_huffman_increment
static void ff_mjpeg_encode_huffman_increment(MJpegEncHuffmanContext *s, uint8_t val)
Definition:
mjpegenc_huffman.h:38
ff_mjpeg_encode_huffman_init
void ff_mjpeg_encode_huffman_init(MJpegEncHuffmanContext *s)
Definition:
mjpegenc_huffman.c:146
MJpegEncHuffmanContext::val_count
int val_count[256]
Definition:
mjpegenc_huffman.h:33
Generated on Mon May 5 2025 19:22:09 for FFmpeg by
1.8.17