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
70c25c62
Commit
70c25c62
authored
Oct 30, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws: move fillPlane16() to header so it can be used from more than 1 place
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
89d2f014
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
20 deletions
+21
-20
swscale_internal.h
libswscale/swscale_internal.h
+21
-0
swscale_unscaled.c
libswscale/swscale_unscaled.c
+0
-20
No files found.
libswscale/swscale_internal.h
View file @
70c25c62
...
...
@@ -30,6 +30,7 @@
#include "libavutil/avassert.h"
#include "libavutil/avutil.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
#include "libavutil/pixdesc.h"
...
...
@@ -769,4 +770,24 @@ void ff_sws_init_output_funcs(SwsContext *c,
void
ff_sws_init_swScale_altivec
(
SwsContext
*
c
);
void
ff_sws_init_swScale_mmx
(
SwsContext
*
c
);
static
inline
void
fillPlane16
(
uint8_t
*
plane
,
int
stride
,
int
width
,
int
height
,
int
y
,
int
alpha
,
int
bits
,
const
int
big_endian
)
{
int
i
,
j
;
uint8_t
*
ptr
=
plane
+
stride
*
y
;
int
v
=
alpha
?
0xFFFF
>>
(
15
-
bits
)
:
(
1
<<
bits
);
for
(
i
=
0
;
i
<
height
;
i
++
)
{
#define FILL(wfunc) \
for (j = 0; j < width; j++) {\
wfunc(ptr+2*j, v);\
}
if
(
big_endian
)
{
FILL
(
AV_WB16
);
}
else
{
FILL
(
AV_WL16
);
}
ptr
+=
stride
;
}
}
#endif
/* SWSCALE_SWSCALE_INTERNAL_H */
libswscale/swscale_unscaled.c
View file @
70c25c62
...
...
@@ -139,26 +139,6 @@ static void fillPlane(uint8_t *plane, int stride, int width, int height, int y,
}
}
static
void
fillPlane16
(
uint8_t
*
plane
,
int
stride
,
int
width
,
int
height
,
int
y
,
int
alpha
,
int
bits
,
const
int
big_endian
)
{
int
i
,
j
;
uint8_t
*
ptr
=
plane
+
stride
*
y
;
int
v
=
alpha
?
0xFFFF
>>
(
15
-
bits
)
:
(
1
<<
bits
);
for
(
i
=
0
;
i
<
height
;
i
++
)
{
#define FILL(wfunc) \
for (j = 0; j < width; j++) {\
wfunc(ptr+2*j, v);\
}
if
(
big_endian
)
{
FILL
(
AV_WB16
);
}
else
{
FILL
(
AV_WL16
);
}
ptr
+=
stride
;
}
}
static
void
copyPlane
(
const
uint8_t
*
src
,
int
srcStride
,
int
srcSliceY
,
int
srcSliceH
,
int
width
,
uint8_t
*
dst
,
int
dstStride
)
...
...
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