Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -304,6 +304,8 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) · 303 unmodified lines | |||
| 304 | VkImageMemoryBarrier barriers[AV_NUM_DATA_POINTERS*2]; | 304 | VkImageMemoryBarrier barriers[AV_NUM_DATA_POINTERS*2]; |
| 305 | int barrier_count = 0; | 305 | int barrier_count = 0; |
| 306 | const int planes = av_pix_fmt_count_planes(s->vkctx.input_format); | 306 | const int planes = av_pix_fmt_count_planes(s->vkctx.input_format); |
| 307 | const VkFormat *input_formats = av_vkfmt_from_pixfmt(s->vkctx.input_format); | ||
| 308 | const VkFormat *output_formats = av_vkfmt_from_pixfmt(s->vkctx.output_format); | ||
| 307 | 309 | ||
| 308 | /* Update descriptors and init the exec context */ | 310 | /* Update descriptors and init the exec context */ |
| 309 | ff_vk_start_exec_recording(vkctx, s->exec); | 311 | ff_vk_start_exec_recording(vkctx, s->exec); |
| @@ -312,12 +314,12 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out_f, AVFrame *in_f) · 2 unmodified lines | |||
| 312 | for (int i = 0; i < planes; i++) { | 314 | for (int i = 0; i < planes; i++) { |
| 313 | RET(ff_vk_create_imageview(vkctx, s->exec, | 315 | RET(ff_vk_create_imageview(vkctx, s->exec, |
| 314 | &s->input_images[i].imageView, in->img[i], | 316 | &s->input_images[i].imageView, in->img[i], |
| 315 | av_vkfmt_from_pixfmt(s->vkctx.input_format)[i], | 317 | input_formats[i], |
| 316 | ff_comp_identity_map)); | 318 | ff_comp_identity_map)); |
| 317 | 319 | ||
| 318 | RET(ff_vk_create_imageview(vkctx, s->exec, | 320 | RET(ff_vk_create_imageview(vkctx, s->exec, |
| 319 | &s->output_images[i].imageView, out->img[i], | 321 | &s->output_images[i].imageView, out->img[i], |
| 320 | av_vkfmt_from_pixfmt(s->vkctx.output_format)[i], | 322 | output_formats[i], |
| 321 | ff_comp_identity_map)); | 323 | ff_comp_identity_map)); |
| 322 | 324 | ||
| 323 | s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; | 325 | s->input_images[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; |