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
f3079858
Commit
f3079858
authored
Jan 21, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale/input: fix rgba64 alpha non native
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
95d04690
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
input.c
libswscale/input.c
+15
-5
No files found.
libswscale/input.c
View file @
f3079858
...
...
@@ -412,14 +412,24 @@ static void gbr24pToUV_half_c(uint8_t *_dstU, uint8_t *_dstV,
}
}
static
void
rgba64ToA_c
(
uint8_t
*
_dst
,
const
uint8_t
*
_src
,
const
uint8_t
*
unused1
,
static
void
rgba64
le
ToA_c
(
uint8_t
*
_dst
,
const
uint8_t
*
_src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int16_t
*
dst
=
(
int16_t
*
)
_dst
;
const
uint16_t
*
src
=
(
const
uint16_t
*
)
_src
;
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
dst
[
i
]
=
src
[
4
*
i
+
3
];
dst
[
i
]
=
AV_RL16
(
src
+
4
*
i
+
3
);
}
static
void
rgba64beToA_c
(
uint8_t
*
_dst
,
const
uint8_t
*
_src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
{
int16_t
*
dst
=
(
int16_t
*
)
_dst
;
const
uint16_t
*
src
=
(
const
uint16_t
*
)
_src
;
int
i
;
for
(
i
=
0
;
i
<
width
;
i
++
)
dst
[
i
]
=
AV_RB16
(
src
+
4
*
i
+
3
);
}
static
void
abgrToA_c
(
uint8_t
*
_dst
,
const
uint8_t
*
src
,
const
uint8_t
*
unused1
,
const
uint8_t
*
unused2
,
int
width
,
uint32_t
*
unused
)
...
...
@@ -1359,9 +1369,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
}
switch
(
srcFormat
)
{
case
AV_PIX_FMT_BGRA64LE
:
case
AV_PIX_FMT_RGBA64LE
:
c
->
alpToYV12
=
rgba64leToA_c
;
break
;
case
AV_PIX_FMT_BGRA64BE
:
case
AV_PIX_FMT_RGBA64LE
:
case
AV_PIX_FMT_RGBA64BE
:
c
->
alpToYV12
=
rgba64ToA_c
;
break
;
case
AV_PIX_FMT_RGBA64BE
:
c
->
alpToYV12
=
rgba64beToA_c
;
break
;
case
AV_PIX_FMT_BGRA
:
case
AV_PIX_FMT_RGBA
:
c
->
alpToYV12
=
rgbaToA_c
;
...
...
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