summaryrefslogtreecommitdiff
path: root/libavfilter/vulkan.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vulkan.c')
-rw-r--r--libavfilter/vulkan.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/libavfilter/vulkan.c b/libavfilter/vulkan.c
index ff76ab15e9..c103440529 100644
--- a/libavfilter/vulkan.c
+++ b/libavfilter/vulkan.c
@@ -390,32 +390,28 @@ int ff_vk_add_exec_dep(AVFilterContext *avctx, FFVkExecContext *e,
AVFrame *frame, VkPipelineStageFlagBits in_wait_dst_flag)
{
AVVkFrame *f = (AVVkFrame *)frame->data[0];
- AVHWFramesContext *fc = (AVHWFramesContext *)frame->hw_frames_ctx->data;
- int planes = av_pix_fmt_count_planes(fc->sw_format);
- for (int i = 0; i < planes; i++) {
- e->sem_wait = av_fast_realloc(e->sem_wait, &e->sem_wait_alloc,
- (e->sem_wait_cnt + 1)*sizeof(*e->sem_wait));
- if (!e->sem_wait)
- return AVERROR(ENOMEM);
+ e->sem_wait = av_fast_realloc(e->sem_wait, &e->sem_wait_alloc,
+ (e->sem_wait_cnt + 1)*sizeof(*e->sem_wait));
+ if (!e->sem_wait)
+ return AVERROR(ENOMEM);
- e->sem_wait_dst = av_fast_realloc(e->sem_wait_dst, &e->sem_wait_dst_alloc,
- (e->sem_wait_cnt + 1)*sizeof(*e->sem_wait_dst));
- if (!e->sem_wait_dst)
- return AVERROR(ENOMEM);
+ e->sem_wait_dst = av_fast_realloc(e->sem_wait_dst, &e->sem_wait_dst_alloc,
+ (e->sem_wait_cnt + 1)*sizeof(*e->sem_wait_dst));
+ if (!e->sem_wait_dst)
+ return AVERROR(ENOMEM);
- e->sem_sig = av_fast_realloc(e->sem_sig, &e->sem_sig_alloc,
- (e->sem_sig_cnt + 1)*sizeof(*e->sem_sig));
- if (!e->sem_sig)
- return AVERROR(ENOMEM);
+ e->sem_sig = av_fast_realloc(e->sem_sig, &e->sem_sig_alloc,
+ (e->sem_sig_cnt + 1)*sizeof(*e->sem_sig));
+ if (!e->sem_sig)
+ return AVERROR(ENOMEM);
- e->sem_wait[e->sem_wait_cnt] = f->sem[i];
- e->sem_wait_dst[e->sem_wait_cnt] = in_wait_dst_flag;
- e->sem_wait_cnt++;
+ e->sem_wait[e->sem_wait_cnt] = f->sem;
+ e->sem_wait_dst[e->sem_wait_cnt] = in_wait_dst_flag;
+ e->sem_wait_cnt++;
- e->sem_sig[e->sem_sig_cnt] = f->sem[i];
- e->sem_sig_cnt++;
- }
+ e->sem_sig[e->sem_sig_cnt] = f->sem;
+ e->sem_sig_cnt++;
return 0;
}