diff mbox series

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

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

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_overlay_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lynne Nov. 18, 2021, 5:48 a.m. UTC | #1
Nov 18, 2021, 05:24 by jianhua.wu@intel.com:

> Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
> ---
>  libavfilter/vf_overlay_vulkan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c
> index b902ad83f5..29eb11c89d 100644
> --- a/libavfilter/vf_overlay_vulkan.c
> +++ b/libavfilter/vf_overlay_vulkan.c
> @@ -145,7 +145,7 @@ static av_cold int init_filter(AVFilterContext *ctx)
>  
>  ff_vk_set_compute_shader_sizes(ctx, shd, CGROUPS);
>  
> -        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, 3, 0)); /* set 0 */
> +        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */
>  RET(ff_vk_add_descriptor_set(ctx, s->pl, shd, &desc_b, 1, 0)); /* set 1 */
>  
>  GLSLD(   overlay_noalpha                                              );
>

Thanks for all the patches, but it's getting difficult for me to maintain
my Vulkan hwaccel branch with all changes. Would you mind waiting
a bit for me to push the patch I just submitted and then rebasing all the
patches you submitted?
Wu Jianhua Nov. 18, 2021, 5:52 a.m. UTC | #2
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Lynne
> Sent: Thursday, November 18, 2021 1:48 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 05/10] avfilter/overlay_vulkan: use
> FF_ARRAY_ELEMS instead of magic number
> 
> Nov 18, 2021, 05:24 by jianhua.wu@intel.com:
> 
> > Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
> > ---
> >  libavfilter/vf_overlay_vulkan.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavfilter/vf_overlay_vulkan.c
> > b/libavfilter/vf_overlay_vulkan.c index b902ad83f5..29eb11c89d 100644
> > --- a/libavfilter/vf_overlay_vulkan.c
> > +++ b/libavfilter/vf_overlay_vulkan.c
> > @@ -145,7 +145,7 @@ static av_cold int init_filter(AVFilterContext
> > *ctx)
> >
> >  ff_vk_set_compute_shader_sizes(ctx, shd, CGROUPS);
> >
> > -        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, 3, 0)); /* set 0
> */
> > +        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i,
> > + FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */
> >  RET(ff_vk_add_descriptor_set(ctx, s->pl, shd, &desc_b, 1, 0)); /* set
> > 1 */
> >
> >  GLSLD(   overlay_noalpha                                              );
> >
> 
> Thanks for all the patches, but it's getting difficult for me to maintain my
> Vulkan hwaccel branch with all changes. Would you mind waiting a bit for me
> to push the patch I just submitted and then rebasing all the patches you
> submitted?
> 
> 

It's okay. Take your time.
Lynne Nov. 19, 2021, 12:55 p.m. UTC | #3
18 Nov 2021, 06:48 by dev@lynne.ee:

> Nov 18, 2021, 05:24 by jianhua.wu@intel.com:
>
>> Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
>> ---
>>  libavfilter/vf_overlay_vulkan.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c
>> index b902ad83f5..29eb11c89d 100644
>> --- a/libavfilter/vf_overlay_vulkan.c
>> +++ b/libavfilter/vf_overlay_vulkan.c
>> @@ -145,7 +145,7 @@ static av_cold int init_filter(AVFilterContext *ctx)
>>  
>>  ff_vk_set_compute_shader_sizes(ctx, shd, CGROUPS);
>>  
>> -        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, 3, 0)); /* set 0 */
>> +        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */
>>  RET(ff_vk_add_descriptor_set(ctx, s->pl, shd, &desc_b, 1, 0)); /* set 1 */
>>  
>>  GLSLD(   overlay_noalpha                                              );
>>
>
> Thanks for all the patches, but it's getting difficult for me to maintain
> my Vulkan hwaccel branch with all changes. Would you mind waiting
> a bit for me to push the patch I just submitted and then rebasing all the
> patches you submitted?
>

I pushed my patches, could you rebase all of your patches and fixes and resend them?
Wu Jianhua Nov. 19, 2021, 1:51 p.m. UTC | #4
Lynne:
> Sent: Friday, November 19, 2021 8:55 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 05/10] avfilter/overlay_vulkan: use
> FF_ARRAY_ELEMS instead of magic number
> 
> 18 Nov 2021, 06:48 by dev@lynne.ee:
> 
> > Nov 18, 2021, 05:24 by jianhua.wu@intel.com:
> >
> >> Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
> >> ---
> >>  libavfilter/vf_overlay_vulkan.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavfilter/vf_overlay_vulkan.c
> >> b/libavfilter/vf_overlay_vulkan.c index b902ad83f5..29eb11c89d 100644
> >> --- a/libavfilter/vf_overlay_vulkan.c
> >> +++ b/libavfilter/vf_overlay_vulkan.c
> >> @@ -145,7 +145,7 @@ static av_cold int init_filter(AVFilterContext
> >> *ctx)
> >>
> >>  ff_vk_set_compute_shader_sizes(ctx, shd, CGROUPS);
> >>
> >> -        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, 3, 0)); /* set 0
> */
> >> +        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i,
> >> + FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */
> >>  RET(ff_vk_add_descriptor_set(ctx, s->pl, shd, &desc_b, 1, 0)); /*
> >> set 1 */
> >>
> >>  GLSLD(   overlay_noalpha                                              );
> >>
> >
> > Thanks for all the patches, but it's getting difficult for me to
> > maintain my Vulkan hwaccel branch with all changes. Would you mind
> > waiting a bit for me to push the patch I just submitted and then
> > rebasing all the patches you submitted?
> >
> 
> I pushed my patches, could you rebase all of your patches and fixes and
> resend them?
>
Sure thing. I'll update later.
diff mbox series

Patch

diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c
index b902ad83f5..29eb11c89d 100644
--- a/libavfilter/vf_overlay_vulkan.c
+++ b/libavfilter/vf_overlay_vulkan.c
@@ -145,7 +145,7 @@  static av_cold int init_filter(AVFilterContext *ctx)
 
         ff_vk_set_compute_shader_sizes(ctx, shd, CGROUPS);
 
-        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, 3, 0)); /* set 0 */
+        RET(ff_vk_add_descriptor_set(ctx, s->pl, shd,  desc_i, FF_ARRAY_ELEMS(desc_i), 0)); /* set 0 */
         RET(ff_vk_add_descriptor_set(ctx, s->pl, shd, &desc_b, 1, 0)); /* set 1 */
 
         GLSLD(   overlay_noalpha                                              );