Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
1909f6b1
Commit
1909f6b1
authored
Aug 25, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: cosmetics: Drop silly camelCase from swScale function pointer name
parent
4e0799a4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
35 deletions
+35
-35
swscale_bfin.c
libswscale/bfin/swscale_bfin.c
+2
-2
yuv2yuv_altivec.c
libswscale/ppc/yuv2yuv_altivec.c
+2
-2
swscale.c
libswscale/swscale.c
+5
-5
swscale_internal.h
libswscale/swscale_internal.h
+3
-3
swscale_unscaled.c
libswscale/swscale_unscaled.c
+21
-21
utils.c
libswscale/utils.c
+2
-2
No files found.
libswscale/bfin/swscale_bfin.c
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment