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
c3dcd3a2
Commit
c3dcd3a2
authored
Apr 21, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws: factorize rgb 9+ planar funcs declarations.
parent
144baf42
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
109 deletions
+21
-109
input.c
libswscale/input.c
+21
-109
No files found.
libswscale/input.c
View file @
c3dcd3a2
...
...
@@ -755,56 +755,6 @@ static av_always_inline void planar_rgb16_to_y(uint8_t *_dst, const uint8_t *_sr
}
}
static
void
planar_rgb9le_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
9
,
0
,
rgb2yuv
);
}
static
void
planar_rgb9be_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
9
,
1
,
rgb2yuv
);
}
static
void
planar_rgb10le_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
10
,
0
,
rgb2yuv
);
}
static
void
planar_rgb10be_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
10
,
1
,
rgb2yuv
);
}
static
void
planar_rgb12le_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
12
,
0
,
rgb2yuv
);
}
static
void
planar_rgb12be_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
12
,
1
,
rgb2yuv
);
}
static
void
planar_rgb14le_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
14
,
0
,
rgb2yuv
);
}
static
void
planar_rgb14be_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
14
,
1
,
rgb2yuv
);
}
static
void
planar_rgb16le_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
16
,
0
,
rgb2yuv
);
}
static
void
planar_rgb16be_to_y
(
uint8_t
*
dst
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_y
(
dst
,
src
,
w
,
16
,
1
,
rgb2yuv
);
}
static
av_always_inline
void
planar_rgb16_to_uv
(
uint8_t
*
_dstU
,
uint8_t
*
_dstV
,
const
uint8_t
*
_src
[
4
],
int
width
,
int
bpc
,
int
is_be
,
int32_t
*
rgb2yuv
)
...
...
@@ -826,65 +776,27 @@ static av_always_inline void planar_rgb16_to_uv(uint8_t *_dstU, uint8_t *_dstV,
}
#undef rdpx
static
void
planar_rgb9le_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
9
,
0
,
rgb2yuv
);
}
static
void
planar_rgb9be_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
9
,
1
,
rgb2yuv
);
}
static
void
planar_rgb10le_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
10
,
0
,
rgb2yuv
);
}
static
void
planar_rgb10be_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
10
,
1
,
rgb2yuv
);
}
static
void
planar_rgb12le_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
12
,
0
,
rgb2yuv
);
}
static
void
planar_rgb12be_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
12
,
1
,
rgb2yuv
);
}
static
void
planar_rgb14le_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
14
,
0
,
rgb2yuv
);
}
static
void
planar_rgb14be_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
14
,
1
,
rgb2yuv
);
}
#define rgb9plus_planar_funcs_endian(nbits, endian_name, endian) \
static void planar_rgb##nbits##endian_name##_to_y(uint8_t *dst, const uint8_t *src[4], \
int w, int32_t *rgb2yuv) \
{ \
planar_rgb16_to_y(dst, src, w, nbits, endian, rgb2yuv); \
} \
static void planar_rgb##nbits##endian_name##_to_uv(uint8_t *dstU, uint8_t *dstV, \
const uint8_t *src[4], int w, int32_t *rgb2yuv) \
{ \
planar_rgb16_to_uv(dstU, dstV, src, w, nbits, endian, rgb2yuv); \
} \
static
void
planar_rgb16le_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
16
,
0
,
rgb2yuv
);
}
#define rgb9plus_planar_funcs(nbits) \
rgb9plus_planar_funcs_endian(nbits, le, 0) \
rgb9plus_planar_funcs_endian(nbits, be, 1)
static
void
planar_rgb16be_to_uv
(
uint8_t
*
dstU
,
uint8_t
*
dstV
,
const
uint8_t
*
src
[
4
],
int
w
,
int32_t
*
rgb2yuv
)
{
planar_rgb16_to_uv
(
dstU
,
dstV
,
src
,
w
,
16
,
1
,
rgb2yuv
);
}
rgb9plus_planar_funcs
(
9
)
rgb9plus_planar_funcs
(
10
)
rgb9plus_planar_funcs
(
12
)
rgb9plus_planar_funcs
(
14
)
rgb9plus_planar_funcs
(
16
)
av_cold
void
ff_sws_init_input_funcs
(
SwsContext
*
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