diff mbox series

[FFmpeg-devel,02/10] avfilter/avgblur_vulkan: use FF_ARRAY_ELEMS instead of magic number

Message ID 20211118042449.8038-2-jianhua.wu@intel.com
State New
Headers show
Series [FFmpeg-devel,01/10] avfilter/avgblur_vulkan: check if shader is created with success | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Wu Jianhua Nov. 18, 2021, 4:24 a.m. UTC
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
---
 libavfilter/vf_avgblur_vulkan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c
index 253290663b..243e932f35 100644
--- a/libavfilter/vf_avgblur_vulkan.c
+++ b/libavfilter/vf_avgblur_vulkan.c
@@ -115,7 +115,7 @@  static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
 
         ff_vk_set_compute_shader_sizes(ctx, shd, (int [3]){ CGS, 1, 1 });
 
-        RET(ff_vk_add_descriptor_set(ctx, s->pl_hor, shd, desc_i, 2, 0));
+        RET(ff_vk_add_descriptor_set(ctx, s->pl_hor, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0));
 
         GLSLF(0, #define FILTER_RADIUS (%i)                     ,s->size_x - 1);
         GLSLC(0, #define INC(x) (ivec2(x, 0))                                 );
@@ -160,7 +160,7 @@  static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
 
         ff_vk_set_compute_shader_sizes(ctx, shd, (int [3]){ 1, CGS, 1 });
 
-        RET(ff_vk_add_descriptor_set(ctx, s->pl_ver, shd, desc_i, 2, 0));
+        RET(ff_vk_add_descriptor_set(ctx, s->pl_ver, shd, desc_i, FF_ARRAY_ELEMS(desc_i), 0));
 
         GLSLF(0, #define FILTER_RADIUS (%i)                     ,s->size_y - 1);
         GLSLC(0, #define INC(x) (ivec2(0, x))                                 );