Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
ddeaf723
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,发现更多精彩内容 >>
提交
ddeaf723
编写于
7月 11, 2007
作者:
I
Ivan Kalvachev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Integrate reference mpeg IDCT into dsputil.
Originally committed as revision 9603 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
c3d0c11b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
32 deletion
+29
-32
libavcodec/Makefile
libavcodec/Makefile
+1
-0
libavcodec/avcodec.h
libavcodec/avcodec.h
+1
-0
libavcodec/dsputil.c
libavcodec/dsputil.c
+16
-0
libavcodec/dsputil.h
libavcodec/dsputil.h
+1
-0
libavcodec/mpegidct.c
libavcodec/mpegidct.c
+10
-32
未找到文件。
libavcodec/Makefile
浏览文件 @
ddeaf723
...
...
@@ -13,6 +13,7 @@ OBJS= bitstream.o \
jrevdct.o
\
jfdctfst.o
\
jfdctint.o
\
mpegidct.o
\
resample.o
\
resample2.o
\
dsputil.o
\
...
...
libavcodec/avcodec.h
浏览文件 @
ddeaf723
...
...
@@ -1278,6 +1278,7 @@ typedef struct AVCodecContext {
#define FF_IDCT_CAVS 15
#define FF_IDCT_SIMPLEARMV5TE 16
#define FF_IDCT_SIMPLEARMV6 17
#define FF_IDCT_MPEG 18
/**
* slice count
...
...
libavcodec/dsputil.c
浏览文件 @
ddeaf723
...
...
@@ -3753,6 +3753,17 @@ void ff_float_to_int16_c(int16_t *dst, const float *src, int len){
/* XXX: those functions should be suppressed ASAP when all IDCTs are
converted */
static
void
ff_mpeg_idct_put_c
(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
)
{
ff_mpeg_idct_c
(
block
);
put_pixels_clamped_c
(
block
,
dest
,
line_size
);
}
static
void
ff_mpeg_idct_add_c
(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
)
{
ff_mpeg_idct_c
(
block
);
add_pixels_clamped_c
(
block
,
dest
,
line_size
);
}
static
void
ff_jref_idct_put
(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
)
{
j_rev_dct
(
block
);
...
...
@@ -3891,6 +3902,11 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c
->
idct_add
=
ff_vp3_idct_add_c
;
c
->
idct
=
ff_vp3_idct_c
;
c
->
idct_permutation_type
=
FF_NO_IDCT_PERM
;
}
else
if
(
avctx
->
idct_algo
==
FF_IDCT_MPEG
){
c
->
idct_put
=
ff_mpeg_idct_put_c
;
c
->
idct_add
=
ff_mpeg_idct_add_c
;
c
->
idct
=
ff_mpeg_idct_c
;
c
->
idct_permutation_type
=
FF_NO_IDCT_PERM
;
}
else
{
//accurate/default
c
->
idct_put
=
simple_idct_put
;
c
->
idct_add
=
simple_idct_add
;
...
...
libavcodec/dsputil.h
浏览文件 @
ddeaf723
...
...
@@ -47,6 +47,7 @@ void j_rev_dct (DCTELEM *data);
void
j_rev_dct4
(
DCTELEM
*
data
);
void
j_rev_dct2
(
DCTELEM
*
data
);
void
j_rev_dct1
(
DCTELEM
*
data
);
void
ff_mpeg_idct_c
(
DCTELEM
*
data
);
void
ff_fdct_mmx
(
DCTELEM
*
block
);
void
ff_fdct_mmx2
(
DCTELEM
*
block
);
...
...
libavcodec/mpegidct.c
浏览文件 @
ddeaf723
...
...
@@ -41,7 +41,6 @@
/* this code assumes >> to be a two's-complement arithmetic */
/* right shift: (-2)>>1 == -1 , (-3)>>1 == -2 */
#include "config.h"
#define W1 2841
/* 2048*sqrt(2)*cos(1*pi/16) */
#define W2 2676
/* 2048*sqrt(2)*cos(2*pi/16) */
...
...
@@ -50,18 +49,6 @@
#define W6 1108
/* 2048*sqrt(2)*cos(6*pi/16) */
#define W7 565
/* 2048*sqrt(2)*cos(7*pi/16) */
/* global declarations */
void
Initialize_Fast_IDCT
_ANSI_ARGS_
((
void
));
void
Fast_IDCT
_ANSI_ARGS_
((
short
*
block
));
/* private data */
static
short
iclip
[
1024
];
/* clipping table */
static
short
*
iclp
;
/* private prototypes */
static
void
idctrow
_ANSI_ARGS_
((
short
*
blk
));
static
void
idctcol
_ANSI_ARGS_
((
short
*
blk
));
/* row (horizontal) IDCT
*
* 7 pi 1
...
...
@@ -144,7 +131,7 @@ short *blk;
(
x4
=
blk
[
8
*
1
])
|
(
x5
=
blk
[
8
*
7
])
|
(
x6
=
blk
[
8
*
5
])
|
(
x7
=
blk
[
8
*
3
])))
{
blk
[
8
*
0
]
=
blk
[
8
*
1
]
=
blk
[
8
*
2
]
=
blk
[
8
*
3
]
=
blk
[
8
*
4
]
=
blk
[
8
*
5
]
=
blk
[
8
*
6
]
=
blk
[
8
*
7
]
=
iclp
[(
blk
[
8
*
0
]
+
32
)
>>
6
]
;
(
blk
[
8
*
0
]
+
32
)
>>
6
;
return
;
}
...
...
@@ -178,18 +165,18 @@ short *blk;
x4
=
(
181
*
(
x4
-
x5
)
+
128
)
>>
8
;
/* fourth stage */
blk
[
8
*
0
]
=
iclp
[(
x7
+
x1
)
>>
14
]
;
blk
[
8
*
1
]
=
iclp
[(
x3
+
x2
)
>>
14
]
;
blk
[
8
*
2
]
=
iclp
[(
x0
+
x4
)
>>
14
]
;
blk
[
8
*
3
]
=
iclp
[(
x8
+
x6
)
>>
14
]
;
blk
[
8
*
4
]
=
iclp
[(
x8
-
x6
)
>>
14
]
;
blk
[
8
*
5
]
=
iclp
[(
x0
-
x4
)
>>
14
]
;
blk
[
8
*
6
]
=
iclp
[(
x3
-
x2
)
>>
14
]
;
blk
[
8
*
7
]
=
iclp
[(
x7
-
x1
)
>>
14
]
;
blk
[
8
*
0
]
=
(
x7
+
x1
)
>>
14
;
blk
[
8
*
1
]
=
(
x3
+
x2
)
>>
14
;
blk
[
8
*
2
]
=
(
x0
+
x4
)
>>
14
;
blk
[
8
*
3
]
=
(
x8
+
x6
)
>>
14
;
blk
[
8
*
4
]
=
(
x8
-
x6
)
>>
14
;
blk
[
8
*
5
]
=
(
x0
-
x4
)
>>
14
;
blk
[
8
*
6
]
=
(
x3
-
x2
)
>>
14
;
blk
[
8
*
7
]
=
(
x7
-
x1
)
>>
14
;
}
/* two dimensional inverse discrete cosine transform */
void
Fast_IDCT
(
block
)
void
ff_mpeg_idct_c
(
block
)
short
*
block
;
{
int
i
;
...
...
@@ -200,12 +187,3 @@ short *block;
for
(
i
=
0
;
i
<
8
;
i
++
)
idctcol
(
block
+
i
);
}
void
Initialize_Fast_IDCT
()
{
int
i
;
iclp
=
iclip
+
512
;
for
(
i
=
-
512
;
i
<
512
;
i
++
)
iclp
[
i
]
=
(
i
<-
256
)
?
-
256
:
((
i
>
255
)
?
255
:
i
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录