Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
bd141af4
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,发现更多精彩内容 >>
提交
bd141af4
编写于
10月 08, 2011
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
swscale: Fix prototypes of *toyv12 so they can be used with planar rgb input.
Signed-off-by:
N
Michael Niedermayer
<
michaelni@gmx.at
>
上级
a3e11fa4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
53 addition
and
49 deletion
+53
-49
libswscale/swscale.c
libswscale/swscale.c
+40
-36
libswscale/swscale_internal.h
libswscale/swscale_internal.h
+3
-3
libswscale/x86/swscale_template.c
libswscale/x86/swscale_template.c
+10
-10
未找到文件。
libswscale/swscale.c
浏览文件 @
bd141af4
...
...
@@ -1610,7 +1610,7 @@ rgb48ToUV_half_c_template(uint16_t *dstU, uint16_t *dstV,
#undef input_pixel
#define rgb48funcs(pattern, BE_LE, origin) \
static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *_dst, const uint8_t *_src, \
static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *_dst, const uint8_t *_src,
const uint8_t *unused0, const uint8_t *unused1,
\
int width, uint32_t *unused) \
{ \
const uint16_t *src = (const uint16_t *) _src; \
...
...
@@ -1619,7 +1619,7 @@ static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *_dst, const uint8_t *_src,
} \
\
static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \
const uint8_t *_src1, const uint8_t *_src2, \
const uint8_t *
unused0, const uint8_t *
_src1, const uint8_t *_src2, \
int width, uint32_t *unused) \
{ \
const uint16_t *src1 = (const uint16_t *) _src1, \
...
...
@@ -1629,7 +1629,7 @@ static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \
} \
\
static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, \
const uint8_t *_src1, const uint8_t *_src2, \
const uint8_t *
unused0, const uint8_t *
_src1, const uint8_t *_src2, \
int width, uint32_t *unused) \
{ \
const uint16_t *src1 = (const uint16_t *) _src1, \
...
...
@@ -1730,7 +1730,7 @@ rgb16_32ToUV_half_c_template(int16_t *dstU, int16_t *dstV,
#define rgb16_32_wrapper(fmt, name, shr, shg, shb, shp, maskr, \
maskg, maskb, rsh, gsh, bsh, S) \
static void name ## ToY_c(uint8_t *dst, const uint8_t *src, \
static void name ## ToY_c(uint8_t *dst, const uint8_t *src,
const uint8_t *unused1, const uint8_t *unused2,
\
int width, uint32_t *unused) \
{ \
rgb16_32ToY_c_template((int16_t*)dst, src, width, fmt, \
...
...
@@ -1739,7 +1739,7 @@ static void name ## ToY_c(uint8_t *dst, const uint8_t *src, \
} \
\
static void name ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
const uint8_t *src, const uint8_t *dummy, \
const uint8_t *
unused0, const uint8_t *
src, const uint8_t *dummy, \
int width, uint32_t *unused) \
{ \
rgb16_32ToUV_c_template((int16_t*)dstU, (int16_t*)dstV, src, width, fmt, \
...
...
@@ -1748,7 +1748,7 @@ static void name ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
} \
\
static void name ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \
const uint8_t *src, const uint8_t *dummy, \
const uint8_t *
unused0, const uint8_t *
src, const uint8_t *dummy, \
int width, uint32_t *unused) \
{ \
rgb16_32ToUV_half_c_template((int16_t*)dstU, (int16_t*)dstV, src, width, fmt, \
...
...
@@ -1769,7 +1769,7 @@ rgb16_32_wrapper(PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7
rgb16_32_wrapper
(
PIX_FMT_RGB565BE
,
rgb16be
,
0
,
0
,
0
,
0
,
0xF800
,
0x07E0
,
0x001F
,
0
,
5
,
11
,
RGB2YUV_SHIFT
+
8
);
rgb16_32_wrapper
(
PIX_FMT_RGB555BE
,
rgb15be
,
0
,
0
,
0
,
0
,
0x7C00
,
0x03E0
,
0x001F
,
0
,
5
,
10
,
RGB2YUV_SHIFT
+
7
);
static
void
abgrToA_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
uint32_t
*
unused
)
static
void
abgrToA_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
...
...
@@ -1777,7 +1777,7 @@ static void abgrToA_c(int16_t *dst, const uint8_t *src, int width, uint32_t *unu
}
}
static
void
rgbaToA_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
uint32_t
*
unused
)
static
void
rgbaToA_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
...
...
@@ -1785,7 +1785,7 @@ static void rgbaToA_c(int16_t *dst, const uint8_t *src, int width, uint32_t *unu
}
}
static
void
palToA_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
uint32_t
*
pal
)
static
void
palToA_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
pal
)
{
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
...
...
@@ -1795,7 +1795,7 @@ static void palToA_c(int16_t *dst, const uint8_t *src, int width, uint32_t *pal)
}
}
static
void
palToY_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
long
width
,
uint32_t
*
pal
)
static
void
palToY_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
long
width
,
uint32_t
*
pal
)
{
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
{
...
...
@@ -1806,7 +1806,7 @@ static void palToY_c(int16_t *dst, const uint8_t *src, long width, uint32_t *pal
}
static
void
palToUV_c
(
uint16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
pal
)
{
int
i
;
...
...
@@ -1819,7 +1819,7 @@ static void palToUV_c(uint16_t *dstU, int16_t *dstV,
}
}
static
void
monowhite2Y_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
uint32_t
*
unused
)
static
void
monowhite2Y_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
width
/
8
;
i
++
)
{
...
...
@@ -1834,7 +1834,7 @@ static void monowhite2Y_c(int16_t *dst, const uint8_t *src, int width, uint32_t
}
}
static
void
monoblack2Y_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
uint32_t
*
unused
)
static
void
monoblack2Y_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
width
/
8
;
i
++
)
{
...
...
@@ -1851,7 +1851,7 @@ static void monoblack2Y_c(int16_t *dst, const uint8_t *src, int width, uint32_t
//FIXME yuy2* can read up to 7 samples too much
static
void
yuy2ToY_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
static
void
yuy2ToY_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1859,7 +1859,7 @@ static void yuy2ToY_c(uint8_t *dst, const uint8_t *src, int width,
dst
[
i
]
=
src
[
2
*
i
];
}
static
void
yuy2ToUV_c
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
static
void
yuy2ToUV_c
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1870,7 +1870,7 @@ static void yuy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
assert
(
src1
==
src2
);
}
static
void
bswap16Y_c
(
uint8_t
*
_dst
,
const
uint8_t
*
_src
,
int
width
,
uint32_t
*
unused
)
static
void
bswap16Y_c
(
uint8_t
*
_dst
,
const
uint8_t
*
_src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
const
uint16_t
*
src
=
(
const
uint16_t
*
)
_src
;
...
...
@@ -1880,7 +1880,7 @@ static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, int width, uint32_t *
}
}
static
void
bswap16UV_c
(
uint8_t
*
_dstU
,
uint8_t
*
_dstV
,
const
uint8_t
*
_src1
,
static
void
bswap16UV_c
(
uint8_t
*
_dstU
,
uint8_t
*
_dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
_src1
,
const
uint8_t
*
_src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1895,7 +1895,7 @@ static void bswap16UV_c(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *_src1,
/* This is almost identical to the previous, end exists only because
* yuy2ToY/UV)(dst, src+1, ...) would have 100% unaligned accesses. */
static
void
uyvyToY_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
static
void
uyvyToY_c
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1903,7 +1903,7 @@ static void uyvyToY_c(uint8_t *dst, const uint8_t *src, int width,
dst
[
i
]
=
src
[
2
*
i
+
1
];
}
static
void
uyvyToUV_c
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
static
void
uyvyToUV_c
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1925,14 +1925,14 @@ static av_always_inline void nvXXtoUV_c(uint8_t *dst1, uint8_t *dst2,
}
static
void
nv12ToUV_c
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
nvXXtoUV_c
(
dstU
,
dstV
,
src1
,
width
);
}
static
void
nv21ToUV_c
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
nvXXtoUV_c
(
dstV
,
dstU
,
src1
,
width
);
...
...
@@ -1940,7 +1940,7 @@ static void nv21ToUV_c(uint8_t *dstU, uint8_t *dstV,
#define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
static
void
bgr24ToY_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
static
void
bgr24ToY_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1953,7 +1953,7 @@ static void bgr24ToY_c(int16_t *dst, const uint8_t *src,
}
}
static
void
bgr24ToUV_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
src1
,
static
void
bgr24ToUV_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1968,7 +1968,7 @@ static void bgr24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *src1,
assert
(
src1
==
src2
);
}
static
void
bgr24ToUV_half_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
src1
,
static
void
bgr24ToUV_half_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1983,7 +1983,7 @@ static void bgr24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *src1,
assert
(
src1
==
src2
);
}
static
void
rgb24ToY_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
int
width
,
static
void
rgb24ToY_c
(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -1996,7 +1996,7 @@ static void rgb24ToY_c(int16_t *dst, const uint8_t *src, int width,
}
}
static
void
rgb24ToUV_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
src1
,
static
void
rgb24ToUV_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -2011,7 +2011,7 @@ static void rgb24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *src1,
}
}
static
void
rgb24ToUV_half_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
src1
,
static
void
rgb24ToUV_half_c
(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
unused0
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
int
i
;
...
...
@@ -2197,17 +2197,18 @@ static void hyscale_fast_c(SwsContext *c, int16_t *dst, int dstWidth,
// *** horizontal scale Y line to temp buffer
static
av_always_inline
void
hyscale
(
SwsContext
*
c
,
int16_t
*
dst
,
int
dstWidth
,
const
uint8_t
*
src
,
int
srcW
,
int
xInc
,
const
uint8_t
*
src
,
const
uint8_t
*
src2
,
const
uint8_t
*
src3
,
int
srcW
,
int
xInc
,
const
int16_t
*
hLumFilter
,
const
int16_t
*
hLumFilterPos
,
int
hLumFilterSize
,
uint8_t
*
formatConvBuffer
,
uint32_t
*
pal
,
int
isAlpha
)
{
void
(
*
toYV12
)(
uint8_t
*
,
const
uint8_t
*
,
int
,
uint32_t
*
)
=
isAlpha
?
c
->
alpToYV12
:
c
->
lumToYV12
;
void
(
*
toYV12
)(
uint8_t
*
,
const
uint8_t
*
,
const
uint8_t
*
,
const
uint8_t
*
,
int
,
uint32_t
*
)
=
isAlpha
?
c
->
alpToYV12
:
c
->
lumToYV12
;
void
(
*
convertRange
)(
int16_t
*
,
int
)
=
isAlpha
?
NULL
:
c
->
lumConvertRange
;
if
(
toYV12
)
{
toYV12
(
formatConvBuffer
,
src
,
srcW
,
pal
);
toYV12
(
formatConvBuffer
,
src
,
src
2
,
src3
,
src
W
,
pal
);
src
=
formatConvBuffer
;
}
...
...
@@ -2241,14 +2242,14 @@ static void hcscale_fast_c(SwsContext *c, int16_t *dst1, int16_t *dst2,
}
static
av_always_inline
void
hcscale
(
SwsContext
*
c
,
int16_t
*
dst1
,
int16_t
*
dst2
,
int
dstWidth
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
src
0
,
const
uint8_t
*
src
1
,
const
uint8_t
*
src2
,
int
srcW
,
int
xInc
,
const
int16_t
*
hChrFilter
,
const
int16_t
*
hChrFilterPos
,
int
hChrFilterSize
,
uint8_t
*
formatConvBuffer
,
uint32_t
*
pal
)
{
if
(
c
->
chrToYV12
)
{
uint8_t
*
buf2
=
formatConvBuffer
+
FFALIGN
(
srcW
*
2
+
78
,
16
);
c
->
chrToYV12
(
formatConvBuffer
,
buf2
,
src1
,
src2
,
srcW
,
pal
);
c
->
chrToYV12
(
formatConvBuffer
,
buf2
,
src
0
,
src
1
,
src2
,
srcW
,
pal
);
src1
=
formatConvBuffer
;
src2
=
buf2
;
}
...
...
@@ -2650,17 +2651,19 @@ static int swScale(SwsContext *c, const uint8_t* src[],
//Do horizontal scaling
while
(
lastInLumBuf
<
lastLumSrcY
)
{
const
uint8_t
*
src1
=
src
[
0
]
+
(
lastInLumBuf
+
1
-
srcSliceY
)
*
srcStride
[
0
];
const
uint8_t
*
src2
=
src
[
3
]
+
(
lastInLumBuf
+
1
-
srcSliceY
)
*
srcStride
[
3
];
const
uint8_t
*
src2
=
src
[
1
]
+
(
lastInLumBuf
+
1
-
srcSliceY
)
*
srcStride
[
1
];
const
uint8_t
*
src3
=
src
[
2
]
+
(
lastInLumBuf
+
1
-
srcSliceY
)
*
srcStride
[
2
];
const
uint8_t
*
src4
=
src
[
3
]
+
(
lastInLumBuf
+
1
-
srcSliceY
)
*
srcStride
[
3
];
lumBufIndex
++
;
assert
(
lumBufIndex
<
2
*
vLumBufSize
);
assert
(
lastInLumBuf
+
1
-
srcSliceY
<
srcSliceH
);
assert
(
lastInLumBuf
+
1
-
srcSliceY
>=
0
);
hyscale
(
c
,
lumPixBuf
[
lumBufIndex
],
dstW
,
src1
,
srcW
,
lumXInc
,
hyscale
(
c
,
lumPixBuf
[
lumBufIndex
],
dstW
,
src1
,
src
2
,
src3
,
src
W
,
lumXInc
,
hLumFilter
,
hLumFilterPos
,
hLumFilterSize
,
formatConvBuffer
,
pal
,
0
);
if
(
CONFIG_SWSCALE_ALPHA
&&
alpPixBuf
)
hyscale
(
c
,
alpPixBuf
[
lumBufIndex
],
dstW
,
src
2
,
srcW
,
hyscale
(
c
,
alpPixBuf
[
lumBufIndex
],
dstW
,
src
4
,
NULL
,
NULL
,
srcW
,
lumXInc
,
hLumFilter
,
hLumFilterPos
,
hLumFilterSize
,
formatConvBuffer
,
pal
,
1
);
...
...
@@ -2669,6 +2672,7 @@ static int swScale(SwsContext *c, const uint8_t* src[],
lumBufIndex
,
lastInLumBuf
);
}
while
(
lastInChrBuf
<
lastChrSrcY
)
{
const
uint8_t
*
src0
=
src
[
0
]
+
(
lastInChrBuf
+
1
-
chrSrcSliceY
)
*
srcStride
[
0
];
const
uint8_t
*
src1
=
src
[
1
]
+
(
lastInChrBuf
+
1
-
chrSrcSliceY
)
*
srcStride
[
1
];
const
uint8_t
*
src2
=
src
[
2
]
+
(
lastInChrBuf
+
1
-
chrSrcSliceY
)
*
srcStride
[
2
];
chrBufIndex
++
;
...
...
@@ -2679,7 +2683,7 @@ static int swScale(SwsContext *c, const uint8_t* src[],
if
(
c
->
needs_hcscale
)
hcscale
(
c
,
chrUPixBuf
[
chrBufIndex
],
chrVPixBuf
[
chrBufIndex
],
chrDstW
,
src1
,
src2
,
chrSrcW
,
chrXInc
,
chrDstW
,
src
0
,
src
1
,
src2
,
chrSrcW
,
chrXInc
,
hChrFilter
,
hChrFilterPos
,
hChrFilterSize
,
formatConvBuffer
,
pal
);
lastInChrBuf
++
;
...
...
libswscale/swscale_internal.h
浏览文件 @
bd141af4
...
...
@@ -418,12 +418,12 @@ typedef struct SwsContext {
yuv2packed2_fn
yuv2packed2
;
yuv2packedX_fn
yuv2packedX
;
void
(
*
lumToYV12
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
void
(
*
lumToYV12
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
src2
,
const
uint8_t
*
src3
,
int
width
,
uint32_t
*
pal
);
///< Unscaled conversion of luma plane to YV12 for horizontal scaler.
void
(
*
alpToYV12
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
void
(
*
alpToYV12
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
src2
,
const
uint8_t
*
src3
,
int
width
,
uint32_t
*
pal
);
///< Unscaled conversion of alpha plane to YV12 for horizontal scaler.
void
(
*
chrToYV12
)(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
src3
,
int
width
,
uint32_t
*
pal
);
///< Unscaled conversion of chroma planes to YV12 for horizontal scaler.
/**
* Scale one horizontal line of input data using a bilinear filter
...
...
libswscale/x86/swscale_template.c
浏览文件 @
bd141af4
...
...
@@ -1674,7 +1674,7 @@ static void RENAME(yuv2yuyv422_1)(SwsContext *c, const int16_t *buf0,
#if !COMPILE_TEMPLATE_MMX2
//FIXME yuy2* can read up to 7 samples too much
static
void
RENAME
(
yuy2ToY
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
static
void
RENAME
(
yuy2ToY
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
__asm__
volatile
(
...
...
@@ -1695,7 +1695,7 @@ static void RENAME(yuy2ToY)(uint8_t *dst, const uint8_t *src,
}
static
void
RENAME
(
yuy2ToUV
)(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused1
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
__asm__
volatile
(
...
...
@@ -1724,7 +1724,7 @@ static void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV,
/* This is almost identical to the previous, end exists only because
* yuy2ToY/UV)(dst, src+1, ...) would have 100% unaligned accesses. */
static
void
RENAME
(
uyvyToY
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
static
void
RENAME
(
uyvyToY
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
__asm__
volatile
(
...
...
@@ -1744,7 +1744,7 @@ static void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src,
}
static
void
RENAME
(
uyvyToUV
)(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused1
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
__asm__
volatile
(
...
...
@@ -1798,14 +1798,14 @@ static av_always_inline void RENAME(nvXXtoUV)(uint8_t *dst1, uint8_t *dst2,
}
static
void
RENAME
(
nv12ToUV
)(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused1
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
RENAME
(
nvXXtoUV
)(
dstU
,
dstV
,
src1
,
width
);
}
static
void
RENAME
(
nv21ToUV
)(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused1
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
RENAME
(
nvXXtoUV
)(
dstV
,
dstU
,
src1
,
width
);
...
...
@@ -1865,13 +1865,13 @@ static av_always_inline void RENAME(bgr24ToY_mmx)(int16_t *dst, const uint8_t *s
);
}
static
void
RENAME
(
bgr24ToY
)(
int16_t
*
dst
,
const
uint8_t
*
src
,
static
void
RENAME
(
bgr24ToY
)(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
RENAME
(
bgr24ToY_mmx
)(
dst
,
src
,
width
,
PIX_FMT_BGR24
);
}
static
void
RENAME
(
rgb24ToY
)(
int16_t
*
dst
,
const
uint8_t
*
src
,
static
void
RENAME
(
rgb24ToY
)(
int16_t
*
dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
RENAME
(
bgr24ToY_mmx
)(
dst
,
src
,
width
,
PIX_FMT_RGB24
);
...
...
@@ -1936,7 +1936,7 @@ static av_always_inline void RENAME(bgr24ToUV_mmx)(int16_t *dstU, int16_t *dstV,
}
static
void
RENAME
(
bgr24ToUV
)(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused1
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
RENAME
(
bgr24ToUV_mmx
)(
dstU
,
dstV
,
src1
,
width
,
PIX_FMT_BGR24
);
...
...
@@ -1944,7 +1944,7 @@ static void RENAME(bgr24ToUV)(int16_t *dstU, int16_t *dstV,
}
static
void
RENAME
(
rgb24ToUV
)(
int16_t
*
dstU
,
int16_t
*
dstV
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
const
uint8_t
*
unused1
,
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
int
width
,
uint32_t
*
unused
)
{
assert
(
src1
==
src2
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录