Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
835ab920
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,发现更多精彩内容 >>
提交
835ab920
编写于
5月 24, 2011
作者:
R
Ronald S. Bultje
提交者:
Michael Niedermayer
5月 28, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
swscale: remove if(accurate_rnd) branch from functions.
上级
2b04858a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
42 addition
and
16 deletion
+42
-16
libswscale/x86/swscale_template.c
libswscale/x86/swscale_template.c
+42
-16
未找到文件。
libswscale/x86/swscale_template.c
浏览文件 @
835ab920
...
...
@@ -827,11 +827,10 @@
#define WRITEYUY2(dst, dstw, index) REAL_WRITEYUY2(dst, dstw, index)
static
inline
void
RENAME
(
yuv2yuvX
)(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
static
inline
void
RENAME
(
yuv2yuvX
_ar
)(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
const
int16_t
*
chrFilter
,
const
int16_t
**
chrSrc
,
int
chrFilterSize
,
const
int16_t
**
alpSrc
,
uint8_t
*
dest
,
uint8_t
*
uDest
,
uint8_t
*
vDest
,
uint8_t
*
aDest
,
long
dstW
,
long
chrDstW
)
{
if
(
c
->
flags
&
SWS_ACCURATE_RND
)
{
if
(
uDest
)
{
YSCALEYUV2YV12X_ACCURATE
(
"0"
,
CHR_MMX_FILTER_OFFSET
,
uDest
,
chrDstW
)
YSCALEYUV2YV12X_ACCURATE
(
AV_STRINGIFY
(
VOF
),
CHR_MMX_FILTER_OFFSET
,
vDest
,
chrDstW
)
...
...
@@ -841,7 +840,12 @@ static inline void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter, con
}
YSCALEYUV2YV12X_ACCURATE
(
"0"
,
LUM_MMX_FILTER_OFFSET
,
dest
,
dstW
)
}
else
{
}
static
inline
void
RENAME
(
yuv2yuvX
)(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
const
int16_t
*
chrFilter
,
const
int16_t
**
chrSrc
,
int
chrFilterSize
,
const
int16_t
**
alpSrc
,
uint8_t
*
dest
,
uint8_t
*
uDest
,
uint8_t
*
vDest
,
uint8_t
*
aDest
,
long
dstW
,
long
chrDstW
)
{
if
(
uDest
)
{
YSCALEYUV2YV12X
(
"0"
,
CHR_MMX_FILTER_OFFSET
,
uDest
,
chrDstW
)
YSCALEYUV2YV12X
(
AV_STRINGIFY
(
VOF
),
CHR_MMX_FILTER_OFFSET
,
vDest
,
chrDstW
)
...
...
@@ -851,10 +855,9 @@ static inline void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter, con
}
YSCALEYUV2YV12X
(
"0"
,
LUM_MMX_FILTER_OFFSET
,
dest
,
dstW
)
}
}
static
inline
void
RENAME
(
yuv2yuv1
)(
SwsContext
*
c
,
const
int16_t
*
lumSrc
,
const
int16_t
*
chrSrc
,
const
int16_t
*
alpSrc
,
static
inline
void
RENAME
(
yuv2yuv1
_ar
)(
SwsContext
*
c
,
const
int16_t
*
lumSrc
,
const
int16_t
*
chrSrc
,
const
int16_t
*
alpSrc
,
uint8_t
*
dest
,
uint8_t
*
uDest
,
uint8_t
*
vDest
,
uint8_t
*
aDest
,
long
dstW
,
long
chrDstW
)
{
long
p
=
4
;
...
...
@@ -862,7 +865,6 @@ static inline void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const
uint8_t
*
dst
[
4
]
=
{
aDest
,
dest
,
uDest
,
vDest
};
x86_reg
counter
[
4
]
=
{
dstW
,
dstW
,
chrDstW
,
chrDstW
};
if
(
c
->
flags
&
SWS_ACCURATE_RND
)
{
while
(
p
--
)
{
if
(
dst
[
p
])
{
__asm__
volatile
(
...
...
@@ -873,7 +875,16 @@ static inline void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const
);
}
}
}
else
{
}
static
inline
void
RENAME
(
yuv2yuv1
)(
SwsContext
*
c
,
const
int16_t
*
lumSrc
,
const
int16_t
*
chrSrc
,
const
int16_t
*
alpSrc
,
uint8_t
*
dest
,
uint8_t
*
uDest
,
uint8_t
*
vDest
,
uint8_t
*
aDest
,
long
dstW
,
long
chrDstW
)
{
long
p
=
4
;
const
uint8_t
*
src
[
4
]
=
{
alpSrc
+
dstW
,
lumSrc
+
dstW
,
chrSrc
+
chrDstW
,
chrSrc
+
VOFW
+
chrDstW
};
uint8_t
*
dst
[
4
]
=
{
aDest
,
dest
,
uDest
,
vDest
};
x86_reg
counter
[
4
]
=
{
dstW
,
dstW
,
chrDstW
,
chrDstW
};
while
(
p
--
)
{
if
(
dst
[
p
])
{
__asm__
volatile
(
...
...
@@ -884,21 +895,19 @@ static inline void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const
);
}
}
}
}
/**
* vertical scale YV12 to RGB
*/
static
inline
void
RENAME
(
yuv2packedX
)(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
static
inline
void
RENAME
(
yuv2packedX
_ar
)(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
const
int16_t
*
chrFilter
,
const
int16_t
**
chrSrc
,
int
chrFilterSize
,
const
int16_t
**
alpSrc
,
uint8_t
*
dest
,
long
dstW
,
long
dstY
)
{
x86_reg
dummy
=
0
;
x86_reg
dstW_reg
=
dstW
;
if
(
c
->
flags
&
SWS_ACCURATE_RND
)
{
switch
(
c
->
dstFormat
)
{
case
PIX_FMT_RGB32
:
if
(
CONFIG_SWSCALE_ALPHA
&&
c
->
alpPixBuf
)
{
...
...
@@ -979,8 +988,20 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, const int16_t *lumFilter,
YSCALEYUV2PACKEDX_END
return
;
}
}
else
{
switch
(
c
->
dstFormat
)
{
yuv2packedXinC
(
c
,
lumFilter
,
lumSrc
,
lumFilterSize
,
chrFilter
,
chrSrc
,
chrFilterSize
,
alpSrc
,
dest
,
dstW
,
dstY
);
}
static
inline
void
RENAME
(
yuv2packedX
)(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
const
int16_t
*
chrFilter
,
const
int16_t
**
chrSrc
,
int
chrFilterSize
,
const
int16_t
**
alpSrc
,
uint8_t
*
dest
,
long
dstW
,
long
dstY
)
{
x86_reg
dummy
=
0
;
x86_reg
dstW_reg
=
dstW
;
switch
(
c
->
dstFormat
)
{
case
PIX_FMT_RGB32
:
if
(
CONFIG_SWSCALE_ALPHA
&&
c
->
alpPixBuf
)
{
YSCALEYUV2PACKEDX
...
...
@@ -1053,7 +1074,6 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, const int16_t *lumFilter,
YSCALEYUV2PACKEDX_END
return
;
}
}
yuv2packedXinC
(
c
,
lumFilter
,
lumSrc
,
lumFilterSize
,
chrFilter
,
chrSrc
,
chrFilterSize
,
...
...
@@ -2284,11 +2304,17 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
enum
PixelFormat
srcFormat
=
c
->
srcFormat
;
if
(
!
(
c
->
flags
&
SWS_BITEXACT
))
{
c
->
yuv2yuv1
=
RENAME
(
yuv2yuv1
);
c
->
yuv2yuvX
=
RENAME
(
yuv2yuvX
);
if
(
c
->
flags
&
SWS_ACCURATE_RND
)
{
c
->
yuv2yuv1
=
RENAME
(
yuv2yuv1_ar
);
c
->
yuv2yuvX
=
RENAME
(
yuv2yuvX_ar
);
c
->
yuv2packedX
=
RENAME
(
yuv2packedX_ar
);
}
else
{
c
->
yuv2yuv1
=
RENAME
(
yuv2yuv1
);
c
->
yuv2yuvX
=
RENAME
(
yuv2yuvX
);
c
->
yuv2packedX
=
RENAME
(
yuv2packedX
);
}
c
->
yuv2packed1
=
RENAME
(
yuv2packed1
);
c
->
yuv2packed2
=
RENAME
(
yuv2packed2
);
c
->
yuv2packedX
=
RENAME
(
yuv2packedX
);
}
c
->
hScale
=
RENAME
(
hScale
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录