]> git.sesse.net Git - ffmpeg/commitdiff
vaapi_encode_mpeg2: Fix width/height columns/rows confusion
authorMark Thompson <sw@jkqxz.net>
Mon, 29 Oct 2018 19:41:24 +0000 (19:41 +0000)
committerMark Thompson <sw@jkqxz.net>
Mon, 29 Oct 2018 19:41:24 +0000 (19:41 +0000)
Fixes #7522.

libavcodec/vaapi_encode_mpeg2.c

index 99a8b43237555d0cb05bbb41a50a88c149ffcd9a..22d7e306bb4f3e2078b585e091010f5a374d527a 100644 (file)
@@ -545,8 +545,8 @@ static av_cold int vaapi_encode_mpeg2_configure(AVCodecContext *avctx)
         av_assert0(0 && "Invalid RC mode.");
     }
 
-    ctx->slice_block_rows = FFALIGN(avctx->width,  16) / 16;
-    ctx->slice_block_cols = FFALIGN(avctx->height, 16) / 16;
+    ctx->slice_block_rows = FFALIGN(avctx->height, 16) / 16;
+    ctx->slice_block_cols = FFALIGN(avctx->width,  16) / 16;
 
     ctx->nb_slices  = ctx->slice_block_rows;
     ctx->slice_size = 1;