OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f03a029
)
swscale: yuv2422_2_c_template() add cliping.
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 14 Feb 2012 19:41:19 +0000
(20:41 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 14 Feb 2012 20:33:45 +0000
(21:33 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/output.c
patch
|
blob
|
history
diff --git
a/libswscale/output.c
b/libswscale/output.c
index
d24cf1f
..
75d0baa
100644
(file)
--- a/
libswscale/output.c
+++ b/
libswscale/output.c
@@
-499,6
+499,13
@@
yuv2422_2_c_template(SwsContext *c, const int16_t *buf[2],
int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha) >> 19;
int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha) >> 19;
+ 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);
}
}