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
1dbf40c3
Commit
1dbf40c3
authored
May 24, 2011
by
Ronald S. Bultje
Committed by
Michael Niedermayer
May 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: remove duplicate mmx/mmx2 functions if they are identical.
parent
264dcc63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
swscale_template.c
libswscale/x86/swscale_template.c
+13
-2
No files found.
libswscale/x86/swscale_template.c
View file @
1dbf40c3
...
...
@@ -1510,6 +1510,7 @@ static inline void RENAME(yuv2yuyv422_1)(SwsContext *c, const uint16_t *buf0, co
}
}
#if !COMPILE_TEMPLATE_MMX2
//FIXME yuy2* can read up to 7 samples too much
static
inline
void
RENAME
(
yuy2ToY
)(
uint8_t
*
dst
,
const
uint8_t
*
src
,
long
width
,
uint32_t
*
unused
)
...
...
@@ -1691,6 +1692,7 @@ static inline void RENAME(nv21ToUV)(uint8_t *dstU, uint8_t *dstV,
{
RENAME
(
nvXXtoUV
)(
dstV
,
dstU
,
src1
,
width
);
}
#endif
/* !COMPILE_TEMPLATE_MMX2 */
static
inline
void
RENAME
(
bgr24ToY_mmx
)(
int16_t
*
dst
,
const
uint8_t
*
src
,
long
width
,
enum
PixelFormat
srcFormat
)
{
...
...
@@ -1822,7 +1824,7 @@ static inline void RENAME(rgb24ToUV)(int16_t *dstU, int16_t *dstV, const uint8_t
RENAME
(
bgr24ToUV_mmx
)(
dstU
,
dstV
,
src1
,
width
,
PIX_FMT_RGB24
);
}
#if !COMPILE_TEMPLATE_MMX2
// bilinear / bicubic scaling
static
inline
void
RENAME
(
hScale
)(
int16_t
*
dst
,
int
dstW
,
const
uint8_t
*
src
,
int
srcW
,
int
xInc
,
const
int16_t
*
filter
,
const
int16_t
*
filterPos
,
long
filterSize
)
...
...
@@ -1977,6 +1979,7 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, const uint8_t *src, in
);
}
}
#endif
/* !COMPILE_TEMPLATE_MMX2 */
static
inline
void
RENAME
(
hScale16
)(
int16_t
*
dst
,
int
dstW
,
const
uint16_t
*
src
,
int
srcW
,
int
xInc
,
const
int16_t
*
filter
,
const
int16_t
*
filterPos
,
long
filterSize
,
int
shift
)
...
...
@@ -2410,7 +2413,9 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
}
}
#if !COMPILE_TEMPLATE_MMX2
c
->
hScale
=
RENAME
(
hScale
);
#endif
/* !COMPILE_TEMPLATE_MMX2 */
// Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).
#if COMPILE_TEMPLATE_MMX2
...
...
@@ -2426,7 +2431,8 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
}
#endif
/* COMPILE_TEMPLATE_MMX2 */
switch
(
srcFormat
)
{
#if !COMPILE_TEMPLATE_MMX2
switch
(
srcFormat
)
{
case
PIX_FMT_YUYV422
:
c
->
chrToYV12
=
RENAME
(
yuy2ToUV
);
break
;
case
PIX_FMT_UYVY422
:
c
->
chrToYV12
=
RENAME
(
uyvyToUV
);
break
;
case
PIX_FMT_NV12
:
c
->
chrToYV12
=
RENAME
(
nv12ToUV
);
break
;
...
...
@@ -2439,6 +2445,7 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
case
PIX_FMT_YUV422P16LE
:
case
PIX_FMT_YUV444P16LE
:
c
->
hScale16
=
RENAME
(
hScale16
);
break
;
}
#endif
/* !COMPILE_TEMPLATE_MMX2 */
if
(
!
c
->
chrSrcHSubSample
)
{
switch
(
srcFormat
)
{
case
PIX_FMT_BGR24
:
c
->
chrToYV12
=
RENAME
(
bgr24ToUV
);
break
;
...
...
@@ -2448,21 +2455,25 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
}
switch
(
srcFormat
)
{
#if !COMPILE_TEMPLATE_MMX2
case
PIX_FMT_YUYV422
:
case
PIX_FMT_Y400A
:
c
->
lumToYV12
=
RENAME
(
yuy2ToY
);
break
;
case
PIX_FMT_UYVY422
:
c
->
lumToYV12
=
RENAME
(
uyvyToY
);
break
;
#endif
/* !COMPILE_TEMPLATE_MMX2 */
case
PIX_FMT_BGR24
:
c
->
lumToYV12
=
RENAME
(
bgr24ToY
);
break
;
case
PIX_FMT_RGB24
:
c
->
lumToYV12
=
RENAME
(
rgb24ToY
);
break
;
default:
break
;
}
#if !COMPILE_TEMPLATE_MMX2
if
(
c
->
alpPixBuf
)
{
switch
(
srcFormat
)
{
case
PIX_FMT_Y400A
:
c
->
alpToYV12
=
RENAME
(
yuy2ToY
);
break
;
default:
break
;
}
}
#endif
/* !COMPILE_TEMPLATE_MMX2 */
if
(
isAnyRGB
(
c
->
srcFormat
))
c
->
hScale16
=
RENAME
(
hScale16
);
...
...
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