Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
fd3eda40
Commit
fd3eda40
authored
6 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
avcodec/speedhq: Make speedhq_vlc const
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
c07bbdbc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/speedhq.c
+34
-39
34 additions, 39 deletions
libavcodec/speedhq.c
with
34 additions
and
39 deletions
libavcodec/speedhq.c
+
34
−
39
View file @
fd3eda40
...
...
@@ -58,40 +58,40 @@ typedef struct SHQContext {
/* AC codes: Very similar but not identical to MPEG-2. */
static
uint16_t
speedhq_vlc
[
123
][
2
]
=
{
{
0x0
2
,
2
},
{
0x0
6
,
3
},
{
0x0
7
,
4
},
{
0x
1c
,
5
},
{
0x
1d
,
5
},
{
0x0
5
,
6
},
{
0x0
4
,
6
},
{
0x
7b
,
7
},
{
0x
7c
,
7
},
{
0x
23
,
8
},
{
0x
22
,
8
},
{
0x
fa
,
8
},
{
0x
fb
,
8
},
{
0x
fe
,
8
},
{
0x
ff
,
8
},
{
0x
1f
,
14
},
{
0x1
e
,
14
},
{
0x
1d
,
14
},
{
0x
1c
,
14
},
{
0x
1b
,
14
},
{
0x1
a
,
14
},
{
0x
19
,
14
},
{
0x
18
,
14
},
{
0x
17
,
14
},
{
0x1
6
,
14
},
{
0x
15
,
14
},
{
0x
14
,
14
},
{
0x
13
,
14
},
{
0x12
,
14
},
{
0x
11
,
14
},
{
0x
1
0
,
14
},
{
0x
18
,
15
},
{
0x
17
,
15
},
{
0x
16
,
15
},
{
0x
15
,
15
},
{
0x14
,
15
},
{
0x
13
,
15
},
{
0x
12
,
15
},
{
0x
11
,
15
},
{
0x
1
0
,
15
},
{
0x02
,
3
},
{
0x0
6
,
5
},
{
0x
79
,
7
},
{
0x
27
,
8
},
{
0x
20
,
8
},
{
0x
16
,
13
},
{
0x15
,
13
},
{
0x
1f
,
15
},
{
0x
1e
,
15
},
{
0x
1d
,
15
},
{
0x1
c
,
15
},
{
0x
1b
,
15
},
{
0x
1a
,
15
},
{
0x
19
,
15
},
{
0x
13
,
16
},
{
0x
12
,
16
},
{
0x
11
,
16
},
{
0x
1
0
,
16
},
{
0x
18
,
13
},
{
0x1
7
,
13
},
{
0x0
5
,
5
},
{
0x0
7
,
7
},
{
0x
fc
,
8
},
{
0x0
c
,
10
},
{
0x
14
,
13
},
{
0x18
,
12
},
{
0x
14
,
12
},
{
0x
13
,
12
},
{
0x
1
0
,
12
},
{
0x
1a
,
13
},
{
0x1
9
,
13
},
{
0x0
7
,
5
},
{
0x
26
,
8
},
{
0x
1c
,
12
},
{
0x1
3
,
13
},
{
0x
1b
,
12
},
{
0x0
6
,
6
},
{
0x
fd
,
8
},
{
0x
12
,
12
},
{
0x
1d
,
12
},
{
0x0
7
,
6
},
{
0x0
4
,
9
},
{
0x
12
,
13
},
{
0x0
6
,
7
},
{
0x
1e
,
12
},
{
0x
14
,
16
},
{
0x0
4
,
7
},
{
0x
15
,
12
},
{
0x0
5
,
7
},
{
0x
11
,
12
},
{
0x
78
,
7
},
{
0x11
,
13
},
{
0x
7a
,
7
},
{
0x
1
0
,
13
},
{
0x
21
,
8
},
{
0x
1a
,
16
},
{
0x
25
,
8
},
{
0x
19
,
16
},
{
0x24
,
8
},
{
0x18
,
16
},
{
0x0
5
,
9
},
{
0x
17
,
16
},
{
0x0
7
,
9
},
{
0x
16
,
16
},
{
0x0
d
,
10
},
{
0x
15
,
16
},
{
0x
1f
,
12
},
{
0x
1a
,
12
},
{
0x
19
,
12
},
{
0x
17
,
12
},
{
0x
16
,
12
},
{
0x1
f
,
13
},
{
0x
1e
,
13
},
{
0x1
d
,
13
},
{
0x
1c
,
13
},
{
0x1
b
,
13
},
{
0x
1f
,
16
},
{
0x
1e
,
16
},
{
0x
1d
,
16
},
{
0x
1c
,
16
},
{
0x
1b
,
16
},
{
0x0
1
,
6
},
/* escape */
{
0x0
6
,
4
}
,
/* EOB */
static
const
uint16_t
speedhq_vlc
[
123
][
2
]
=
{
{
0x0
001
,
2
},
{
0x0
003
,
3
},
{
0x0
00E
,
4
},
{
0x
0007
,
5
},
{
0x
0017
,
5
},
{
0x0
028
,
6
},
{
0x0
008
,
6
},
{
0x
006F
,
7
},
{
0x
001F
,
7
},
{
0x
00C4
,
8
},
{
0x
0044
,
8
},
{
0x
005F
,
8
},
{
0x
00DF
,
8
},
{
0x
007F
,
8
},
{
0x
00FF
,
8
},
{
0x
3E00
,
14
},
{
0x1
E00
,
14
},
{
0x
2E00
,
14
},
{
0x
0E00
,
14
},
{
0x
3600
,
14
},
{
0x1
600
,
14
},
{
0x
2600
,
14
},
{
0x
0600
,
14
},
{
0x
3A00
,
14
},
{
0x1
A00
,
14
},
{
0x
2A00
,
14
},
{
0x
0A00
,
14
},
{
0x
3200
,
14
},
{
0x12
00
,
14
},
{
0x
2200
,
14
},
{
0x
020
0
,
14
},
{
0x
0C00
,
15
},
{
0x
7400
,
15
},
{
0x
3400
,
15
},
{
0x
5400
,
15
},
{
0x14
00
,
15
},
{
0x
6400
,
15
},
{
0x
2400
,
15
},
{
0x
4400
,
15
},
{
0x
040
0
,
15
},
{
0x0
00
2
,
3
},
{
0x0
00C
,
5
},
{
0x
004F
,
7
},
{
0x
00E4
,
8
},
{
0x
0004
,
8
},
{
0x
0D00
,
13
},
{
0x15
00
,
13
},
{
0x
7C00
,
15
},
{
0x
3C00
,
15
},
{
0x
5C00
,
15
},
{
0x1
C00
,
15
},
{
0x
6C00
,
15
},
{
0x
2C00
,
15
},
{
0x
4C00
,
15
},
{
0x
C800
,
16
},
{
0x
4800
,
16
},
{
0x
8800
,
16
},
{
0x
080
0
,
16
},
{
0x
0300
,
13
},
{
0x1
D00
,
13
},
{
0x0
014
,
5
},
{
0x0
070
,
7
},
{
0x
003F
,
8
},
{
0x0
0C0
,
10
},
{
0x
0500
,
13
},
{
0x
0
18
0
,
12
},
{
0x
0280
,
12
},
{
0x
0C80
,
12
},
{
0x
008
0
,
12
},
{
0x
0B00
,
13
},
{
0x1
300
,
13
},
{
0x0
01C
,
5
},
{
0x
0064
,
8
},
{
0x
0380
,
12
},
{
0x1
900
,
13
},
{
0x
0D80
,
12
},
{
0x0
018
,
6
},
{
0x
00BF
,
8
},
{
0x
0480
,
12
},
{
0x
0B80
,
12
},
{
0x0
038
,
6
},
{
0x0
040
,
9
},
{
0x
0900
,
13
},
{
0x0
030
,
7
},
{
0x
0780
,
12
},
{
0x
2800
,
16
},
{
0x0
010
,
7
},
{
0x
0A80
,
12
},
{
0x0
050
,
7
},
{
0x
0880
,
12
},
{
0x
000F
,
7
},
{
0x11
00
,
13
},
{
0x
002F
,
7
},
{
0x
010
0
,
13
},
{
0x
0084
,
8
},
{
0x
5800
,
16
},
{
0x
00A4
,
8
},
{
0x
9800
,
16
},
{
0x
00
24
,
8
},
{
0x18
00
,
16
},
{
0x0
140
,
9
},
{
0x
E800
,
16
},
{
0x0
1C0
,
9
},
{
0x
6800
,
16
},
{
0x0
2C0
,
10
},
{
0x
A800
,
16
},
{
0x
0F80
,
12
},
{
0x
0580
,
12
},
{
0x
0980
,
12
},
{
0x
0E80
,
12
},
{
0x
0680
,
12
},
{
0x1
F00
,
13
},
{
0x
0F00
,
13
},
{
0x1
700
,
13
},
{
0x
0700
,
13
},
{
0x1
B00
,
13
},
{
0x
F800
,
16
},
{
0x
7800
,
16
},
{
0x
B800
,
16
},
{
0x
3800
,
16
},
{
0x
D800
,
16
},
{
0x0
020
,
6
},
/* escape */
{
0x0
006
,
4
}
/* EOB */
};
static
const
uint8_t
speedhq_level
[
121
]
=
{
...
...
@@ -580,7 +580,6 @@ static av_cold void speedhq_static_init(void)
{
uint16_t
ff_mpeg12_vlc_dc_lum_code_reversed
[
12
];
uint16_t
ff_mpeg12_vlc_dc_chroma_code_reversed
[
12
];
int
i
;
/* Exactly the same as MPEG-2, except little-endian. */
reverse_code
(
ff_mpeg12_vlc_dc_lum_code
,
...
...
@@ -598,10 +597,6 @@ static av_cold void speedhq_static_init(void)
ff_mpeg12_vlc_dc_chroma_bits
,
1
,
1
,
ff_mpeg12_vlc_dc_chroma_code_reversed
,
2
,
2
,
514
);
/* Reverse the AC VLC, because INIT_VLC_LE wants it in that order. */
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
speedhq_vlc
);
++
i
)
{
speedhq_vlc
[
i
][
0
]
=
reverse
(
speedhq_vlc
[
i
][
0
],
speedhq_vlc
[
i
][
1
]);
}
ff_rl_init
(
&
ff_rl_speedhq
,
ff_speedhq_static_rl_table_store
);
INIT_2D_VLC_RL
(
ff_rl_speedhq
,
674
,
INIT_VLC_LE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment