Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
2e279598
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,发现更多精彩内容 >>
提交
2e279598
编写于
1月 26, 2011
作者:
R
Ronald S. Bultje
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move ff_emulated_edge_mc() into DSPContext.
上级
e5262ec4
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
65 addition
and
49 deletion
+65
-49
libavcodec/cavs.c
libavcodec/cavs.c
+3
-3
libavcodec/dsputil.c
libavcodec/dsputil.c
+1
-0
libavcodec/dsputil.h
libavcodec/dsputil.h
+15
-0
libavcodec/h264.c
libavcodec/h264.c
+3
-3
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+6
-6
libavcodec/mpegvideo_common.h
libavcodec/mpegvideo_common.h
+13
-13
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+3
-3
libavcodec/rv34.c
libavcodec/rv34.c
+3
-3
libavcodec/snow.c
libavcodec/snow.c
+1
-1
libavcodec/svq3.c
libavcodec/svq3.c
+2
-2
libavcodec/vc1dec.c
libavcodec/vc1dec.c
+9
-9
libavcodec/vp3.c
libavcodec/vp3.c
+1
-1
libavcodec/vp56.c
libavcodec/vp56.c
+1
-1
libavcodec/vp8.c
libavcodec/vp8.c
+1
-1
libavcodec/wmv2.c
libavcodec/wmv2.c
+3
-3
未找到文件。
libavcodec/cavs.c
浏览文件 @
2e279598
...
...
@@ -353,7 +353,7 @@ static inline void mc_dir_part(AVSContext *h,Picture *pic,int square,
||
full_my
<
0
-
extra_height
||
full_mx
+
16
/*FIXME*/
>
pic_width
+
extra_width
||
full_my
+
16
/*FIXME*/
>
pic_height
+
extra_height
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_y
-
2
-
2
*
h
->
l_stride
,
h
->
l_stride
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_y
-
2
-
2
*
h
->
l_stride
,
h
->
l_stride
,
16
+
5
,
16
+
5
/*FIXME*/
,
full_mx
-
2
,
full_my
-
2
,
pic_width
,
pic_height
);
src_y
=
s
->
edge_emu_buffer
+
2
+
2
*
h
->
l_stride
;
emu
=
1
;
...
...
@@ -365,14 +365,14 @@ static inline void mc_dir_part(AVSContext *h,Picture *pic,int square,
}
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cb
,
h
->
c_stride
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cb
,
h
->
c_stride
,
9
,
9
/*FIXME*/
,
(
mx
>>
3
),
(
my
>>
3
),
pic_width
>>
1
,
pic_height
>>
1
);
src_cb
=
s
->
edge_emu_buffer
;
}
chroma_op
(
dest_cb
,
src_cb
,
h
->
c_stride
,
chroma_height
,
mx
&
7
,
my
&
7
);
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cr
,
h
->
c_stride
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cr
,
h
->
c_stride
,
9
,
9
/*FIXME*/
,
(
mx
>>
3
),
(
my
>>
3
),
pic_width
>>
1
,
pic_height
>>
1
);
src_cr
=
s
->
edge_emu_buffer
;
}
...
...
libavcodec/dsputil.c
浏览文件 @
2e279598
...
...
@@ -4218,6 +4218,7 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c
->
add_pixels8
=
add_pixels8_c
;
c
->
add_pixels4
=
add_pixels4_c
;
c
->
sum_abs_dctelem
=
sum_abs_dctelem_c
;
c
->
emulated_edge_mc
=
ff_emulated_edge_mc
;
c
->
gmc1
=
gmc1_c
;
c
->
gmc
=
ff_gmc_c
;
c
->
clear_block
=
clear_block_c
;
...
...
libavcodec/dsputil.h
浏览文件 @
2e279598
...
...
@@ -215,6 +215,21 @@ typedef struct DSPContext {
void
(
*
add_pixels8
)(
uint8_t
*
pixels
,
DCTELEM
*
block
,
int
line_size
);
void
(
*
add_pixels4
)(
uint8_t
*
pixels
,
DCTELEM
*
block
,
int
line_size
);
int
(
*
sum_abs_dctelem
)(
DCTELEM
*
block
/*align 16*/
);
/**
* Motion estimation with emulated edge values.
* @param buf pointer to destination buffer (unaligned)
* @param src pointer to pixel source (unaligned)
* @param linesize width (in pixels) for src/buf
* @param block_w number of pixels (per row) to copy to buf
* @param block_h nummber of pixel rows to copy to buf
* @param src_x offset of src to start of row - this may be negative
* @param src_y offset of src to top of image - this may be negative
* @param w width of src in pixels
* @param h height of src in pixels
*/
void
(
*
emulated_edge_mc
)(
uint8_t
*
buf
,
const
uint8_t
*
src
,
int
linesize
,
int
block_w
,
int
block_h
,
int
src_x
,
int
src_y
,
int
w
,
int
h
);
/**
* translational global motion compensation.
*/
...
...
libavcodec/h264.c
浏览文件 @
2e279598
...
...
@@ -361,7 +361,7 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
||
full_my
<
0
-
extra_height
||
full_mx
+
16
/*FIXME*/
>
pic_width
+
extra_width
||
full_my
+
16
/*FIXME*/
>
pic_height
+
extra_height
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_y
-
2
-
2
*
h
->
mb_linesize
,
h
->
mb_linesize
,
16
+
5
,
16
+
5
/*FIXME*/
,
full_mx
-
2
,
full_my
-
2
,
pic_width
,
pic_height
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_y
-
2
-
2
*
h
->
mb_linesize
,
h
->
mb_linesize
,
16
+
5
,
16
+
5
/*FIXME*/
,
full_mx
-
2
,
full_my
-
2
,
pic_width
,
pic_height
);
src_y
=
s
->
edge_emu_buffer
+
2
+
2
*
h
->
mb_linesize
;
emu
=
1
;
}
...
...
@@ -382,13 +382,13 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
src_cr
=
pic
->
data
[
2
]
+
(
mx
>>
3
)
+
(
my
>>
3
)
*
h
->
mb_uvlinesize
;
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cb
,
h
->
mb_uvlinesize
,
9
,
9
/*FIXME*/
,
(
mx
>>
3
),
(
my
>>
3
),
pic_width
>>
1
,
pic_height
>>
1
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cb
,
h
->
mb_uvlinesize
,
9
,
9
/*FIXME*/
,
(
mx
>>
3
),
(
my
>>
3
),
pic_width
>>
1
,
pic_height
>>
1
);
src_cb
=
s
->
edge_emu_buffer
;
}
chroma_op
(
dest_cb
,
src_cb
,
h
->
mb_uvlinesize
,
chroma_height
,
mx
&
7
,
my
&
7
);
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cr
,
h
->
mb_uvlinesize
,
9
,
9
/*FIXME*/
,
(
mx
>>
3
),
(
my
>>
3
),
pic_width
>>
1
,
pic_height
>>
1
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src_cr
,
h
->
mb_uvlinesize
,
9
,
9
/*FIXME*/
,
(
mx
>>
3
),
(
my
>>
3
),
pic_width
>>
1
,
pic_height
>>
1
);
src_cr
=
s
->
edge_emu_buffer
;
}
chroma_op
(
dest_cr
,
src_cr
,
h
->
mb_uvlinesize
,
chroma_height
,
mx
&
7
,
my
&
7
);
...
...
libavcodec/mpegvideo.c
浏览文件 @
2e279598
...
...
@@ -1479,7 +1479,7 @@ static inline int hpel_motion_lowres(MpegEncContext *s,
if
(
(
unsigned
)
src_x
>
h_edge_pos
-
(
!!
sx
)
-
w
||
(
unsigned
)
src_y
>
(
v_edge_pos
>>
field_based
)
-
(
!!
sy
)
-
h
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
linesize
,
w
+
1
,
(
h
+
1
)
<<
field_based
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
linesize
,
w
+
1
,
(
h
+
1
)
<<
field_based
,
src_x
,
src_y
<<
field_based
,
h_edge_pos
,
v_edge_pos
);
src
=
s
->
edge_emu_buffer
;
emu
=
1
;
...
...
@@ -1552,14 +1552,14 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
if
(
(
unsigned
)
src_x
>
h_edge_pos
-
(
!!
sx
)
-
2
*
block_s
||
(
unsigned
)
src_y
>
(
v_edge_pos
>>
field_based
)
-
(
!!
sy
)
-
h
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr_y
,
s
->
linesize
,
17
,
17
+
field_based
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr_y
,
s
->
linesize
,
17
,
17
+
field_based
,
src_x
,
src_y
<<
field_based
,
h_edge_pos
,
v_edge_pos
);
ptr_y
=
s
->
edge_emu_buffer
;
if
(
!
CONFIG_GRAY
||
!
(
s
->
flags
&
CODEC_FLAG_GRAY
)){
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
+
18
*
s
->
linesize
;
ff_
emulated_edge_mc
(
uvbuf
,
ptr_cb
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
,
ptr_cb
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
uvsrc_x
,
uvsrc_y
<<
field_based
,
h_edge_pos
>>
1
,
v_edge_pos
>>
1
);
ff_
emulated_edge_mc
(
uvbuf
+
16
,
ptr_cr
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
+
16
,
ptr_cr
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
uvsrc_x
,
uvsrc_y
<<
field_based
,
h_edge_pos
>>
1
,
v_edge_pos
>>
1
);
ptr_cb
=
uvbuf
;
ptr_cr
=
uvbuf
+
16
;
...
...
@@ -1625,7 +1625,7 @@ static inline void chroma_4mv_motion_lowres(MpegEncContext *s,
if
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
){
if
(
(
unsigned
)
src_x
>
h_edge_pos
-
(
!!
sx
)
-
block_s
||
(
unsigned
)
src_y
>
v_edge_pos
-
(
!!
sy
)
-
block_s
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
h_edge_pos
,
v_edge_pos
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
h_edge_pos
,
v_edge_pos
);
ptr
=
s
->
edge_emu_buffer
;
emu
=
1
;
}
...
...
@@ -1636,7 +1636,7 @@ static inline void chroma_4mv_motion_lowres(MpegEncContext *s,
ptr
=
ref_picture
[
2
]
+
offset
;
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
h_edge_pos
,
v_edge_pos
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
h_edge_pos
,
v_edge_pos
);
ptr
=
s
->
edge_emu_buffer
;
}
pix_op
[
op_index
](
dest_cr
,
ptr
,
s
->
uvlinesize
,
block_s
,
sx
,
sy
);
...
...
libavcodec/mpegvideo_common.h
浏览文件 @
2e279598
...
...
@@ -83,7 +83,7 @@ static inline void gmc1_motion(MpegEncContext *s,
if
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
){
if
(
(
unsigned
)
src_x
>=
s
->
h_edge_pos
-
17
||
(
unsigned
)
src_y
>=
s
->
v_edge_pos
-
17
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
linesize
,
17
,
17
,
src_x
,
src_y
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
linesize
,
17
,
17
,
src_x
,
src_y
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
ptr
=
s
->
edge_emu_buffer
;
}
}
...
...
@@ -122,7 +122,7 @@ static inline void gmc1_motion(MpegEncContext *s,
if
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
){
if
(
(
unsigned
)
src_x
>=
(
s
->
h_edge_pos
>>
1
)
-
9
||
(
unsigned
)
src_y
>=
(
s
->
v_edge_pos
>>
1
)
-
9
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ptr
=
s
->
edge_emu_buffer
;
emu
=
1
;
}
...
...
@@ -131,7 +131,7 @@ static inline void gmc1_motion(MpegEncContext *s,
ptr
=
ref_picture
[
2
]
+
offset
;
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ptr
=
s
->
edge_emu_buffer
;
}
s
->
dsp
.
gmc1
(
dest_cr
,
ptr
,
uvlinesize
,
8
,
motion_x
&
15
,
motion_y
&
15
,
128
-
s
->
no_rounding
);
...
...
@@ -223,7 +223,7 @@ static inline int hpel_motion(MpegEncContext *s,
if
(
s
->
unrestricted_mv
&&
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
)){
if
(
(
unsigned
)
src_x
>
h_edge_pos
-
(
motion_x
&
1
)
-
w
||
(
unsigned
)
src_y
>
v_edge_pos
-
(
motion_y
&
1
)
-
h
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
linesize
,
w
+
1
,
(
h
+
1
)
<<
field_based
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
linesize
,
w
+
1
,
(
h
+
1
)
<<
field_based
,
src_x
,
src_y
<<
field_based
,
h_edge_pos
,
s
->
v_edge_pos
);
src
=
s
->
edge_emu_buffer
;
emu
=
1
;
...
...
@@ -315,19 +315,19 @@ if(s->quarter_sample)
"MPEG motion vector out of boundary (%d %d)
\n
"
,
src_x
,
src_y
);
return
;
}
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr_y
,
s
->
linesize
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr_y
,
s
->
linesize
,
17
,
17
+
field_based
,
src_x
,
src_y
<<
field_based
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
ptr_y
=
s
->
edge_emu_buffer
;
if
(
!
CONFIG_GRAY
||
!
(
s
->
flags
&
CODEC_FLAG_GRAY
)){
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
+
18
*
s
->
linesize
;
ff_
emulated_edge_mc
(
uvbuf
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
,
ptr_cb
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
uvsrc_x
,
uvsrc_y
<<
field_based
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ff_
emulated_edge_mc
(
uvbuf
+
16
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
+
16
,
ptr_cr
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
uvsrc_x
,
uvsrc_y
<<
field_based
,
...
...
@@ -512,17 +512,17 @@ static inline void qpel_motion(MpegEncContext *s,
if
(
(
unsigned
)
src_x
>
s
->
h_edge_pos
-
(
motion_x
&
3
)
-
16
||
(
unsigned
)
src_y
>
v_edge_pos
-
(
motion_y
&
3
)
-
h
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr_y
,
s
->
linesize
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr_y
,
s
->
linesize
,
17
,
17
+
field_based
,
src_x
,
src_y
<<
field_based
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
ptr_y
=
s
->
edge_emu_buffer
;
if
(
!
CONFIG_GRAY
||
!
(
s
->
flags
&
CODEC_FLAG_GRAY
)){
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
+
18
*
s
->
linesize
;
ff_
emulated_edge_mc
(
uvbuf
,
ptr_cb
,
s
->
uvlinesize
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
,
ptr_cb
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
uvsrc_x
,
uvsrc_y
<<
field_based
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ff_
emulated_edge_mc
(
uvbuf
+
16
,
ptr_cr
,
s
->
uvlinesize
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
+
16
,
ptr_cr
,
s
->
uvlinesize
,
9
,
9
+
field_based
,
uvsrc_x
,
uvsrc_y
<<
field_based
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
...
...
@@ -590,7 +590,7 @@ static inline void chroma_4mv_motion(MpegEncContext *s,
if
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
){
if
(
(
unsigned
)
src_x
>
(
s
->
h_edge_pos
>>
1
)
-
(
dxy
&
1
)
-
8
||
(
unsigned
)
src_y
>
(
s
->
v_edge_pos
>>
1
)
-
(
dxy
>>
1
)
-
8
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ptr
=
s
->
edge_emu_buffer
;
...
...
@@ -601,7 +601,7 @@ static inline void chroma_4mv_motion(MpegEncContext *s,
ptr
=
ref_picture
[
2
]
+
offset
;
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ptr
=
s
->
edge_emu_buffer
;
...
...
@@ -762,7 +762,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s,
if
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
){
if
(
(
unsigned
)
src_x
>
s
->
h_edge_pos
-
(
motion_x
&
3
)
-
8
||
(
unsigned
)
src_y
>
s
->
v_edge_pos
-
(
motion_y
&
3
)
-
8
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
linesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
...
...
libavcodec/mpegvideo_enc.c
浏览文件 @
2e279598
...
...
@@ -1548,11 +1548,11 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x,
if
(
mb_x
*
16
+
16
>
s
->
width
||
mb_y
*
16
+
16
>
s
->
height
){
uint8_t
*
ebuf
=
s
->
edge_emu_buffer
+
32
;
ff_
emulated_edge_mc
(
ebuf
,
ptr_y
,
wrap_y
,
16
,
16
,
mb_x
*
16
,
mb_y
*
16
,
s
->
width
,
s
->
height
);
s
->
dsp
.
emulated_edge_mc
(
ebuf
,
ptr_y
,
wrap_y
,
16
,
16
,
mb_x
*
16
,
mb_y
*
16
,
s
->
width
,
s
->
height
);
ptr_y
=
ebuf
;
ff_
emulated_edge_mc
(
ebuf
+
18
*
wrap_y
,
ptr_cb
,
wrap_c
,
8
,
mb_block_height
,
mb_x
*
8
,
mb_y
*
8
,
s
->
width
>>
1
,
s
->
height
>>
1
);
s
->
dsp
.
emulated_edge_mc
(
ebuf
+
18
*
wrap_y
,
ptr_cb
,
wrap_c
,
8
,
mb_block_height
,
mb_x
*
8
,
mb_y
*
8
,
s
->
width
>>
1
,
s
->
height
>>
1
);
ptr_cb
=
ebuf
+
18
*
wrap_y
;
ff_
emulated_edge_mc
(
ebuf
+
18
*
wrap_y
+
8
,
ptr_cr
,
wrap_c
,
8
,
mb_block_height
,
mb_x
*
8
,
mb_y
*
8
,
s
->
width
>>
1
,
s
->
height
>>
1
);
s
->
dsp
.
emulated_edge_mc
(
ebuf
+
18
*
wrap_y
+
8
,
ptr_cr
,
wrap_c
,
8
,
mb_block_height
,
mb_x
*
8
,
mb_y
*
8
,
s
->
width
>>
1
,
s
->
height
>>
1
);
ptr_cr
=
ebuf
+
18
*
wrap_y
+
8
;
}
...
...
libavcodec/rv34.c
浏览文件 @
2e279598
...
...
@@ -718,12 +718,12 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
+
22
*
s
->
linesize
;
srcY
-=
2
+
2
*
s
->
linesize
;
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
(
width
<<
3
)
+
6
,
(
height
<<
3
)
+
6
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
(
width
<<
3
)
+
6
,
(
height
<<
3
)
+
6
,
src_x
-
2
,
src_y
-
2
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
srcY
=
s
->
edge_emu_buffer
+
2
+
2
*
s
->
linesize
;
ff_
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ff_
emulated_edge_mc
(
uvbuf
+
16
,
srcV
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
+
16
,
srcV
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
srcU
=
uvbuf
;
srcV
=
uvbuf
+
16
;
...
...
libavcodec/snow.c
浏览文件 @
2e279598
...
...
@@ -1171,7 +1171,7 @@ static void pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride, i
src
+=
sx
+
sy
*
stride
;
if
(
(
unsigned
)
sx
>=
w
-
b_w
-
(
HTAPS_MAX
-
2
)
||
(
unsigned
)
sy
>=
h
-
b_h
-
(
HTAPS_MAX
-
2
)){
ff_
emulated_edge_mc
(
tmp
+
MB_SIZE
,
src
,
stride
,
b_w
+
HTAPS_MAX
-
1
,
b_h
+
HTAPS_MAX
-
1
,
sx
,
sy
,
w
,
h
);
s
->
dsp
.
emulated_edge_mc
(
tmp
+
MB_SIZE
,
src
,
stride
,
b_w
+
HTAPS_MAX
-
1
,
b_h
+
HTAPS_MAX
-
1
,
sx
,
sy
,
w
,
h
);
src
=
tmp
+
MB_SIZE
;
}
// assert(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h);
...
...
libavcodec/svq3.c
浏览文件 @
2e279598
...
...
@@ -283,7 +283,7 @@ static inline void svq3_mc_dir_part(MpegEncContext *s,
src
=
pic
->
data
[
0
]
+
mx
+
my
*
s
->
linesize
;
if
(
emu
)
{
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
linesize
,
(
width
+
1
),
(
height
+
1
),
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
linesize
,
(
width
+
1
),
(
height
+
1
),
mx
,
my
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
src
=
s
->
edge_emu_buffer
;
}
...
...
@@ -304,7 +304,7 @@ static inline void svq3_mc_dir_part(MpegEncContext *s,
src
=
pic
->
data
[
i
]
+
mx
+
my
*
s
->
uvlinesize
;
if
(
emu
)
{
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
uvlinesize
,
(
width
+
1
),
(
height
+
1
),
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
,
s
->
uvlinesize
,
(
width
+
1
),
(
height
+
1
),
mx
,
my
,
(
s
->
h_edge_pos
>>
1
),
(
s
->
v_edge_pos
>>
1
));
src
=
s
->
edge_emu_buffer
;
}
...
...
libavcodec/vc1dec.c
浏览文件 @
2e279598
...
...
@@ -288,12 +288,12 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
+
19
*
s
->
linesize
;
srcY
-=
s
->
mspel
*
(
1
+
s
->
linesize
);
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
17
+
s
->
mspel
*
2
,
17
+
s
->
mspel
*
2
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
17
+
s
->
mspel
*
2
,
17
+
s
->
mspel
*
2
,
src_x
-
s
->
mspel
,
src_y
-
s
->
mspel
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
srcY
=
s
->
edge_emu_buffer
;
ff_
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ff_
emulated_edge_mc
(
uvbuf
+
16
,
srcV
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
+
16
,
srcV
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
srcU
=
uvbuf
;
srcV
=
uvbuf
+
16
;
...
...
@@ -403,7 +403,7 @@ static void vc1_mc_4mv_luma(VC1Context *v, int n)
||
(
unsigned
)(
src_x
-
s
->
mspel
)
>
s
->
h_edge_pos
-
(
mx
&
3
)
-
8
-
s
->
mspel
*
2
||
(
unsigned
)(
src_y
-
s
->
mspel
)
>
s
->
v_edge_pos
-
(
my
&
3
)
-
8
-
s
->
mspel
*
2
){
srcY
-=
s
->
mspel
*
(
1
+
s
->
linesize
);
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
9
+
s
->
mspel
*
2
,
9
+
s
->
mspel
*
2
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
9
+
s
->
mspel
*
2
,
9
+
s
->
mspel
*
2
,
src_x
-
s
->
mspel
,
src_y
-
s
->
mspel
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
srcY
=
s
->
edge_emu_buffer
;
/* if we deal with range reduction we need to scale source blocks */
...
...
@@ -537,9 +537,9 @@ static void vc1_mc_4mv_chroma(VC1Context *v)
if
(
v
->
rangeredfrm
||
(
v
->
mv_mode
==
MV_PMODE_INTENSITY_COMP
)
||
(
unsigned
)
uvsrc_x
>
(
s
->
h_edge_pos
>>
1
)
-
9
||
(
unsigned
)
uvsrc_y
>
(
s
->
v_edge_pos
>>
1
)
-
9
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcU
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcU
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
+
16
,
srcV
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
+
16
,
srcV
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
srcU
=
s
->
edge_emu_buffer
;
srcV
=
s
->
edge_emu_buffer
+
16
;
...
...
@@ -872,12 +872,12 @@ static void vc1_interp_mc(VC1Context *v)
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
+
19
*
s
->
linesize
;
srcY
-=
s
->
mspel
*
(
1
+
s
->
linesize
);
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
17
+
s
->
mspel
*
2
,
17
+
s
->
mspel
*
2
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
17
+
s
->
mspel
*
2
,
17
+
s
->
mspel
*
2
,
src_x
-
s
->
mspel
,
src_y
-
s
->
mspel
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
srcY
=
s
->
edge_emu_buffer
;
ff_
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ff_
emulated_edge_mc
(
uvbuf
+
16
,
srcV
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
s
->
dsp
.
emulated_edge_mc
(
uvbuf
+
16
,
srcV
,
s
->
uvlinesize
,
8
+
1
,
8
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
srcU
=
uvbuf
;
srcV
=
uvbuf
+
16
;
...
...
libavcodec/vp3.c
浏览文件 @
2e279598
...
...
@@ -1432,7 +1432,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
if
(
stride
<
0
)
temp
-=
9
*
stride
;
else
temp
+=
9
*
stride
;
ff_
emulated_edge_mc
(
temp
,
motion_source
,
stride
,
9
,
9
,
src_x
,
src_y
,
plane_width
,
plane_height
);
s
->
dsp
.
emulated_edge_mc
(
temp
,
motion_source
,
stride
,
9
,
9
,
src_x
,
src_y
,
plane_width
,
plane_height
);
motion_source
=
temp
;
}
}
...
...
libavcodec/vp56.c
浏览文件 @
2e279598
...
...
@@ -337,7 +337,7 @@ static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src,
if
(
x
<
0
||
x
+
12
>=
s
->
plane_width
[
plane
]
||
y
<
0
||
y
+
12
>=
s
->
plane_height
[
plane
])
{
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
+
s
->
block_offset
[
b
]
+
(
dy
-
2
)
*
stride
+
(
dx
-
2
),
stride
,
12
,
12
,
x
,
y
,
s
->
plane_width
[
plane
],
...
...
libavcodec/vp8.c
浏览文件 @
2e279598
...
...
@@ -1234,7 +1234,7 @@ void vp8_mc(VP8Context *s, int luma,
src
+=
y_off
*
linesize
+
x_off
;
if
(
x_off
<
mx_idx
||
x_off
>=
width
-
block_w
-
idx
[
2
][
mx
]
||
y_off
<
my_idx
||
y_off
>=
height
-
block_h
-
idx
[
2
][
my
])
{
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
-
my_idx
*
linesize
-
mx_idx
,
linesize
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
src
-
my_idx
*
linesize
-
mx_idx
,
linesize
,
block_w
+
idx
[
1
][
mx
],
block_h
+
idx
[
1
][
my
],
x_off
-
mx_idx
,
y_off
-
my_idx
,
width
,
height
);
src
=
s
->
edge_emu_buffer
+
mx_idx
+
linesize
*
my_idx
;
...
...
libavcodec/wmv2.c
浏览文件 @
2e279598
...
...
@@ -102,7 +102,7 @@ void ff_mspel_motion(MpegEncContext *s,
if
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
){
if
(
src_x
<
1
||
src_y
<
1
||
src_x
+
17
>=
s
->
h_edge_pos
||
src_y
+
h
+
1
>=
v_edge_pos
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
-
1
-
s
->
linesize
,
s
->
linesize
,
19
,
19
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
-
1
-
s
->
linesize
,
s
->
linesize
,
19
,
19
,
src_x
-
1
,
src_y
-
1
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
ptr
=
s
->
edge_emu_buffer
+
1
+
s
->
linesize
;
emu
=
1
;
...
...
@@ -143,7 +143,7 @@ void ff_mspel_motion(MpegEncContext *s,
offset
=
(
src_y
*
uvlinesize
)
+
src_x
;
ptr
=
ref_picture
[
1
]
+
offset
;
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ptr
=
s
->
edge_emu_buffer
;
}
...
...
@@ -151,7 +151,7 @@ void ff_mspel_motion(MpegEncContext *s,
ptr
=
ref_picture
[
2
]
+
offset
;
if
(
emu
){
ff_
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
s
->
dsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
ptr
,
s
->
uvlinesize
,
9
,
9
,
src_x
,
src_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
ptr
=
s
->
edge_emu_buffer
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录