Commit d491d6a0 authored by Thomas Mundt's avatar Thomas Mundt Committed by Carl Eugen Hoyos

avfilter/interlace: rename two variables for consistency

Signed-off-by: 's avatarThomas Mundt <tmundt75@gmail.com>
parent 5d072755
......@@ -102,19 +102,19 @@ static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t linesize,
const uint8_t *srcp_below = srcp + pref;
const uint8_t *srcp_above2 = srcp + mref * 2;
const uint8_t *srcp_below2 = srcp + pref * 2;
int i, srcp_x, srcp_ab;
int i, src_x, src_ab;
for (i = 0; i < linesize; i++) {
// this calculation is an integer representation of
// '0.75 * current + 0.25 * above + 0.25 * below - 0.125 * above2 - 0.125 * below2'
// '4 +' is for rounding.
srcp_x = srcp[i] << 1;
srcp_ab = srcp_above[i] + srcp_below[i];
dstp[i] = av_clip_uint8((4 + ((srcp[i] + srcp_x + srcp_ab) << 1)
src_x = srcp[i] << 1;
src_ab = srcp_above[i] + srcp_below[i];
dstp[i] = av_clip_uint8((4 + ((srcp[i] + src_x + src_ab) << 1)
- srcp_above2[i] - srcp_below2[i]) >> 3);
// Prevent over-sharpening:
// dst must not exceed src when the average of above and below
// is less than src. And the other way around.
if (srcp_ab > srcp_x) {
if (src_ab > src_x) {
if (dstp[i] < srcp[i])
dstp[i] = srcp[i];
} else if (dstp[i] > srcp[i])
......
......@@ -133,19 +133,19 @@ static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t width, const uint8_t
const uint8_t *srcp_below = srcp + pref;
const uint8_t *srcp_above2 = srcp + mref * 2;
const uint8_t *srcp_below2 = srcp + pref * 2;
int i, srcp_x, srcp_ab;
int i, src_x, src_ab;
for (i = 0; i < width; i++) {
// this calculation is an integer representation of
// '0.75 * current + 0.25 * above + 0.25 * below - 0.125 * above2 - 0.125 * below2'
// '4 +' is for rounding.
srcp_x = srcp[i] << 1;
srcp_ab = srcp_above[i] + srcp_below[i];
dstp[i] = av_clip_uint8((4 + ((srcp[i] + srcp_x + srcp_ab) << 1)
src_x = srcp[i] << 1;
src_ab = srcp_above[i] + srcp_below[i];
dstp[i] = av_clip_uint8((4 + ((srcp[i] + src_x + src_ab) << 1)
- srcp_above2[i] - srcp_below2[i]) >> 3);
// Prevent over-sharpening:
// dst must not exceed src when the average of above and below
// is less than src. And the other way around.
if (srcp_ab > srcp_x) {
if (src_ab > src_x) {
if (dstp[i] < srcp[i])
dstp[i] = srcp[i];
} else if (dstp[i] > srcp[i])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment