Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
c0a0170c
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,发现更多精彩内容 >>
提交
c0a0170c
编写于
3月 05, 2004
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix motion compensation with (x+1/2,y+1/2) MVs
Originally committed as revision 2849 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
ca5b9f20
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
5 deletion
+26
-5
libavcodec/dsputil.c
libavcodec/dsputil.c
+10
-0
libavcodec/dsputil.h
libavcodec/dsputil.h
+2
-0
libavcodec/vp3.c
libavcodec/vp3.c
+14
-5
未找到文件。
libavcodec/dsputil.c
浏览文件 @
c0a0170c
...
...
@@ -874,6 +874,13 @@ PIXOP2(put, op_put)
#define avg2(a,b) ((a+b+1)>>1)
#define avg4(a,b,c,d) ((a+b+c+d+2)>>2)
static
void
put_no_rnd_pixels16_l2_c
(
uint8_t
*
dst
,
const
uint8_t
*
a
,
const
uint8_t
*
b
,
int
stride
,
int
h
){
put_no_rnd_pixels16_l2
(
dst
,
a
,
b
,
stride
,
stride
,
stride
,
h
);
}
static
void
put_no_rnd_pixels8_l2_c
(
uint8_t
*
dst
,
const
uint8_t
*
a
,
const
uint8_t
*
b
,
int
stride
,
int
h
){
put_no_rnd_pixels8_l2
(
dst
,
a
,
b
,
stride
,
stride
,
stride
,
h
);
}
static
void
gmc1_c
(
uint8_t
*
dst
,
uint8_t
*
src
,
int
stride
,
int
h
,
int
x16
,
int
y16
,
int
rounder
)
{
...
...
@@ -3158,6 +3165,9 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
dspfunc
(
avg
,
3
,
2
);
#undef dspfunc
c
->
put_no_rnd_pixels_l2
[
0
]
=
put_no_rnd_pixels16_l2_c
;
c
->
put_no_rnd_pixels_l2
[
1
]
=
put_no_rnd_pixels8_l2_c
;
c
->
put_tpel_pixels_tab
[
0
]
=
put_tpel_pixels_mc00_c
;
c
->
put_tpel_pixels_tab
[
1
]
=
put_tpel_pixels_mc10_c
;
c
->
put_tpel_pixels_tab
[
2
]
=
put_tpel_pixels_mc20_c
;
...
...
libavcodec/dsputil.h
浏览文件 @
c0a0170c
...
...
@@ -204,6 +204,8 @@ typedef struct DSPContext {
*/
op_pixels_func
avg_no_rnd_pixels_tab
[
2
][
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
);
/**
* Thirdpel motion compensation with rounding (a+b+1)>>1.
* this is an array[12] of motion compensation funcions for the 9 thirdpel positions<br>
...
...
libavcodec/vp3.c
浏览文件 @
c0a0170c
...
...
@@ -2451,15 +2451,24 @@ av_log(s->avctx, AV_LOG_ERROR, " help! got beefy vector! (%X, %X)\n", motion_x,
motion_source
=
temp
;
}
}
/* first, take care of copying a block from either the
* previous or the golden frame */
if
(
s
->
all_fragments
[
i
].
coding_method
!=
MODE_INTRA
)
{
s
->
dsp
.
put_no_rnd_pixels_tab
[
1
][
motion_halfpel_index
](
output_plane
+
s
->
all_fragments
[
i
].
first_pixel
,
motion_source
,
stride
,
8
);
//Note, it is possible to implement all MC cases with put_no_rnd_pixels_l2 which would look more like the VP3 source but this would be slower as put_no_rnd_pixels_tab is better optimzed
if
(
motion_halfpel_index
!=
3
){
s
->
dsp
.
put_no_rnd_pixels_tab
[
1
][
motion_halfpel_index
](
output_plane
+
s
->
all_fragments
[
i
].
first_pixel
,
motion_source
,
stride
,
8
);
}
else
{
int
d
=
(
motion_x
^
motion_y
)
>>
31
;
// d is 0 if motion_x and _y have the same sign, else -1
s
->
dsp
.
put_no_rnd_pixels_l2
[
1
](
output_plane
+
s
->
all_fragments
[
i
].
first_pixel
,
motion_source
-
d
,
motion_source
+
stride
+
1
+
d
,
stride
,
8
);
}
}
/* dequantize the DCT coefficients */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录