You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/pixlet: clip chroma before shifting
Fixes artifacts. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -482,8 +482,8 @@ static void postprocess_chroma(AVFrame *frame, int w, int h, int depth)
|
|||||||
|
|
||||||
for (j = 0; j < h; j++) {
|
for (j = 0; j < h; j++) {
|
||||||
for (i = 0; i < w; i++) {
|
for (i = 0; i < w; i++) {
|
||||||
dstu[i] = (add + srcu[i]) << shift;
|
dstu[i] = av_clip(add + srcu[i], 0, 32767) << shift;
|
||||||
dstv[i] = (add + srcv[i]) << shift;
|
dstv[i] = av_clip(add + srcv[i], 0, 32767) << shift;
|
||||||
}
|
}
|
||||||
dstu += strideu;
|
dstu += strideu;
|
||||||
dstv += stridev;
|
dstv += stridev;
|
||||||
|
Reference in New Issue
Block a user