Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
5cf226fb
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,发现更多精彩内容 >>
提交
5cf226fb
编写于
7月 14, 2006
作者:
S
Stefan Gehrer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avoid double copying of left border in luma prediction
Originally committed as revision 5752 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
50879935
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
22 addition
and
21 deletion
+22
-21
libavcodec/cavs.c
libavcodec/cavs.c
+22
-21
未找到文件。
libavcodec/cavs.c
浏览文件 @
5cf226fb
...
@@ -82,7 +82,8 @@ typedef struct {
...
@@ -82,7 +82,8 @@ typedef struct {
/** intra prediction is done with un-deblocked samples
/** intra prediction is done with un-deblocked samples
they are saved here before deblocking the MB */
they are saved here before deblocking the MB */
uint8_t
*
top_border_y
,
*
top_border_u
,
*
top_border_v
;
uint8_t
*
top_border_y
,
*
top_border_u
,
*
top_border_v
;
uint8_t
left_border_y
[
16
],
left_border_u
[
10
],
left_border_v
[
10
];
uint8_t
left_border_y
[
26
],
left_border_u
[
10
],
left_border_v
[
10
];
uint8_t
intern_border_y
[
26
];
uint8_t
topleft_border_y
,
topleft_border_u
,
topleft_border_v
;
uint8_t
topleft_border_y
,
topleft_border_u
,
topleft_border_v
;
void
(
*
intra_pred_l
[
8
])(
uint8_t
*
d
,
uint8_t
*
top
,
uint8_t
*
left
,
int
stride
);
void
(
*
intra_pred_l
[
8
])(
uint8_t
*
d
,
uint8_t
*
top
,
uint8_t
*
left
,
int
stride
);
...
@@ -151,8 +152,8 @@ static void filter_mb(AVSContext *h, enum mb_t mb_type) {
...
@@ -151,8 +152,8 @@ static void filter_mb(AVSContext *h, enum mb_t mb_type) {
memcpy
(
&
h
->
top_border_u
[
h
->
mbx
*
10
+
1
],
h
->
cu
+
7
*
h
->
c_stride
,
8
);
memcpy
(
&
h
->
top_border_u
[
h
->
mbx
*
10
+
1
],
h
->
cu
+
7
*
h
->
c_stride
,
8
);
memcpy
(
&
h
->
top_border_v
[
h
->
mbx
*
10
+
1
],
h
->
cv
+
7
*
h
->
c_stride
,
8
);
memcpy
(
&
h
->
top_border_v
[
h
->
mbx
*
10
+
1
],
h
->
cv
+
7
*
h
->
c_stride
,
8
);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
h
->
left_border_y
[
i
*
2
+
0
]
=
*
(
h
->
cy
+
15
+
(
i
*
2
+
0
)
*
h
->
l_stride
);
h
->
left_border_y
[
i
*
2
+
1
]
=
*
(
h
->
cy
+
15
+
(
i
*
2
+
0
)
*
h
->
l_stride
);
h
->
left_border_y
[
i
*
2
+
1
]
=
*
(
h
->
cy
+
15
+
(
i
*
2
+
1
)
*
h
->
l_stride
);
h
->
left_border_y
[
i
*
2
+
2
]
=
*
(
h
->
cy
+
15
+
(
i
*
2
+
1
)
*
h
->
l_stride
);
h
->
left_border_u
[
i
+
1
]
=
*
(
h
->
cu
+
7
+
i
*
h
->
c_stride
);
h
->
left_border_u
[
i
+
1
]
=
*
(
h
->
cu
+
7
+
i
*
h
->
c_stride
);
h
->
left_border_v
[
i
+
1
]
=
*
(
h
->
cv
+
7
+
i
*
h
->
c_stride
);
h
->
left_border_v
[
i
+
1
]
=
*
(
h
->
cv
+
7
+
i
*
h
->
c_stride
);
}
}
...
@@ -211,25 +212,26 @@ static void filter_mb(AVSContext *h, enum mb_t mb_type) {
...
@@ -211,25 +212,26 @@ static void filter_mb(AVSContext *h, enum mb_t mb_type) {
****************************************************************************/
****************************************************************************/
static
inline
void
load_intra_pred_luma
(
AVSContext
*
h
,
uint8_t
*
top
,
static
inline
void
load_intra_pred_luma
(
AVSContext
*
h
,
uint8_t
*
top
,
uint8_t
*
left
,
int
block
)
{
uint8_t
*
*
left
,
int
block
)
{
int
i
;
int
i
;
switch
(
block
)
{
switch
(
block
)
{
case
0
:
case
0
:
memcpy
(
&
left
[
1
],
h
->
left_border_y
,
16
)
;
*
left
=
h
->
left_border_y
;
left
[
0
]
=
left
[
1
];
h
->
left_border_y
[
0
]
=
h
->
left_border_y
[
1
];
left
[
17
]
=
left
[
16
]
;
memset
(
&
h
->
left_border_y
[
17
],
h
->
left_border_y
[
16
],
9
)
;
memcpy
(
&
top
[
1
],
&
h
->
top_border_y
[
h
->
mbx
*
16
],
16
);
memcpy
(
&
top
[
1
],
&
h
->
top_border_y
[
h
->
mbx
*
16
],
16
);
top
[
17
]
=
top
[
16
];
top
[
17
]
=
top
[
16
];
top
[
0
]
=
top
[
1
];
top
[
0
]
=
top
[
1
];
if
((
h
->
flags
&
A_AVAIL
)
&&
(
h
->
flags
&
B_AVAIL
))
if
((
h
->
flags
&
A_AVAIL
)
&&
(
h
->
flags
&
B_AVAIL
))
left
[
0
]
=
top
[
0
]
=
h
->
topleft_border_y
;
h
->
left_border_y
[
0
]
=
top
[
0
]
=
h
->
topleft_border_y
;
break
;
break
;
case
1
:
case
1
:
*
left
=
h
->
intern_border_y
;
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
left
[
i
+
1
]
=
*
(
h
->
cy
+
7
+
i
*
h
->
l_stride
);
h
->
intern_border_y
[
i
+
1
]
=
*
(
h
->
cy
+
7
+
i
*
h
->
l_stride
);
memset
(
&
left
[
9
],
left
[
8
],
9
);
memset
(
&
h
->
intern_border_y
[
9
],
h
->
intern_border_y
[
8
],
9
);
left
[
0
]
=
left
[
1
];
h
->
intern_border_y
[
0
]
=
h
->
intern_border_y
[
1
];
memcpy
(
&
top
[
1
],
&
h
->
top_border_y
[
h
->
mbx
*
16
+
8
],
8
);
memcpy
(
&
top
[
1
],
&
h
->
top_border_y
[
h
->
mbx
*
16
+
8
],
8
);
if
(
h
->
flags
&
C_AVAIL
)
if
(
h
->
flags
&
C_AVAIL
)
memcpy
(
&
top
[
9
],
&
h
->
top_border_y
[(
h
->
mbx
+
1
)
*
16
],
8
);
memcpy
(
&
top
[
9
],
&
h
->
top_border_y
[(
h
->
mbx
+
1
)
*
16
],
8
);
...
@@ -238,22 +240,21 @@ static inline void load_intra_pred_luma(AVSContext *h, uint8_t *top,
...
@@ -238,22 +240,21 @@ static inline void load_intra_pred_luma(AVSContext *h, uint8_t *top,
top
[
17
]
=
top
[
16
];
top
[
17
]
=
top
[
16
];
top
[
0
]
=
top
[
1
];
top
[
0
]
=
top
[
1
];
if
(
h
->
flags
&
B_AVAIL
)
if
(
h
->
flags
&
B_AVAIL
)
left
[
0
]
=
top
[
0
]
=
h
->
top_border_y
[
h
->
mbx
*
16
+
7
];
h
->
intern_border_y
[
0
]
=
top
[
0
]
=
h
->
top_border_y
[
h
->
mbx
*
16
+
7
];
break
;
break
;
case
2
:
case
2
:
memcpy
(
&
left
[
1
],
&
h
->
left_border_y
[
8
],
8
);
*
left
=
&
h
->
left_border_y
[
8
];
memset
(
&
left
[
9
],
left
[
8
],
9
);
memcpy
(
&
top
[
1
],
h
->
cy
+
7
*
h
->
l_stride
,
16
);
memcpy
(
&
top
[
1
],
h
->
cy
+
7
*
h
->
l_stride
,
16
);
top
[
17
]
=
top
[
16
];
top
[
17
]
=
top
[
16
];
left
[
0
]
=
h
->
left_border_y
[
7
];
top
[
0
]
=
top
[
1
];
top
[
0
]
=
top
[
1
];
if
(
h
->
flags
&
A_AVAIL
)
if
(
h
->
flags
&
A_AVAIL
)
top
[
0
]
=
left
[
0
];
top
[
0
]
=
h
->
left_border_y
[
8
];
break
;
break
;
case
3
:
case
3
:
for
(
i
=
0
;
i
<
9
;
i
++
)
*
left
=
&
h
->
intern_border_y
[
8
];
left
[
i
]
=
*
(
h
->
cy
+
7
+
(
i
+
7
)
*
h
->
l_stride
);
for
(
i
=
0
;
i
<
8
;
i
++
)
memset
(
&
left
[
9
],
left
[
8
],
9
);
h
->
intern_border_y
[
i
+
9
]
=
*
(
h
->
cy
+
7
+
(
i
+
8
)
*
h
->
l_stride
);
memset
(
&
h
->
intern_border_y
[
17
],
h
->
intern_border_y
[
16
],
9
);
memcpy
(
&
top
[
0
],
h
->
cy
+
7
+
7
*
h
->
l_stride
,
9
);
memcpy
(
&
top
[
0
],
h
->
cy
+
7
+
7
*
h
->
l_stride
,
9
);
memset
(
&
top
[
9
],
top
[
8
],
9
);
memset
(
&
top
[
9
],
top
[
8
],
9
);
break
;
break
;
...
@@ -816,7 +817,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
...
@@ -816,7 +817,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
GetBitContext
*
gb
=
&
h
->
s
.
gb
;
GetBitContext
*
gb
=
&
h
->
s
.
gb
;
int
block
,
pred_mode_uv
;
int
block
,
pred_mode_uv
;
uint8_t
top
[
18
];
uint8_t
top
[
18
];
uint8_t
left
[
18
]
;
uint8_t
*
left
=
NULL
;
uint8_t
*
d
;
uint8_t
*
d
;
init_mb
(
h
);
init_mb
(
h
);
...
@@ -875,7 +876,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
...
@@ -875,7 +876,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
/* luma intra prediction interleaved with residual decode/transform/add */
/* luma intra prediction interleaved with residual decode/transform/add */
for
(
block
=
0
;
block
<
4
;
block
++
)
{
for
(
block
=
0
;
block
<
4
;
block
++
)
{
d
=
h
->
cy
+
h
->
luma_scan
[
block
];
d
=
h
->
cy
+
h
->
luma_scan
[
block
];
load_intra_pred_luma
(
h
,
top
,
left
,
block
);
load_intra_pred_luma
(
h
,
top
,
&
left
,
block
);
h
->
intra_pred_l
[
h
->
pred_mode_Y
[
scan3x3
[
block
]]]
h
->
intra_pred_l
[
h
->
pred_mode_Y
[
scan3x3
[
block
]]]
(
d
,
top
,
left
,
h
->
l_stride
);
(
d
,
top
,
left
,
h
->
l_stride
);
if
(
h
->
cbp
&
(
1
<<
block
))
if
(
h
->
cbp
&
(
1
<<
block
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录