aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_nnedi.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-11 01:16:52 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-11 02:20:29 +0100
commitac3a275d1e0da79b1dd8c5d2bb98e4b9456615e0 (patch)
treecb2ae6171ac4927fced57576179dca5ecbfc734e /libavfilter/vf_nnedi.c
parent8836b8c2a430543b76198f27c952e9dc65ba1aeb (diff)
downloadffmpeg-ac3a275d1e0da79b1dd8c5d2bb98e4b9456615e0.tar.gz
avfilter/vf_nnedi: Simplify away some trivial mem*()
Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_nnedi.c')
-rw-r--r--libavfilter/vf_nnedi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c
index 9a98ec211e..330d3d6501 100644
--- a/libavfilter/vf_nnedi.c
+++ b/libavfilter/vf_nnedi.c
@@ -362,7 +362,7 @@ static int32_t process_line0(const uint8_t *tempu, int width, uint8_t *dstp8, co
tmp /= 32;
dstp[x] = FFMAX(FFMIN(tmp, maximum), minimum);
} else {
- memset(dstp + x, 255, sizeof(uint8_t));
+ dstp[x] = 255;
count++;
}
}
@@ -612,14 +612,9 @@ static void evalfunc_1(NNEDIContext *s, FrameData *frame_data)
for (y = ystart; y < ystop; y += 2) {
for (x = 32; x < width - 32; x++) {
- uint32_t pixel = 0;
- uint32_t all_ones = 0;
float mstd[4];
- memcpy(&pixel, dstp + x, sizeof(uint8_t));
- memset(&all_ones, 255, sizeof(uint8_t));
-
- if (pixel != all_ones)
+ if (dstp[x] != 255)
continue;
s->extract((const uint8_t *)(srcpp + x), src_stride, xdia, ydia, mstd, input);