]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_nnedi.c
avfilter/vf_waveform: add 12bit depth support
[ffmpeg] / libavfilter / vf_nnedi.c
index 9a98ec211ecb07cb1ae63ab7bb1a108f4b8887d3..330d3d65012eeb29ca274f2c1e65f37399f75ad9 100644 (file)
@@ -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);