[vlc-commits] directx_va: use vlc_align helper

Marvin Scholz git at videolan.org
Tue Mar 24 19:20:40 CET 2020


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Mar 24 13:36:47 2020 +0100| [4b93d9eaf012fe0b0f2d7c7ed430c4b078ca52be] | committer: Marvin Scholz

directx_va: use vlc_align helper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b93d9eaf012fe0b0f2d7c7ed430c4b078ca52be
---

 modules/codec/avcodec/directx_va.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 5f5da23b7f..0b5ff68a04 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -348,9 +348,9 @@ const directx_va_mode_t *directx_va_Setup(vlc_va_t *va, const directx_sys_t *dx_
         return NULL;
 
     assert((surface_alignment & (surface_alignment - 1)) == 0); /* power of 2 */
-#define ALIGN(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
-    int surface_width  = ALIGN(avctx->coded_width,  surface_alignment);
-    int surface_height = ALIGN(avctx->coded_height, surface_alignment);
+
+    int surface_width  = vlc_align(avctx->coded_width,  surface_alignment);
+    int surface_height = vlc_align(avctx->coded_height, surface_alignment);
 
     if (avctx->coded_width != surface_width || avctx->coded_height != surface_height)
         msg_Warn( va, "surface dimensions (%dx%d) differ from avcodec dimensions (%dx%d)",



More information about the vlc-commits mailing list