Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
67d80a54
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,发现更多精彩内容 >>
提交
67d80a54
编写于
6月 02, 2011
作者:
R
Ronald S. Bultje
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
swscale: split out ppc _template.c files from main swscale.c.
上级
a3e9bb5d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
56 addition
and
21 deletion
+56
-21
libswscale/Makefile
libswscale/Makefile
+2
-1
libswscale/ppc/swscale_altivec.c
libswscale/ppc/swscale_altivec.c
+15
-5
libswscale/ppc/yuv2rgb_altivec.c
libswscale/ppc/yuv2rgb_altivec.c
+1
-0
libswscale/ppc/yuv2rgb_altivec.h
libswscale/ppc/yuv2rgb_altivec.h
+34
-0
libswscale/swscale.c
libswscale/swscale.c
+2
-10
libswscale/swscale_internal.h
libswscale/swscale_internal.h
+2
-5
未找到文件。
libswscale/Makefile
浏览文件 @
67d80a54
...
...
@@ -11,7 +11,8 @@ OBJS-$(ARCH_BFIN) += bfin/internal_bfin.o \
bfin/swscale_bfin.o
\
bfin/yuv2rgb_bfin.o
OBJS-$(CONFIG_MLIB)
+=
mlib/yuv2rgb_mlib.o
OBJS-$(HAVE_ALTIVEC)
+=
ppc/yuv2rgb_altivec.o
\
OBJS-$(HAVE_ALTIVEC)
+=
ppc/swscale_altivec.o
\
ppc/yuv2rgb_altivec.o
\
ppc/yuv2yuv_altivec.o
OBJS-$(HAVE_MMX)
+=
x86/rgb2rgb.o
\
x86/yuv2rgb_mmx.o
...
...
libswscale/ppc/swscale_altivec
_template
.c
→
libswscale/ppc/swscale_altivec.c
浏览文件 @
67d80a54
...
...
@@ -21,6 +21,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "config.h"
#include "libswscale/swscale.h"
#include "libswscale/swscale_internal.h"
#include "libavutil/cpu.h"
#include "yuv2rgb_altivec.h"
#define vzero vec_splat_s32(0)
static
inline
void
...
...
@@ -214,10 +221,10 @@ yuv2yuvX_altivec_real(SwsContext *c,
}
}
static
inline
void
hScale_altivec_real
(
int16_t
*
dst
,
int
dstW
,
const
uint8_t
*
src
,
int
srcW
,
int
xInc
,
const
int16_t
*
filter
,
const
int16_t
*
filterPos
,
int
filterSize
)
static
void
hScale_altivec_real
(
int16_t
*
dst
,
int
dstW
,
const
uint8_t
*
src
,
int
srcW
,
int
xInc
,
const
int16_t
*
filter
,
const
int16_t
*
filterPos
,
int
filterSize
)
{
register
int
i
;
DECLARE_ALIGNED
(
16
,
int
,
tempo
)[
4
];
...
...
@@ -394,8 +401,11 @@ static inline void hScale_altivec_real(int16_t *dst, int dstW,
}
}
static
void
RENAME
(
sws_init_swScale
)
(
SwsContext
*
c
)
void
ff_sws_init_swScale_altivec
(
SwsContext
*
c
)
{
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
c
->
yuv2yuvX
=
yuv2yuvX_altivec_real
;
/* The following list of supported dstFormat values should
...
...
libswscale/ppc/yuv2rgb_altivec.c
浏览文件 @
67d80a54
...
...
@@ -95,6 +95,7 @@ adjustment.
#include "libswscale/swscale.h"
#include "libswscale/swscale_internal.h"
#include "libavutil/cpu.h"
#include "yuv2rgb_altivec.h"
#undef PROFILE_THE_BEAST
#undef INC_SCALING
...
...
libswscale/ppc/yuv2rgb_altivec.h
0 → 100644
浏览文件 @
67d80a54
/*
* AltiVec-enhanced yuv2yuvX
*
* Copyright (C) 2004 Romain Dolbeau <romain@dolbeau.org>
* based on the equivalent C code in swscale.c
*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PPC_YUV2RGB_ALTIVEC_H
#define PPC_YUV2RGB_ALTIVEC_H 1
void
ff_yuv2packedX_altivec
(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
const
int16_t
*
chrFilter
,
const
int16_t
**
chrUSrc
,
const
int16_t
**
chrVSrc
,
int
chrFilterSize
,
const
int16_t
**
alpSrc
,
uint8_t
*
dest
,
int
dstW
,
int
dstY
);
#endif
/* PPC_YUV2RGB_ALTIVEC_H */
libswscale/swscale.c
浏览文件 @
67d80a54
...
...
@@ -1189,12 +1189,6 @@ static inline void monoblack2Y(uint8_t *dst, const uint8_t *src, int width, uint
#include "swscale_template.c"
#if HAVE_ALTIVEC
#undef RENAME
#define RENAME(a) a ## _altivec
#include "ppc/swscale_altivec_template.c"
#endif
//MMX versions
#if HAVE_MMX
#undef RENAME
...
...
@@ -1227,10 +1221,8 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
if
(
cpu_flags
&
AV_CPU_FLAG_MMX2
)
sws_init_swScale_MMX2
(
c
);
#endif
#if HAVE_ALTIVEC
if
(
cpu_flags
&
AV_CPU_FLAG_ALTIVEC
)
sws_init_swScale_altivec
(
c
);
#endif
if
(
HAVE_ALTIVEC
)
ff_sws_init_swScale_altivec
(
c
);
return
swScale_c
;
}
...
...
libswscale/swscale_internal.h
浏览文件 @
67d80a54
...
...
@@ -335,11 +335,6 @@ SwsFunc ff_yuv2rgb_init_mlib(SwsContext *c);
SwsFunc
ff_yuv2rgb_init_altivec
(
SwsContext
*
c
);
SwsFunc
ff_yuv2rgb_get_func_ptr_bfin
(
SwsContext
*
c
);
void
ff_bfin_get_unscaled_swscale
(
SwsContext
*
c
);
void
ff_yuv2packedX_altivec
(
SwsContext
*
c
,
const
int16_t
*
lumFilter
,
const
int16_t
**
lumSrc
,
int
lumFilterSize
,
const
int16_t
*
chrFilter
,
const
int16_t
**
chrUSrc
,
const
int16_t
**
chrVSrc
,
int
chrFilterSize
,
uint8_t
*
dest
,
int
dstW
,
int
dstY
);
const
char
*
sws_format_name
(
enum
PixelFormat
format
);
...
...
@@ -487,4 +482,6 @@ void ff_swscale_get_unscaled_altivec(SwsContext *c);
*/
SwsFunc
ff_getSwsFunc
(
SwsContext
*
c
);
void
ff_sws_init_swScale_altivec
(
SwsContext
*
c
);
#endif
/* SWSCALE_SWSCALE_INTERNAL_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录