]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_interlace.c
avcodec: libdav1d AV1 decoder wrapper.
[ffmpeg] / libavfilter / vf_interlace.c
index 939fabc8435cd96420dedfa8af3dbabcafddd0b1..ac435d768a5c38dcc7be387a82a107b5bb3bd85d 100644 (file)
@@ -138,8 +138,10 @@ static void copy_picture_field(InterlaceContext *s,
     int plane, j;
 
     for (plane = 0; plane < desc->nb_components; plane++) {
-        int cols  = (plane == 1 || plane == 2) ? -(-inlink->w) >> hsub : inlink->w;
-        int lines = (plane == 1 || plane == 2) ? -(-inlink->h) >> vsub : inlink->h;
+        int cols  = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->w, hsub)
+                                               : inlink->w;
+        int lines = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->h, vsub)
+                                               : inlink->h;
         uint8_t *dstp = dst_frame->data[plane];
         const uint8_t *srcp = src_frame->data[plane];