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
4a056160
Commit
4a056160
authored
May 25, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: remove duplicatiopn of rgb24toyv12_c()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
364889cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
47 deletions
+9
-47
rgb2rgb.h
libswscale/rgb2rgb.h
+7
-0
rgb2rgb_template.c
libswscale/rgb2rgb_template.c
+1
-1
rgb2rgb_template.c
libswscale/x86/rgb2rgb_template.c
+1
-46
No files found.
libswscale/rgb2rgb.h
View file @
4a056160
...
...
@@ -68,6 +68,13 @@ void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, long src_size);
void
shuffle_bytes_3012
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
long
src_size
);
void
shuffle_bytes_3210
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
long
src_size
);
void
rgb24toyv12_c
(
const
uint8_t
*
src
,
uint8_t
*
ydst
,
uint8_t
*
udst
,
uint8_t
*
vdst
,
long
width
,
long
height
,
long
lumStride
,
long
chromStride
,
long
srcStride
);
#if LIBSWSCALE_VERSION_MAJOR < 1
/* deprecated, use the public versions in swscale.h */
attribute_deprecated
void
palette8topacked32
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
long
num_pixels
,
const
uint8_t
*
palette
);
...
...
libswscale/rgb2rgb_template.c
View file @
4a056160
...
...
@@ -633,7 +633,7 @@ static inline void uyvytoyv12_c(const uint8_t *src, uint8_t *ydst,
* others are ignored in the C version.
* FIXME: Write HQ version.
*/
static
inline
void
rgb24toyv12_c
(
const
uint8_t
*
src
,
uint8_t
*
ydst
,
void
rgb24toyv12_c
(
const
uint8_t
*
src
,
uint8_t
*
ydst
,
uint8_t
*
udst
,
uint8_t
*
vdst
,
long
width
,
long
height
,
long
lumStride
,
long
chromStride
,
...
...
libswscale/x86/rgb2rgb_template.c
View file @
4a056160
...
...
@@ -1976,52 +1976,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
SFENCE
"
\n\t
"
:::
"memory"
);
for
(;
y
<
height
;
y
+=
2
)
{
long
i
;
for
(
i
=
0
;
i
<
chromWidth
;
i
++
)
{
unsigned
int
b
=
src
[
6
*
i
+
0
];
unsigned
int
g
=
src
[
6
*
i
+
1
];
unsigned
int
r
=
src
[
6
*
i
+
2
];
unsigned
int
Y
=
((
RY
*
r
+
GY
*
g
+
BY
*
b
)
>>
RGB2YUV_SHIFT
)
+
16
;
unsigned
int
V
=
((
RV
*
r
+
GV
*
g
+
BV
*
b
)
>>
RGB2YUV_SHIFT
)
+
128
;
unsigned
int
U
=
((
RU
*
r
+
GU
*
g
+
BU
*
b
)
>>
RGB2YUV_SHIFT
)
+
128
;
udst
[
i
]
=
U
;
vdst
[
i
]
=
V
;
ydst
[
2
*
i
]
=
Y
;
b
=
src
[
6
*
i
+
3
];
g
=
src
[
6
*
i
+
4
];
r
=
src
[
6
*
i
+
5
];
Y
=
((
RY
*
r
+
GY
*
g
+
BY
*
b
)
>>
RGB2YUV_SHIFT
)
+
16
;
ydst
[
2
*
i
+
1
]
=
Y
;
}
ydst
+=
lumStride
;
src
+=
srcStride
;
for
(
i
=
0
;
i
<
chromWidth
;
i
++
)
{
unsigned
int
b
=
src
[
6
*
i
+
0
];
unsigned
int
g
=
src
[
6
*
i
+
1
];
unsigned
int
r
=
src
[
6
*
i
+
2
];
unsigned
int
Y
=
((
RY
*
r
+
GY
*
g
+
BY
*
b
)
>>
RGB2YUV_SHIFT
)
+
16
;
ydst
[
2
*
i
]
=
Y
;
b
=
src
[
6
*
i
+
3
];
g
=
src
[
6
*
i
+
4
];
r
=
src
[
6
*
i
+
5
];
Y
=
((
RY
*
r
+
GY
*
g
+
BY
*
b
)
>>
RGB2YUV_SHIFT
)
+
16
;
ydst
[
2
*
i
+
1
]
=
Y
;
}
udst
+=
chromStride
;
vdst
+=
chromStride
;
ydst
+=
lumStride
;
src
+=
srcStride
;
}
rgb24toyv12_c
(
src
,
ydst
,
udst
,
vdst
,
width
,
height
-
y
,
lumStride
,
chromStride
,
srcStride
);
}
static
void
RENAME
(
interleaveBytes
)(
const
uint8_t
*
src1
,
const
uint8_t
*
src2
,
uint8_t
*
dest
,
...
...
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