[FFmpeg-devel] [PATCH 4/4] avfilter/vf_transpose_vulkan: simplify config_props_output function
Lynne
dev at lynne.ee
Fri Dec 10 22:03:12 EET 2021
10 Dec 2021, 20:05 by jianhua.wu at intel.com:
> It's no need to assign outlink here, which has been done in
> ff_vk_filter_config_output already.
>
> Signed-off-by: Wu Jianhua <jianhua.wu at intel.com>
> ---
> libavfilter/vf_transpose_vulkan.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/libavfilter/vf_transpose_vulkan.c b/libavfilter/vf_transpose_vulkan.c
> index eceb9b9011..ce83cf0fd7 100644
> --- a/libavfilter/vf_transpose_vulkan.c
> +++ b/libavfilter/vf_transpose_vulkan.c
> @@ -262,7 +262,6 @@ static av_cold void transpose_vulkan_uninit(AVFilterContext *avctx)
>
> static int config_props_output(AVFilterLink *outlink)
> {
> - int err = 0;
> AVFilterContext *avctx = outlink->src;
> TransposeVulkanContext *s = avctx->priv;
> FFVulkanContext *vkctx = &s->vkctx;
> @@ -271,21 +270,13 @@ static int config_props_output(AVFilterLink *outlink)
> vkctx->output_width = inlink->h;
> vkctx->output_height = inlink->w;
>
> - RET(ff_vk_filter_config_output(outlink));
> -
> - outlink->w = inlink->h;
> - outlink->h = inlink->w;
> -
> if (inlink->sample_aspect_ratio.num)
> outlink->sample_aspect_ratio = av_div_q((AVRational) { 1, 1 },
> inlink->sample_aspect_ratio);
> else
> outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
>
> - err = 0;
> -
> -fail:
> - return err;
> + return ff_vk_filter_config_output(outlink);
> }
>
> #define OFFSET(x) offsetof(TransposeVulkanContext, x)
>
Tested, squashed the first 3 patches into one, and pushed this along with that one.
Thanks
More information about the ffmpeg-devel
mailing list