Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
330dd59a
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,发现更多精彩内容 >>
提交
330dd59a
编写于
10月 12, 2018
作者:
P
Paul B Mahol
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avcodec/imm4: stop using FAAN idct
上级
0c14b73e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
8 deletion
+15
-8
libavcodec/imm4.c
libavcodec/imm4.c
+15
-8
未找到文件。
libavcodec/imm4.c
浏览文件 @
330dd59a
...
...
@@ -45,12 +45,13 @@ typedef struct IMM4Context {
int
factor
;
unsigned
sindex
;
ScanTable
intra_scantable
;
DECLARE_ALIGNED
(
32
,
int16_t
,
block
)[
6
][
64
];
IDCTDSPContext
idsp
;
}
IMM4Context
;
static
const
uint8_t
intra_cb
[]
=
{
12
,
9
,
6
24
,
18
,
12
};
static
const
uint8_t
inter_cb
[]
=
{
...
...
@@ -140,6 +141,7 @@ static int decode_block(AVCodecContext *avctx, GetBitContext *gb,
int
block
,
int
factor
,
int
flag
)
{
IMM4Context
*
s
=
avctx
->
priv_data
;
const
uint8_t
*
scantable
=
s
->
intra_scantable
.
permutated
;
int
i
,
last
,
len
,
factor2
;
for
(
i
=
!
flag
;
i
<
64
;
i
++
)
{
...
...
@@ -162,7 +164,7 @@ static int decode_block(AVCodecContext *avctx, GetBitContext *gb,
i
+=
len
;
if
(
i
>=
64
)
break
;
s
->
block
[
block
][
i
]
=
factor
*
factor2
;
s
->
block
[
block
][
scantable
[
i
]
]
=
factor
*
factor2
;
if
(
last
)
break
;
}
...
...
@@ -174,6 +176,7 @@ static int decode_blocks(AVCodecContext *avctx, GetBitContext *gb,
unsigned
cbp
,
int
flag
)
{
IMM4Context
*
s
=
avctx
->
priv_data
;
const
uint8_t
*
scantable
=
s
->
intra_scantable
.
permutated
;
int
ret
,
i
;
memset
(
s
->
block
,
0
,
sizeof
(
s
->
block
));
...
...
@@ -186,7 +189,7 @@ static int decode_blocks(AVCodecContext *avctx, GetBitContext *gb,
x
=
128
;
x
*=
8
;
s
->
block
[
i
][
0
]
=
x
;
s
->
block
[
i
][
scantable
[
0
]
]
=
x
;
}
if
(
cbp
&
(
1
<<
(
5
-
i
)))
{
...
...
@@ -204,7 +207,7 @@ static int decode_intra(AVCodecContext *avctx, GetBitContext *gb, AVFrame *frame
IMM4Context
*
s
=
avctx
->
priv_data
;
int
ret
,
x
,
y
;
s
->
factor
=
intra_cb
[
s
->
sindex
]
*
2
;
s
->
factor
=
intra_cb
[
s
->
sindex
];
for
(
y
=
0
;
y
<
avctx
->
height
;
y
+=
16
)
{
for
(
x
=
0
;
x
<
avctx
->
width
;
x
+=
16
)
{
...
...
@@ -397,9 +400,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
s
->
changed_size
=
1
;
skip_bits_long
(
gb
,
24
*
8
);
type
=
get_bits_long
(
gb
,
32
);
s
->
sindex
=
get_bits_long
(
gb
,
32
);
if
(
s
->
sindex
>
2
)
return
AVERROR_INVALIDDATA
;
s
kip_bits
(
gb
,
16
);
s
->
sindex
=
get_bits
(
gb
,
16
);
s
->
sindex
=
FFMIN
(
s
->
sindex
,
2
)
;
switch
(
type
)
{
case
0x19781977
:
...
...
@@ -461,10 +464,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
static
AVOnce
init_static_once
=
AV_ONCE_INIT
;
IMM4Context
*
s
=
avctx
->
priv_data
;
uint8_t
table
[
64
];
for
(
int
i
=
0
;
i
<
64
;
i
++
)
table
[
i
]
=
i
;
avctx
->
idct_algo
=
FF_IDCT_FAAN
;
ff_bswapdsp_init
(
&
s
->
bdsp
);
ff_idctdsp_init
(
&
s
->
idsp
,
avctx
);
ff_init_scantable
(
s
->
idsp
.
idct_permutation
,
&
s
->
intra_scantable
,
table
);
s
->
prev_frame
=
av_frame_alloc
();
if
(
!
s
->
prev_frame
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录