Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
dbc56b39
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,发现更多精彩内容 >>
提交
dbc56b39
编写于
6月 11, 2004
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chroma me fix
Originally committed as revision 3216 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
ffdff4d7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
5 deletion
+23
-5
libavcodec/dsputil.h
libavcodec/dsputil.h
+2
-2
libavcodec/motion_est.c
libavcodec/motion_est.c
+21
-3
未找到文件。
libavcodec/dsputil.h
浏览文件 @
dbc56b39
...
...
@@ -204,7 +204,7 @@ typedef struct DSPContext {
* @param line_size number of bytes in a horizontal line of block
* @param h height
*/
op_pixels_func
put_no_rnd_pixels_tab
[
2
][
4
];
op_pixels_func
put_no_rnd_pixels_tab
[
4
][
4
];
/**
* Halfpel motion compensation with no rounding (a+b)>>1.
...
...
@@ -216,7 +216,7 @@ typedef struct DSPContext {
* @param line_size number of bytes in a horizontal line of block
* @param h height
*/
op_pixels_func
avg_no_rnd_pixels_tab
[
2
][
4
];
op_pixels_func
avg_no_rnd_pixels_tab
[
4
][
4
];
void
(
*
put_no_rnd_pixels_l2
[
2
])(
uint8_t
*
block
/*align width (8 or 16)*/
,
const
uint8_t
*
a
/*align 1*/
,
const
uint8_t
*
b
/*align 1*/
,
int
line_size
,
int
h
);
...
...
libavcodec/motion_est.c
浏览文件 @
dbc56b39
...
...
@@ -238,6 +238,13 @@ static inline int get_penalty_factor(MpegEncContext *s, int type){
}
}
static
int
zero_cmp
(
void
*
s
,
uint8_t
*
a
,
uint8_t
*
b
,
int
stride
,
int
h
){
return
0
;
}
static
void
zero_hpel
(
uint8_t
*
a
,
const
uint8_t
*
b
,
int
stride
,
int
h
){
}
void
ff_init_me
(
MpegEncContext
*
s
){
MotionEstContext
*
const
c
=
&
s
->
me
;
c
->
avctx
=
s
->
avctx
;
...
...
@@ -266,10 +273,11 @@ void ff_init_me(MpegEncContext *s){
c
->
sub_motion_search
=
sad_hpel_motion_search
;
// 2050 vs. 2450 cycles
else
c
->
sub_motion_search
=
hpel_motion_search
;
c
->
hpel_avg
=
s
->
dsp
.
avg_pixels_tab
;
if
(
s
->
no_rounding
)
c
->
hpel_put
=
s
->
dsp
.
put_no_rnd_pixels_tab
;
else
c
->
hpel_put
=
s
->
dsp
.
put_pixels_tab
;
}
c
->
hpel_avg
=
s
->
dsp
.
avg_pixels_tab
;
if
(
s
->
no_rounding
)
c
->
hpel_put
=
s
->
dsp
.
put_no_rnd_pixels_tab
;
else
c
->
hpel_put
=
s
->
dsp
.
put_pixels_tab
;
if
(
s
->
linesize
){
c
->
stride
=
s
->
linesize
;
c
->
uvstride
=
s
->
uvlinesize
;
...
...
@@ -278,6 +286,16 @@ void ff_init_me(MpegEncContext *s){
c
->
uvstride
=
8
*
s
->
mb_width
+
16
;
}
// 8x8 fullpel search would need a 4x4 chroma compare, which we dont have yet, and even if we had the motion estimation code doesnt expect it
if
((
c
->
avctx
->
me_cmp
&
FF_CMP_CHROMA
)
&&
!
s
->
dsp
.
me_cmp
[
2
]){
s
->
dsp
.
me_cmp
[
2
]
=
zero_cmp
;
}
if
((
c
->
avctx
->
me_sub_cmp
&
FF_CMP_CHROMA
)
&&
!
s
->
dsp
.
me_sub_cmp
[
2
]){
s
->
dsp
.
me_sub_cmp
[
2
]
=
zero_cmp
;
}
c
->
hpel_put
[
2
][
0
]
=
c
->
hpel_put
[
2
][
1
]
=
c
->
hpel_put
[
2
][
2
]
=
c
->
hpel_put
[
2
][
3
]
=
zero_hpel
;
c
->
temp
=
c
->
scratchpad
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录