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
5c42078b
Commit
5c42078b
authored
Jan 19, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws: fix ED mono dither black level
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7ba9f40a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
output.c
libswscale/output.c
+6
-6
No files found.
libswscale/output.c
View file @
5c42078b
...
...
@@ -351,12 +351,12 @@ yuv2mono_X_c_template(SwsContext *c, const int16_t *lumFilter,
Y2
=
av_clip_uint8
(
Y2
);
}
if
(
c
->
flags
&
SWS_ERROR_DIFFUSION
)
{
Y1
+=
(
7
*
err
+
1
*
c
->
dither_error
[
0
][
i
]
+
5
*
c
->
dither_error
[
0
][
i
+
1
]
+
3
*
c
->
dither_error
[
0
][
i
+
2
])
>>
4
;
Y1
+=
(
7
*
err
+
1
*
c
->
dither_error
[
0
][
i
]
+
5
*
c
->
dither_error
[
0
][
i
+
1
]
+
3
*
c
->
dither_error
[
0
][
i
+
2
]
+
8
-
256
)
>>
4
;
c
->
dither_error
[
0
][
i
]
=
err
;
acc
=
2
*
acc
+
(
Y1
>=
128
);
Y1
-=
220
*
(
acc
&
1
);
err
=
Y2
+
((
7
*
Y1
+
1
*
c
->
dither_error
[
0
][
i
+
1
]
+
5
*
c
->
dither_error
[
0
][
i
+
2
]
+
3
*
c
->
dither_error
[
0
][
i
+
3
])
>>
4
);
err
=
Y2
+
((
7
*
Y1
+
1
*
c
->
dither_error
[
0
][
i
+
1
]
+
5
*
c
->
dither_error
[
0
][
i
+
2
]
+
3
*
c
->
dither_error
[
0
][
i
+
3
]
+
8
-
256
)
>>
4
);
c
->
dither_error
[
0
][
i
+
1
]
=
Y1
;
acc
=
2
*
acc
+
(
err
>=
128
);
err
-=
220
*
(
acc
&
1
);
...
...
@@ -394,13 +394,13 @@ yuv2mono_2_c_template(SwsContext *c, const int16_t *buf[2],
int
Y
;
Y
=
(
buf0
[
i
+
0
]
*
yalpha1
+
buf1
[
i
+
0
]
*
yalpha
)
>>
19
;
Y
+=
(
7
*
err
+
1
*
c
->
dither_error
[
0
][
i
]
+
5
*
c
->
dither_error
[
0
][
i
+
1
]
+
3
*
c
->
dither_error
[
0
][
i
+
2
])
>>
4
;
Y
+=
(
7
*
err
+
1
*
c
->
dither_error
[
0
][
i
]
+
5
*
c
->
dither_error
[
0
][
i
+
1
]
+
3
*
c
->
dither_error
[
0
][
i
+
2
]
+
8
-
256
)
>>
4
;
c
->
dither_error
[
0
][
i
]
=
err
;
acc
=
2
*
acc
+
(
Y
>=
128
);
Y
-=
220
*
(
acc
&
1
);
err
=
(
buf0
[
i
+
1
]
*
yalpha1
+
buf1
[
i
+
1
]
*
yalpha
)
>>
19
;
err
+=
(
7
*
Y
+
1
*
c
->
dither_error
[
0
][
i
+
1
]
+
5
*
c
->
dither_error
[
0
][
i
+
2
]
+
3
*
c
->
dither_error
[
0
][
i
+
3
])
>>
4
;
err
+=
(
7
*
Y
+
1
*
c
->
dither_error
[
0
][
i
+
1
]
+
5
*
c
->
dither_error
[
0
][
i
+
2
]
+
3
*
c
->
dither_error
[
0
][
i
+
3
]
+
8
-
256
)
>>
4
;
c
->
dither_error
[
0
][
i
+
1
]
=
Y
;
acc
=
2
*
acc
+
(
err
>=
128
);
err
-=
220
*
(
acc
&
1
);
...
...
@@ -451,13 +451,13 @@ yuv2mono_1_c_template(SwsContext *c, const int16_t *buf0,
int
Y
;
Y
=
((
buf0
[
i
+
0
]
+
64
)
>>
7
);
Y
+=
(
7
*
err
+
1
*
c
->
dither_error
[
0
][
i
]
+
5
*
c
->
dither_error
[
0
][
i
+
1
]
+
3
*
c
->
dither_error
[
0
][
i
+
2
])
>>
4
;
Y
+=
(
7
*
err
+
1
*
c
->
dither_error
[
0
][
i
]
+
5
*
c
->
dither_error
[
0
][
i
+
1
]
+
3
*
c
->
dither_error
[
0
][
i
+
2
]
+
8
-
256
)
>>
4
;
c
->
dither_error
[
0
][
i
]
=
err
;
acc
=
2
*
acc
+
(
Y
>=
128
);
Y
-=
220
*
(
acc
&
1
);
err
=
((
buf0
[
i
+
1
]
+
64
)
>>
7
);
err
+=
(
7
*
Y
+
1
*
c
->
dither_error
[
0
][
i
+
1
]
+
5
*
c
->
dither_error
[
0
][
i
+
2
]
+
3
*
c
->
dither_error
[
0
][
i
+
3
])
>>
4
;
err
+=
(
7
*
Y
+
1
*
c
->
dither_error
[
0
][
i
+
1
]
+
5
*
c
->
dither_error
[
0
][
i
+
2
]
+
3
*
c
->
dither_error
[
0
][
i
+
3
]
+
8
-
256
)
>>
4
;
c
->
dither_error
[
0
][
i
+
1
]
=
Y
;
acc
=
2
*
acc
+
(
err
>=
128
);
err
-=
220
*
(
acc
&
1
);
...
...
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