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
f03a0299
Commit
f03a0299
authored
Feb 14, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: Add cliping to yuv2422_1_c_template()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ef96bf29
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
output.c
libswscale/output.c
+14
-0
No files found.
libswscale/output.c
View file @
f03a0299
...
@@ -519,6 +519,13 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
...
@@ -519,6 +519,13 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
int
U
=
(
ubuf0
[
i
]
+
64
)
>>
7
;
int
U
=
(
ubuf0
[
i
]
+
64
)
>>
7
;
int
V
=
(
vbuf0
[
i
]
+
64
)
>>
7
;
int
V
=
(
vbuf0
[
i
]
+
64
)
>>
7
;
if
((
Y1
|
Y2
|
U
|
V
)
&
0x100
)
{
Y1
=
av_clip_uint8
(
Y1
);
Y2
=
av_clip_uint8
(
Y2
);
U
=
av_clip_uint8
(
U
);
V
=
av_clip_uint8
(
V
);
}
output_pixels
(
i
*
4
,
Y1
,
U
,
Y2
,
V
);
output_pixels
(
i
*
4
,
Y1
,
U
,
Y2
,
V
);
}
}
}
else
{
}
else
{
...
@@ -529,6 +536,13 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
...
@@ -529,6 +536,13 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0,
int
U
=
(
ubuf0
[
i
]
+
ubuf1
[
i
]
+
128
)
>>
8
;
int
U
=
(
ubuf0
[
i
]
+
ubuf1
[
i
]
+
128
)
>>
8
;
int
V
=
(
vbuf0
[
i
]
+
vbuf1
[
i
]
+
128
)
>>
8
;
int
V
=
(
vbuf0
[
i
]
+
vbuf1
[
i
]
+
128
)
>>
8
;
if
((
Y1
|
Y2
|
U
|
V
)
&
0x100
)
{
Y1
=
av_clip_uint8
(
Y1
);
Y2
=
av_clip_uint8
(
Y2
);
U
=
av_clip_uint8
(
U
);
V
=
av_clip_uint8
(
V
);
}
output_pixels
(
i
*
4
,
Y1
,
U
,
Y2
,
V
);
output_pixels
(
i
*
4
,
Y1
,
U
,
Y2
,
V
);
}
}
}
}
...
...
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