Commit ac3a275d authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_nnedi: Simplify away some trivial mem*()

Reviewed-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8836b8c2
...@@ -362,7 +362,7 @@ static int32_t process_line0(const uint8_t *tempu, int width, uint8_t *dstp8, co ...@@ -362,7 +362,7 @@ static int32_t process_line0(const uint8_t *tempu, int width, uint8_t *dstp8, co
tmp /= 32; tmp /= 32;
dstp[x] = FFMAX(FFMIN(tmp, maximum), minimum); dstp[x] = FFMAX(FFMIN(tmp, maximum), minimum);
} else { } else {
memset(dstp + x, 255, sizeof(uint8_t)); dstp[x] = 255;
count++; count++;
} }
} }
...@@ -612,14 +612,9 @@ static void evalfunc_1(NNEDIContext *s, FrameData *frame_data) ...@@ -612,14 +612,9 @@ static void evalfunc_1(NNEDIContext *s, FrameData *frame_data)
for (y = ystart; y < ystop; y += 2) { for (y = ystart; y < ystop; y += 2) {
for (x = 32; x < width - 32; x++) { for (x = 32; x < width - 32; x++) {
uint32_t pixel = 0;
uint32_t all_ones = 0;
float mstd[4]; float mstd[4];
memcpy(&pixel, dstp + x, sizeof(uint8_t)); if (dstp[x] != 255)
memset(&all_ones, 255, sizeof(uint8_t));
if (pixel != all_ones)
continue; continue;
s->extract((const uint8_t *)(srcpp + x), src_stride, xdia, ydia, mstd, input); s->extract((const uint8_t *)(srcpp + x), src_stride, xdia, ydia, mstd, input);
......
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