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