Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
463d086b
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
463d086b
编写于
5月 11, 2003
作者:
M
Mike Melanson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
get those permutations straight
Originally committed as revision 1850 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
892fc83e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
9 deletion
+13
-9
libavcodec/vp3.c
libavcodec/vp3.c
+10
-6
libavcodec/vp3data.h
libavcodec/vp3data.h
+3
-3
未找到文件。
libavcodec/vp3.c
浏览文件 @
463d086b
...
...
@@ -862,7 +862,7 @@ static void init_dequantizer(Vp3DecodeContext *s)
* the dequantization phase */
for
(
i
=
1
;
i
<
64
;
i
++
)
{
j
=
quant
_index
[
i
];
j
=
zigzag
_index
[
i
];
s
->
intra_y_dequant
[
j
]
=
vp31_intra_y_dequant
[
i
]
*
quality_scale
/
100
;
if
(
s
->
intra_y_dequant
[
j
]
<
MIN_DEQUANT_VAL
)
...
...
@@ -2065,6 +2065,7 @@ static void render_fragments(Vp3DecodeContext *s,
int
j
;
int16_t
*
dequantizer
;
DCTELEM
dequant_block
[
64
];
DCTELEM
dequant_block_permuted
[
64
];
unsigned
char
*
output_plane
;
unsigned
char
*
last_plane
;
unsigned
char
*
golden_plane
;
...
...
@@ -2155,9 +2156,12 @@ static void render_fragments(Vp3DecodeContext *s,
i
,
s
->
all_fragments
[
i
].
coding_method
,
s
->
all_fragments
[
i
].
coeffs
[
0
],
dequantizer
[
0
]);
for
(
j
=
0
;
j
<
64
;
j
++
)
dequant_block
[
de
quant
_index
[
j
]]
=
dequant_block
[
de
zigzag
_index
[
j
]]
=
s
->
all_fragments
[
i
].
coeffs
[
j
]
*
dequantizer
[
j
];
for
(
j
=
0
;
j
<
64
;
j
++
)
dequant_block_permuted
[
s
->
dsp
.
idct_permutation
[
j
]]
=
dequant_block
[
j
];
debug_idct
(
"dequantized block:
\n
"
);
for
(
m
=
0
;
m
<
8
;
m
++
)
{
...
...
@@ -2171,14 +2175,14 @@ static void render_fragments(Vp3DecodeContext *s,
/* invert DCT and place (or add) in final output */
if
(
s
->
all_fragments
[
i
].
coding_method
==
MODE_INTRA
)
{
dequant_block
[
0
]
+=
1024
;
dequant_block
_permuted
[
0
]
+=
1024
;
s
->
dsp
.
idct_put
(
output_plane
+
s
->
all_fragments
[
i
].
first_pixel
,
stride
,
dequant_block
);
stride
,
dequant_block
_permuted
);
}
else
{
s
->
dsp
.
idct_add
(
output_plane
+
s
->
all_fragments
[
i
].
first_pixel
,
stride
,
dequant_block
);
stride
,
dequant_block
_permuted
);
}
debug_idct
(
"block after idct_%s():
\n
"
,
...
...
@@ -2363,7 +2367,7 @@ static int vp3_decode_init(AVCodecContext *avctx)
/* build quantization table */
for
(
i
=
0
;
i
<
64
;
i
++
)
quant_index
[
dequant
_index
[
i
]]
=
i
;
zigzag_index
[
dezigzag
_index
[
i
]]
=
i
;
/* work out the block mapping tables */
s
->
superblock_fragments
=
av_malloc
(
s
->
superblock_count
*
16
*
sizeof
(
int
));
...
...
libavcodec/vp3data.h
浏览文件 @
463d086b
...
...
@@ -60,7 +60,7 @@ static uint32_t vp31_quality_threshold[64] =
};
/* table used to convert natural order <-> zigzag order */
static
const
int
de
quant
_index
[
64
]
=
static
const
int
de
zigzag
_index
[
64
]
=
{
0
,
1
,
8
,
16
,
9
,
2
,
3
,
10
,
17
,
24
,
32
,
25
,
18
,
11
,
4
,
5
,
12
,
19
,
26
,
33
,
40
,
48
,
41
,
34
,
...
...
@@ -71,8 +71,8 @@ static const int dequant_index[64] =
53
,
60
,
61
,
54
,
47
,
55
,
62
,
63
};
/* inverse of de
quant
index */
static
int
quant
_index
[
64
];
/* inverse of de
zigzag
index */
static
int
zigzag
_index
[
64
];
static
const
uint16_t
dc_bias
[
16
][
32
][
2
]
=
{
{
/* DC bias table 0 */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录