Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
fd3eda40
Commit
fd3eda40
authored
Sep 19, 2018
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/speedhq: Make speedhq_vlc const
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
c07bbdbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
39 deletions
+34
-39
speedhq.c
libavcodec/speedhq.c
+34
-39
No files found.
libavcodec/speedhq.c
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
},
{
0x06
,
3
},
{
0x07
,
4
},
{
0x1c
,
5
},
{
0x
1d
,
5
},
{
0x05
,
6
},
{
0x04
,
6
},
{
0x7b
,
7
},
{
0x
7c
,
7
},
{
0x23
,
8
},
{
0x22
,
8
},
{
0xfa
,
8
},
{
0x
fb
,
8
},
{
0xfe
,
8
},
{
0xff
,
8
},
{
0x1f
,
14
},
{
0x1
e
,
14
},
{
0x1d
,
14
},
{
0x1c
,
14
},
{
0x1b
,
14
},
{
0x1
a
,
14
},
{
0x19
,
14
},
{
0x18
,
14
},
{
0x17
,
14
},
{
0x1
6
,
14
},
{
0x15
,
14
},
{
0x14
,
14
},
{
0x13
,
14
},
{
0x12
,
14
},
{
0x11
,
14
},
{
0x10
,
14
},
{
0x18
,
15
},
{
0x
17
,
15
},
{
0x16
,
15
},
{
0x15
,
15
},
{
0x14
,
15
},
{
0x
13
,
15
},
{
0x12
,
15
},
{
0x11
,
15
},
{
0x10
,
15
},
{
0x0
2
,
3
},
{
0x06
,
5
},
{
0x79
,
7
},
{
0x27
,
8
},
{
0x
20
,
8
},
{
0x16
,
13
},
{
0x15
,
13
},
{
0x1f
,
15
},
{
0x
1e
,
15
},
{
0x1d
,
15
},
{
0x1c
,
15
},
{
0x1b
,
15
},
{
0x
1a
,
15
},
{
0x19
,
15
},
{
0x13
,
16
},
{
0x12
,
16
},
{
0x
11
,
16
},
{
0x10
,
16
},
{
0x18
,
13
},
{
0x17
,
13
},
{
0x0
5
,
5
},
{
0x07
,
7
},
{
0xfc
,
8
},
{
0x0c
,
10
},
{
0x
14
,
13
},
{
0x18
,
12
},
{
0x14
,
12
},
{
0x13
,
12
},
{
0x
10
,
12
},
{
0x1a
,
13
},
{
0x19
,
13
},
{
0x07
,
5
},
{
0x
26
,
8
},
{
0x1c
,
12
},
{
0x13
,
13
},
{
0x1b
,
12
},
{
0x0
6
,
6
},
{
0xfd
,
8
},
{
0x12
,
12
},
{
0x1d
,
12
},
{
0x0
7
,
6
},
{
0x04
,
9
},
{
0x12
,
13
},
{
0x06
,
7
},
{
0x
1e
,
12
},
{
0x14
,
16
},
{
0x04
,
7
},
{
0x15
,
12
},
{
0x0
5
,
7
},
{
0x11
,
12
},
{
0x78
,
7
},
{
0x11
,
13
},
{
0x
7a
,
7
},
{
0x10
,
13
},
{
0x21
,
8
},
{
0x1a
,
16
},
{
0x
25
,
8
},
{
0x19
,
16
},
{
0x24
,
8
},
{
0x18
,
16
},
{
0x0
5
,
9
},
{
0x17
,
16
},
{
0x07
,
9
},
{
0x16
,
16
},
{
0x0
d
,
10
},
{
0x15
,
16
},
{
0x1f
,
12
},
{
0x1a
,
12
},
{
0x
19
,
12
},
{
0x17
,
12
},
{
0x16
,
12
},
{
0x1f
,
13
},
{
0x
1e
,
13
},
{
0x1d
,
13
},
{
0x1c
,
13
},
{
0x1b
,
13
},
{
0x
1f
,
16
},
{
0x1e
,
16
},
{
0x1d
,
16
},
{
0x1c
,
16
},
{
0x
1b
,
16
},
{
0x0
1
,
6
},
/* escape */
{
0x0
6
,
4
},
/* EOB */
static
const
uint16_t
speedhq_vlc
[
123
][
2
]
=
{
{
0x0
001
,
2
},
{
0x0003
,
3
},
{
0x000E
,
4
},
{
0x0007
,
5
},
{
0x
0017
,
5
},
{
0x0028
,
6
},
{
0x0008
,
6
},
{
0x006F
,
7
},
{
0x
001F
,
7
},
{
0x00C4
,
8
},
{
0x0044
,
8
},
{
0x005F
,
8
},
{
0x
00DF
,
8
},
{
0x007F
,
8
},
{
0x00FF
,
8
},
{
0x3E00
,
14
},
{
0x1
E00
,
14
},
{
0x2E00
,
14
},
{
0x0E00
,
14
},
{
0x3600
,
14
},
{
0x1
600
,
14
},
{
0x2600
,
14
},
{
0x0600
,
14
},
{
0x3A00
,
14
},
{
0x1
A00
,
14
},
{
0x2A00
,
14
},
{
0x0A00
,
14
},
{
0x3200
,
14
},
{
0x12
00
,
14
},
{
0x2200
,
14
},
{
0x0200
,
14
},
{
0x0C00
,
15
},
{
0x
7400
,
15
},
{
0x3400
,
15
},
{
0x5400
,
15
},
{
0x1400
,
15
},
{
0x
6400
,
15
},
{
0x2400
,
15
},
{
0x4400
,
15
},
{
0x0400
,
15
},
{
0x0
002
,
3
},
{
0x000C
,
5
},
{
0x004F
,
7
},
{
0x00E4
,
8
},
{
0x
0004
,
8
},
{
0x0D00
,
13
},
{
0x1500
,
13
},
{
0x7C00
,
15
},
{
0x
3C00
,
15
},
{
0x5C00
,
15
},
{
0x1C00
,
15
},
{
0x6C00
,
15
},
{
0x
2C00
,
15
},
{
0x4C00
,
15
},
{
0xC800
,
16
},
{
0x4800
,
16
},
{
0x
8800
,
16
},
{
0x0800
,
16
},
{
0x0300
,
13
},
{
0x1D00
,
13
},
{
0x0
014
,
5
},
{
0x0070
,
7
},
{
0x003F
,
8
},
{
0x00C0
,
10
},
{
0x
0500
,
13
},
{
0x0180
,
12
},
{
0x0280
,
12
},
{
0x0C80
,
12
},
{
0x
0080
,
12
},
{
0x0B00
,
13
},
{
0x1300
,
13
},
{
0x001C
,
5
},
{
0x
0064
,
8
},
{
0x0380
,
12
},
{
0x1900
,
13
},
{
0x0D80
,
12
},
{
0x0
018
,
6
},
{
0x00BF
,
8
},
{
0x0480
,
12
},
{
0x0B80
,
12
},
{
0x0
038
,
6
},
{
0x0040
,
9
},
{
0x0900
,
13
},
{
0x0030
,
7
},
{
0x
0780
,
12
},
{
0x2800
,
16
},
{
0x0010
,
7
},
{
0x0A80
,
12
},
{
0x0
050
,
7
},
{
0x0880
,
12
},
{
0x000F
,
7
},
{
0x1100
,
13
},
{
0x
002F
,
7
},
{
0x0100
,
13
},
{
0x0084
,
8
},
{
0x5800
,
16
},
{
0x
00A4
,
8
},
{
0x9800
,
16
},
{
0x0024
,
8
},
{
0x1800
,
16
},
{
0x0
140
,
9
},
{
0xE800
,
16
},
{
0x01C0
,
9
},
{
0x6800
,
16
},
{
0x0
2C0
,
10
},
{
0xA800
,
16
},
{
0x0F80
,
12
},
{
0x0580
,
12
},
{
0x
0980
,
12
},
{
0x0E80
,
12
},
{
0x0680
,
12
},
{
0x1F00
,
13
},
{
0x
0F00
,
13
},
{
0x1700
,
13
},
{
0x0700
,
13
},
{
0x1B00
,
13
},
{
0x
F800
,
16
},
{
0x7800
,
16
},
{
0xB800
,
16
},
{
0x3800
,
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment