mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 20:50:09 +00:00
avfilter/vf_waveform: use intensity for other components too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
a008a7cc95
commit
953b8c5a43
@ -688,9 +688,9 @@ static void flat(WaveformContext *s, AVFrame *in, AVFrame *out,
|
|||||||
target = d0 + x + d0_signed_linesize * c0;
|
target = d0 + x + d0_signed_linesize * c0;
|
||||||
update(target, max, intensity);
|
update(target, max, intensity);
|
||||||
target = d1 + x + d1_signed_linesize * (c0 - c1);
|
target = d1 + x + d1_signed_linesize * (c0 - c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
target = d1 + x + d1_signed_linesize * (c0 + c1);
|
target = d1 + x + d1_signed_linesize * (c0 + c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
|
|
||||||
c0_data += c0_linesize;
|
c0_data += c0_linesize;
|
||||||
c1_data += c1_linesize;
|
c1_data += c1_linesize;
|
||||||
@ -721,16 +721,16 @@ static void flat(WaveformContext *s, AVFrame *in, AVFrame *out,
|
|||||||
target = d0_data - c0;
|
target = d0_data - c0;
|
||||||
update(target, max, intensity);
|
update(target, max, intensity);
|
||||||
target = d1_data - (c0 - c1);
|
target = d1_data - (c0 - c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
target = d1_data - (c0 + c1);
|
target = d1_data - (c0 + c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
} else {
|
} else {
|
||||||
target = d0_data + c0;
|
target = d0_data + c0;
|
||||||
update(target, max, intensity);
|
update(target, max, intensity);
|
||||||
target = d1_data + (c0 - c1);
|
target = d1_data + (c0 - c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
target = d1_data + (c0 + c1);
|
target = d1_data + (c0 + c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -791,10 +791,10 @@ static void aflat(WaveformContext *s, AVFrame *in, AVFrame *out,
|
|||||||
update(target, max, intensity);
|
update(target, max, intensity);
|
||||||
|
|
||||||
target = d1 + x + d1_signed_linesize * (c0 + c1);
|
target = d1 + x + d1_signed_linesize * (c0 + c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
|
|
||||||
target = d2 + x + d2_signed_linesize * (c0 + c2);
|
target = d2 + x + d2_signed_linesize * (c0 + c2);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
|
|
||||||
c0_data += c0_linesize;
|
c0_data += c0_linesize;
|
||||||
c1_data += c1_linesize;
|
c1_data += c1_linesize;
|
||||||
@ -829,16 +829,16 @@ static void aflat(WaveformContext *s, AVFrame *in, AVFrame *out,
|
|||||||
target = d0_data - c0;
|
target = d0_data - c0;
|
||||||
update(target, max, intensity);
|
update(target, max, intensity);
|
||||||
target = d1_data - (c0 + c1);
|
target = d1_data - (c0 + c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
target = d2_data - (c0 + c2);
|
target = d2_data - (c0 + c2);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
} else {
|
} else {
|
||||||
target = d0_data + c0;
|
target = d0_data + c0;
|
||||||
update(target, max, intensity);
|
update(target, max, intensity);
|
||||||
target = d1_data + (c0 + c1);
|
target = d1_data + (c0 + c1);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
target = d2_data + (c0 + c2);
|
target = d2_data + (c0 + c2);
|
||||||
update(target, max, 1);
|
update(target, max, intensity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user