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
12627113
Commit
12627113
authored
Jul 03, 2015
by
Kevin Coyle
Committed by
Michael Niedermayer
Jul 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YUV->BGR32 MMX support
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8255b14c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
swscale_template.c
libswscale/x86/swscale_template.c
+30
-0
No files found.
libswscale/x86/swscale_template.c
View file @
12627113
...
...
@@ -399,6 +399,35 @@ static void RENAME(yuv2rgb32_X)(SwsContext *c, const int16_t *lumFilter,
}
}
static
void
RENAME
(
yuv2bgr32_X
)(
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
)
{
x86_reg
dummy
=
0
;
x86_reg
dstW_reg
=
dstW
;
x86_reg
uv_off
=
c
->
uv_offx2
;
if
(
CONFIG_SWSCALE_ALPHA
&&
c
->
alpPixBuf
)
{
YSCALEYUV2PACKEDX
YSCALEYUV2RGBX
YSCALEYUV2PACKEDX_YA
(
ALP_MMX_FILTER_OFFSET
,
%%
mm0
,
%%
mm3
,
%%
mm6
,
%%
mm1
,
%%
mm7
)
"psraw $3, %%mm1
\n\t
"
"psraw $3, %%mm7
\n\t
"
"packuswb %%mm7, %%mm1
\n\t
"
WRITEBGR32
(
%
4
,
"%5"
,
%%
REGa
,
%%
mm5
,
%%
mm4
,
%%
mm2
,
%%
mm1
,
%%
mm0
,
%%
mm7
,
%%
mm3
,
%%
mm6
)
YSCALEYUV2PACKEDX_END
}
else
{
YSCALEYUV2PACKEDX
YSCALEYUV2RGBX
"pcmpeqd %%mm7, %%mm7
\n\t
"
WRITEBGR32
(
%
4
,
"%5"
,
%%
REGa
,
%%
mm5
,
%%
mm4
,
%%
mm2
,
%%
mm7
,
%%
mm0
,
%%
mm1
,
%%
mm3
,
%%
mm6
)
YSCALEYUV2PACKEDX_END
}
}
#define REAL_WRITERGB16(dst, dstw, index) \
"pand "MANGLE(bF8)", %%mm2 \n\t"
/* B */
\
"pand "MANGLE(bFC)", %%mm4 \n\t"
/* G */
\
...
...
@@ -1491,6 +1520,7 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c)
if
(
!
(
c
->
flags
&
SWS_FULL_CHR_H_INT
))
{
switch
(
c
->
dstFormat
)
{
case
AV_PIX_FMT_RGB32
:
c
->
yuv2packedX
=
RENAME
(
yuv2rgb32_X
);
break
;
case
AV_PIX_FMT_BGR32
:
c
->
yuv2packedX
=
RENAME
(
yuv2bgr32_X
);
break
;
#if HAVE_6REGS
case
AV_PIX_FMT_BGR24
:
c
->
yuv2packedX
=
RENAME
(
yuv2bgr24_X
);
break
;
#endif
...
...
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