Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
060ce0c6
Commit
060ce0c6
authored
Aug 15, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ivi_common: Make some tables only used within the file static
parent
4b054a34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
33 deletions
+31
-33
ivi_common.c
libavcodec/ivi_common.c
+31
-33
No files found.
libavcodec/ivi_common.c
View file @
060ce0c6
...
...
@@ -35,8 +35,35 @@
#include "ivi_common.h"
#include "ivi_dsp.h"
extern
const
IVIHuffDesc
ff_ivi_mb_huff_desc
[
8
];
///< static macroblock huffman tables
extern
const
IVIHuffDesc
ff_ivi_blk_huff_desc
[
8
];
///< static block huffman tables
/**
* These are 2x8 predefined Huffman codebooks for coding macroblock/block
* signals. They are specified using "huffman descriptors" in order to
* avoid huge static tables. The decoding tables will be generated at
* startup from these descriptors.
*/
/** static macroblock huffman tables */
static
const
IVIHuffDesc
ivi_mb_huff_desc
[
8
]
=
{
{
8
,
{
0
,
4
,
5
,
4
,
4
,
4
,
6
,
6
}},
{
12
,
{
0
,
2
,
2
,
3
,
3
,
3
,
3
,
5
,
3
,
2
,
2
,
2
}},
{
12
,
{
0
,
2
,
3
,
4
,
3
,
3
,
3
,
3
,
4
,
3
,
2
,
2
}},
{
12
,
{
0
,
3
,
4
,
4
,
3
,
3
,
3
,
3
,
3
,
2
,
2
,
2
}},
{
13
,
{
0
,
4
,
4
,
3
,
3
,
3
,
3
,
2
,
3
,
3
,
2
,
1
,
1
}},
{
9
,
{
0
,
4
,
4
,
4
,
4
,
3
,
3
,
3
,
2
}},
{
10
,
{
0
,
4
,
4
,
4
,
4
,
3
,
3
,
2
,
2
,
2
}},
{
12
,
{
0
,
4
,
4
,
4
,
3
,
3
,
2
,
3
,
2
,
2
,
2
,
2
}}
};
/** static block huffman tables */
static
const
IVIHuffDesc
ivi_blk_huff_desc
[
8
]
=
{
{
10
,
{
1
,
2
,
3
,
4
,
4
,
7
,
5
,
5
,
4
,
1
}},
{
11
,
{
2
,
3
,
4
,
4
,
4
,
7
,
5
,
4
,
3
,
3
,
2
}},
{
12
,
{
2
,
4
,
5
,
5
,
5
,
5
,
6
,
4
,
4
,
3
,
1
,
1
}},
{
13
,
{
3
,
3
,
4
,
4
,
5
,
6
,
6
,
4
,
4
,
3
,
2
,
1
,
1
}},
{
11
,
{
3
,
4
,
4
,
5
,
5
,
5
,
6
,
5
,
4
,
2
,
2
}},
{
13
,
{
3
,
4
,
5
,
5
,
5
,
5
,
6
,
4
,
3
,
3
,
2
,
1
,
1
}},
{
13
,
{
3
,
4
,
5
,
5
,
5
,
6
,
5
,
4
,
3
,
3
,
2
,
1
,
1
}},
{
9
,
{
3
,
4
,
4
,
5
,
5
,
5
,
6
,
5
,
5
}}
};
static
VLC
ivi_mb_vlc_tabs
[
8
];
///< static macroblock Huffman tables
static
VLC
ivi_blk_vlc_tabs
[
8
];
///< static block Huffman tables
...
...
@@ -135,11 +162,11 @@ av_cold void ff_ivi_init_static_vlc(void)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
ivi_mb_vlc_tabs
[
i
].
table
=
table_data
+
i
*
2
*
8192
;
ivi_mb_vlc_tabs
[
i
].
table_allocated
=
8192
;
ivi_create_huff_from_desc
(
&
ff_
ivi_mb_huff_desc
[
i
],
ivi_create_huff_from_desc
(
&
ivi_mb_huff_desc
[
i
],
&
ivi_mb_vlc_tabs
[
i
],
1
);
ivi_blk_vlc_tabs
[
i
].
table
=
table_data
+
(
i
*
2
+
1
)
*
8192
;
ivi_blk_vlc_tabs
[
i
].
table_allocated
=
8192
;
ivi_create_huff_from_desc
(
&
ff_
ivi_blk_huff_desc
[
i
],
ivi_create_huff_from_desc
(
&
ivi_blk_huff_desc
[
i
],
&
ivi_blk_vlc_tabs
[
i
],
1
);
}
initialized_vlcs
=
1
;
...
...
@@ -1039,35 +1066,6 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
}
/**
* These are 2x8 predefined Huffman codebooks for coding macroblock/block
* signals. They are specified using "huffman descriptors" in order to
* avoid huge static tables. The decoding tables will be generated at
* startup from these descriptors.
*/
const
IVIHuffDesc
ff_ivi_mb_huff_desc
[
8
]
=
{
{
8
,
{
0
,
4
,
5
,
4
,
4
,
4
,
6
,
6
}},
{
12
,
{
0
,
2
,
2
,
3
,
3
,
3
,
3
,
5
,
3
,
2
,
2
,
2
}},
{
12
,
{
0
,
2
,
3
,
4
,
3
,
3
,
3
,
3
,
4
,
3
,
2
,
2
}},
{
12
,
{
0
,
3
,
4
,
4
,
3
,
3
,
3
,
3
,
3
,
2
,
2
,
2
}},
{
13
,
{
0
,
4
,
4
,
3
,
3
,
3
,
3
,
2
,
3
,
3
,
2
,
1
,
1
}},
{
9
,
{
0
,
4
,
4
,
4
,
4
,
3
,
3
,
3
,
2
}},
{
10
,
{
0
,
4
,
4
,
4
,
4
,
3
,
3
,
2
,
2
,
2
}},
{
12
,
{
0
,
4
,
4
,
4
,
3
,
3
,
2
,
3
,
2
,
2
,
2
,
2
}}
};
const
IVIHuffDesc
ff_ivi_blk_huff_desc
[
8
]
=
{
{
10
,
{
1
,
2
,
3
,
4
,
4
,
7
,
5
,
5
,
4
,
1
}},
{
11
,
{
2
,
3
,
4
,
4
,
4
,
7
,
5
,
4
,
3
,
3
,
2
}},
{
12
,
{
2
,
4
,
5
,
5
,
5
,
5
,
6
,
4
,
4
,
3
,
1
,
1
}},
{
13
,
{
3
,
3
,
4
,
4
,
5
,
6
,
6
,
4
,
4
,
3
,
2
,
1
,
1
}},
{
11
,
{
3
,
4
,
4
,
5
,
5
,
5
,
6
,
5
,
4
,
2
,
2
}},
{
13
,
{
3
,
4
,
5
,
5
,
5
,
5
,
6
,
4
,
3
,
3
,
2
,
1
,
1
}},
{
13
,
{
3
,
4
,
5
,
5
,
5
,
6
,
5
,
4
,
3
,
3
,
2
,
1
,
1
}},
{
9
,
{
3
,
4
,
4
,
5
,
5
,
5
,
6
,
5
,
5
}}
};
/**
* Scan patterns shared between indeo4 and indeo5
*/
...
...
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