Use device memory for vulkan encode

This commit is contained in:
Patrick Nicolas
2024-11-10 16:46:28 +01:00
parent 4df0e391c6
commit 6943fa82d2
13 changed files with 181 additions and 45 deletions
+2 -2
View File
@@ -183,7 +183,7 @@ video_encoder_x264::video_encoder_x264(
}
}
bool video_encoder_x264::present_image(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_buf, uint8_t slot, uint64_t)
std::pair<bool, vk::Semaphore> video_encoder_x264::present_image(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_buf, uint8_t slot, uint64_t)
{
cmd_buf.copyImageToBuffer(
y_cbcr,
@@ -225,7 +225,7 @@ bool video_encoder_x264::present_image(vk::Image y_cbcr, vk::raii::CommandBuffer
.height = rect.extent.height / 2,
.depth = 1,
}});
return false;
return {false, nullptr};
}
std::optional<video_encoder::data> video_encoder_x264::encode(bool idr, std::chrono::steady_clock::time_point pts, uint8_t slot)