Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
1909f6b1
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,发现更多精彩内容 >>
提交
1909f6b1
编写于
8月 25, 2013
作者:
D
Diego Biurrun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
swscale: cosmetics: Drop silly camelCase from swScale function pointer name
上级
4e0799a4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
35 deletion
+35
-35
libswscale/bfin/swscale_bfin.c
libswscale/bfin/swscale_bfin.c
+2
-2
libswscale/ppc/yuv2yuv_altivec.c
libswscale/ppc/yuv2yuv_altivec.c
+2
-2
libswscale/swscale.c
libswscale/swscale.c
+5
-5
libswscale/swscale_internal.h
libswscale/swscale_internal.h
+3
-3
libswscale/swscale_unscaled.c
libswscale/swscale_unscaled.c
+21
-21
libswscale/utils.c
libswscale/utils.c
+2
-2
未找到文件。
libswscale/bfin/swscale_bfin.c
浏览文件 @
1909f6b1
...
...
@@ -77,11 +77,11 @@ av_cold void ff_get_unscaled_swscale_bfin(SwsContext *c)
if
(
c
->
dstFormat
==
AV_PIX_FMT_YUV420P
&&
c
->
srcFormat
==
AV_PIX_FMT_UYVY422
)
{
av_log
(
NULL
,
AV_LOG_VERBOSE
,
"selecting Blackfin optimized uyvytoyv12_unscaled
\n
"
);
c
->
sw
S
cale
=
uyvytoyv12_unscaled
;
c
->
sw
s
cale
=
uyvytoyv12_unscaled
;
}
if
(
c
->
dstFormat
==
AV_PIX_FMT_YUV420P
&&
c
->
srcFormat
==
AV_PIX_FMT_YUYV422
)
{
av_log
(
NULL
,
AV_LOG_VERBOSE
,
"selecting Blackfin optimized yuyvtoyv12_unscaled
\n
"
);
c
->
sw
S
cale
=
yuyvtoyv12_unscaled
;
c
->
sw
s
cale
=
yuyvtoyv12_unscaled
;
}
}
libswscale/ppc/yuv2yuv_altivec.c
浏览文件 @
1909f6b1
...
...
@@ -193,9 +193,9 @@ av_cold void ff_get_unscaled_swscale_ppc(SwsContext *c)
// unscaled YV12 -> packed YUV, we want speed
if
(
dstFormat
==
AV_PIX_FMT_YUYV422
)
c
->
sw
S
cale
=
yv12toyuy2_unscaled_altivec
;
c
->
sw
s
cale
=
yv12toyuy2_unscaled_altivec
;
else
if
(
dstFormat
==
AV_PIX_FMT_UYVY422
)
c
->
sw
S
cale
=
yv12touyvy_unscaled_altivec
;
c
->
sw
s
cale
=
yv12touyvy_unscaled_altivec
;
}
#endif
/* HAVE_ALTIVEC */
}
libswscale/swscale.c
浏览文件 @
1909f6b1
...
...
@@ -337,7 +337,7 @@ static av_always_inline void hcscale(SwsContext *c, int16_t *dst1,
if (DEBUG_SWSCALE_BUFFERS) \
av_log(c, AV_LOG_DEBUG, __VA_ARGS__)
static
int
sw
S
cale
(
SwsContext
*
c
,
const
uint8_t
*
src
[],
static
int
sw
s
cale
(
SwsContext
*
c
,
const
uint8_t
*
src
[],
int
srcStride
[],
int
srcSliceY
,
int
srcSliceH
,
uint8_t
*
dst
[],
int
dstStride
[])
{
...
...
@@ -407,7 +407,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
srcStride
[
1
]
<<=
c
->
vChrDrop
;
srcStride
[
2
]
<<=
c
->
vChrDrop
;
DEBUG_BUFFERS
(
"sw
S
cale() %p[%d] %p[%d] %p[%d] %p[%d] -> %p[%d] %p[%d] %p[%d] %p[%d]
\n
"
,
DEBUG_BUFFERS
(
"sw
s
cale() %p[%d] %p[%d] %p[%d] %p[%d] -> %p[%d] %p[%d] %p[%d] %p[%d]
\n
"
,
src
[
0
],
srcStride
[
0
],
src
[
1
],
srcStride
[
1
],
src
[
2
],
srcStride
[
2
],
src
[
3
],
srcStride
[
3
],
dst
[
0
],
dstStride
[
0
],
dst
[
1
],
dstStride
[
1
],
...
...
@@ -718,7 +718,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
return
dstY
-
lastDstY
;
}
static
av_cold
void
sws_init_sw
Scale_c
(
SwsContext
*
c
)
static
av_cold
void
sws_init_sw
scale
(
SwsContext
*
c
)
{
enum
AVPixelFormat
srcFormat
=
c
->
srcFormat
;
...
...
@@ -770,12 +770,12 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
SwsFunc
ff_getSwsFunc
(
SwsContext
*
c
)
{
sws_init_sw
Scale_c
(
c
);
sws_init_sw
scale
(
c
);
if
(
ARCH_PPC
)
ff_sws_init_swscale_ppc
(
c
);
if
(
ARCH_X86
)
ff_sws_init_swscale_x86
(
c
);
return
sw
S
cale
;
return
sw
s
cale
;
}
libswscale/swscale_internal.h
浏览文件 @
1909f6b1
...
...
@@ -263,7 +263,7 @@ typedef struct SwsContext {
* Note that src, dst, srcStride, dstStride will be copied in the
* sws_scale() wrapper so they can be freely modified here.
*/
SwsFunc
sw
S
cale
;
SwsFunc
sw
s
cale
;
int
srcW
;
///< Width of source luma/alpha planes.
int
srcH
;
///< Height of source luma/alpha planes.
int
dstH
;
///< Height of destination luma/alpha planes.
...
...
@@ -454,7 +454,7 @@ typedef struct SwsContext {
DECLARE_ALIGNED
(
8
,
uint64_t
,
sparc_coeffs
)[
10
];
#endif
/* function pointers for sw
S
cale() */
/* function pointers for sw
s
cale() */
yuv2planar1_fn
yuv2plane1
;
yuv2planarX_fn
yuv2planeX
;
yuv2interleavedX_fn
yuv2nv12cX
;
...
...
@@ -730,7 +730,7 @@ extern const int32_t ff_yuv2rgb_coeffs[8][4];
extern
const
AVClass
sws_context_class
;
/**
* Set c->sw
S
cale to an unscaled converter if one exists for the specific
* Set c->sw
s
cale to an unscaled converter if one exists for the specific
* source and destination formats, bit depths, flags, etc.
*/
void
ff_get_unscaled_swscale
(
SwsContext
*
c
);
...
...
libswscale/swscale_unscaled.c
浏览文件 @
1909f6b1
...
...
@@ -979,31 +979,31 @@ void ff_get_unscaled_swscale(SwsContext *c)
/* yv12_to_nv12 */
if
((
srcFormat
==
AV_PIX_FMT_YUV420P
||
srcFormat
==
AV_PIX_FMT_YUVA420P
)
&&
(
dstFormat
==
AV_PIX_FMT_NV12
||
dstFormat
==
AV_PIX_FMT_NV21
))
{
c
->
sw
S
cale
=
planarToNv12Wrapper
;
c
->
sw
s
cale
=
planarToNv12Wrapper
;
}
/* yuv2bgr */
if
((
srcFormat
==
AV_PIX_FMT_YUV420P
||
srcFormat
==
AV_PIX_FMT_YUV422P
||
srcFormat
==
AV_PIX_FMT_YUVA420P
)
&&
isAnyRGB
(
dstFormat
)
&&
!
(
flags
&
SWS_ACCURATE_RND
)
&&
!
(
dstH
&
1
))
{
c
->
sw
S
cale
=
ff_yuv2rgb_get_func_ptr
(
c
);
c
->
sw
s
cale
=
ff_yuv2rgb_get_func_ptr
(
c
);
}
if
(
srcFormat
==
AV_PIX_FMT_YUV410P
&&
(
dstFormat
==
AV_PIX_FMT_YUV420P
||
dstFormat
==
AV_PIX_FMT_YUVA420P
)
&&
!
(
flags
&
SWS_BITEXACT
))
{
c
->
sw
S
cale
=
yvu9ToYv12Wrapper
;
c
->
sw
s
cale
=
yvu9ToYv12Wrapper
;
}
/* bgr24toYV12 */
if
(
srcFormat
==
AV_PIX_FMT_BGR24
&&
(
dstFormat
==
AV_PIX_FMT_YUV420P
||
dstFormat
==
AV_PIX_FMT_YUVA420P
)
&&
!
(
flags
&
SWS_ACCURATE_RND
))
c
->
sw
S
cale
=
bgr24ToYv12Wrapper
;
c
->
sw
s
cale
=
bgr24ToYv12Wrapper
;
/* RGB/BGR -> RGB/BGR (no dither needed forms) */
if
(
isAnyRGB
(
srcFormat
)
&&
isAnyRGB
(
dstFormat
)
&&
findRgbConvFn
(
c
)
&&
(
!
needsDither
||
(
c
->
flags
&
(
SWS_FAST_BILINEAR
|
SWS_POINT
))))
c
->
sw
Scale
=
rgbToRgbWrapper
;
c
->
sw
scale
=
rgbToRgbWrapper
;
#define isByteRGB(f) ( \
f == AV_PIX_FMT_RGB32 || \
...
...
@@ -1014,11 +1014,11 @@ void ff_get_unscaled_swscale(SwsContext *c)
f == AV_PIX_FMT_BGR24)
if
(
srcFormat
==
AV_PIX_FMT_GBRP
&&
isPlanar
(
srcFormat
)
&&
isByteRGB
(
dstFormat
))
c
->
sw
S
cale
=
planarRgbToRgbWrapper
;
c
->
sw
s
cale
=
planarRgbToRgbWrapper
;
if
(
av_pix_fmt_desc_get
(
srcFormat
)
->
comp
[
0
].
depth_minus1
==
7
&&
isPackedRGB
(
srcFormat
)
&&
dstFormat
==
AV_PIX_FMT_GBRP
)
c
->
sw
S
cale
=
rgbToPlanarRgbWrapper
;
c
->
sw
s
cale
=
rgbToPlanarRgbWrapper
;
/* bswap 16 bits per pixel/component packed formats */
if
(
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_BGR444
)
||
...
...
@@ -1031,7 +1031,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_RGB555
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_RGB565
)
||
IS_DIFFERENT_ENDIANESS
(
srcFormat
,
dstFormat
,
AV_PIX_FMT_XYZ12
))
c
->
sw
S
cale
=
packed_16bpc_bswap
;
c
->
sw
s
cale
=
packed_16bpc_bswap
;
if
((
usePal
(
srcFormat
)
&&
(
dstFormat
==
AV_PIX_FMT_RGB32
||
...
...
@@ -1040,13 +1040,13 @@ void ff_get_unscaled_swscale(SwsContext *c)
dstFormat
==
AV_PIX_FMT_BGR32
||
dstFormat
==
AV_PIX_FMT_BGR32_1
||
dstFormat
==
AV_PIX_FMT_BGR24
)))
c
->
sw
S
cale
=
palToRgbWrapper
;
c
->
sw
s
cale
=
palToRgbWrapper
;
if
(
srcFormat
==
AV_PIX_FMT_YUV422P
)
{
if
(
dstFormat
==
AV_PIX_FMT_YUYV422
)
c
->
sw
S
cale
=
yuv422pToYuy2Wrapper
;
c
->
sw
s
cale
=
yuv422pToYuy2Wrapper
;
else
if
(
dstFormat
==
AV_PIX_FMT_UYVY422
)
c
->
sw
S
cale
=
yuv422pToUyvyWrapper
;
c
->
sw
s
cale
=
yuv422pToUyvyWrapper
;
}
/* LQ converters if -sws 0 or -sws 4*/
...
...
@@ -1054,21 +1054,21 @@ void ff_get_unscaled_swscale(SwsContext *c)
/* yv12_to_yuy2 */
if
(
srcFormat
==
AV_PIX_FMT_YUV420P
||
srcFormat
==
AV_PIX_FMT_YUVA420P
)
{
if
(
dstFormat
==
AV_PIX_FMT_YUYV422
)
c
->
sw
S
cale
=
planarToYuy2Wrapper
;
c
->
sw
s
cale
=
planarToYuy2Wrapper
;
else
if
(
dstFormat
==
AV_PIX_FMT_UYVY422
)
c
->
sw
S
cale
=
planarToUyvyWrapper
;
c
->
sw
s
cale
=
planarToUyvyWrapper
;
}
}
if
(
srcFormat
==
AV_PIX_FMT_YUYV422
&&
(
dstFormat
==
AV_PIX_FMT_YUV420P
||
dstFormat
==
AV_PIX_FMT_YUVA420P
))
c
->
sw
S
cale
=
yuyvToYuv420Wrapper
;
c
->
sw
s
cale
=
yuyvToYuv420Wrapper
;
if
(
srcFormat
==
AV_PIX_FMT_UYVY422
&&
(
dstFormat
==
AV_PIX_FMT_YUV420P
||
dstFormat
==
AV_PIX_FMT_YUVA420P
))
c
->
sw
S
cale
=
uyvyToYuv420Wrapper
;
c
->
sw
s
cale
=
uyvyToYuv420Wrapper
;
if
(
srcFormat
==
AV_PIX_FMT_YUYV422
&&
dstFormat
==
AV_PIX_FMT_YUV422P
)
c
->
sw
S
cale
=
yuyvToYuv422Wrapper
;
c
->
sw
s
cale
=
yuyvToYuv422Wrapper
;
if
(
srcFormat
==
AV_PIX_FMT_UYVY422
&&
dstFormat
==
AV_PIX_FMT_YUV422P
)
c
->
sw
S
cale
=
uyvyToYuv422Wrapper
;
c
->
sw
s
cale
=
uyvyToYuv422Wrapper
;
/* simple copy */
if
(
srcFormat
==
dstFormat
||
...
...
@@ -1084,9 +1084,9 @@ void ff_get_unscaled_swscale(SwsContext *c)
srcFormat
!=
AV_PIX_FMT_NV12
&&
srcFormat
!=
AV_PIX_FMT_NV21
))
{
if
(
isPacked
(
c
->
srcFormat
))
c
->
sw
S
cale
=
packedCopyWrapper
;
c
->
sw
s
cale
=
packedCopyWrapper
;
else
/* Planar YUV or gray */
c
->
sw
S
cale
=
planarCopyWrapper
;
c
->
sw
s
cale
=
planarCopyWrapper
;
}
if
(
ARCH_BFIN
)
...
...
@@ -1235,7 +1235,7 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
if
(
srcSliceY
+
srcSliceH
==
c
->
srcH
)
c
->
sliceDir
=
0
;
return
c
->
sw
S
cale
(
c
,
src2
,
srcStride2
,
srcSliceY
,
srcSliceH
,
dst2
,
return
c
->
sw
s
cale
(
c
,
src2
,
srcStride2
,
srcSliceY
,
srcSliceH
,
dst2
,
dstStride2
);
}
else
{
// slices go from bottom to top => we flip the image internally
...
...
@@ -1261,7 +1261,7 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
if
(
!
srcSliceY
)
c
->
sliceDir
=
0
;
return
c
->
sw
S
cale
(
c
,
src2
,
srcStride2
,
c
->
srcH
-
srcSliceY
-
srcSliceH
,
return
c
->
sw
s
cale
(
c
,
src2
,
srcStride2
,
c
->
srcH
-
srcSliceY
-
srcSliceH
,
srcSliceH
,
dst2
,
dstStride2
);
}
}
...
...
libswscale/utils.c
浏览文件 @
1909f6b1
...
...
@@ -1010,7 +1010,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
(
c
->
srcRange
==
c
->
dstRange
||
isAnyRGB
(
dstFormat
)))
{
ff_get_unscaled_swscale
(
c
);
if
(
c
->
sw
S
cale
)
{
if
(
c
->
sw
s
cale
)
{
if
(
flags
&
SWS_PRINT_INFO
)
av_log
(
c
,
AV_LOG_INFO
,
"using unscaled %s -> %s special converter
\n
"
,
...
...
@@ -1297,7 +1297,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
c
->
chrXInc
,
c
->
chrYInc
);
}
c
->
sw
S
cale
=
ff_getSwsFunc
(
c
);
c
->
sw
s
cale
=
ff_getSwsFunc
(
c
);
return
0
;
fail:
// FIXME replace things by appropriate error codes
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录