]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_framepack.c
x86/swr: add missing alignment check to pack_6ch functions
[ffmpeg] / libavfilter / vf_framepack.c
index 8a7d4e8f32b8e22d78e5eee346c2ad0f95fd05ff..508767315e93e08e23ff71baa9772740e8eb5a08 100644 (file)
@@ -144,8 +144,8 @@ static void horizontal_frame_pack(FramepackContext *s,
         uint8_t *dstp         = dst->data[plane];
 
         if (plane == 1 || plane == 2) {
-            length = -(-(dst->width / 2) >> s->pix_desc->log2_chroma_w);
-            lines  = -(-(dst->height)    >> s->pix_desc->log2_chroma_h);
+            length = FF_CEIL_RSHIFT(dst->width / 2, s->pix_desc->log2_chroma_w);
+            lines  = FF_CEIL_RSHIFT(dst->height,    s->pix_desc->log2_chroma_h);
         }
 
         if (interleaved) {