Unified · Split
| @@ -212,6 +212,10 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *tmp_f · 211 unmodified lines | |||
| 212 | AVVkFrame *in = (AVVkFrame *)in_f->data[0]; | 212 | AVVkFrame *in = (AVVkFrame *)in_f->data[0]; |
| 213 | AVVkFrame *tmp = (AVVkFrame *)tmp_f->data[0]; | 213 | AVVkFrame *tmp = (AVVkFrame *)tmp_f->data[0]; |
| 214 | AVVkFrame *out = (AVVkFrame *)out_f->data[0]; | 214 | AVVkFrame *out = (AVVkFrame *)out_f->data[0]; |
| 215 | |||
| 216 | const VkFormat *input_formats = av_vkfmt_from_pixfmt(s->vkctx.input_format); | ||
| 217 | const VkFormat *output_formats = av_vkfmt_from_pixfmt(s->vkctx.output_format); | ||
| 218 | |||
| 215 | int planes = av_pix_fmt_count_planes(s->vkctx.output_format); | 219 | int planes = av_pix_fmt_count_planes(s->vkctx.output_format); |
| 216 | 220 | ||
| 217 | /* Update descriptors and init the exec context */ | 221 | /* Update descriptors and init the exec context */ |
| @@ -221,17 +225,17 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *tmp_f · 3 unmodified lines | |||
| 221 | for (int i = 0; i < planes; i++) { | 225 | for (int i = 0; i < planes; i++) { |
| 222 | RET(ff_vk_create_imageview(vkctx, s->exec, | 226 | RET(ff_vk_create_imageview(vkctx, s->exec, |
| 223 | &s->input_images[i].imageView, in->img[i], | 227 | &s->input_images[i].imageView, in->img[i], |
| 224 | av_vkfmt_from_pixfmt(s->vkctx.input_format)[i], | 228 | input_formats[i], |
| 225 | ff_comp_identity_map)); | 229 | ff_comp_identity_map)); |
| 226 | 230 | ||
| 227 | RET(ff_vk_create_imageview(vkctx, s->exec, | 231 | RET(ff_vk_create_imageview(vkctx, s->exec, |
| 228 | &s->tmp_images[i].imageView, tmp->img[i], | 232 | &s->tmp_images[i].imageView, tmp->img[i], |
| 229 | av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], | 233 | output_formats[i], |
| 230 | ff_comp_identity_map)); | 234 | ff_comp_identity_map)); |
| 231 | 235 | ||
| 232 | RET(ff_vk_create_imageview(vkctx, s->exec, | 236 | RET(ff_vk_create_imageview(vkctx, s->exec, |
| 233 | &s->output_images[i].imageView, out->img[i], | 237 | &s->output_images[i].imageView, out->img[i], |
| 234 | av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], | 238 | output_formats[i], |
| 235 | ff_comp_identity_map)); | 239 | ff_comp_identity_map)); |
| 236 | 240 | ||
| 237 | s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; | 241 | s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; |