This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 16efe6927d850d23766aee15820abedcb1219121
Author:     Ramiro Polla <[email protected]>
AuthorDate: Tue Oct 27 15:30:46 2026 +0100
Commit:     Ramiro Polla <[email protected]>
CommitDate: Wed Oct 28 13:05:17 2026 +0000

    swscale/vulkan/ops: factor plane count out of loop conditions
---
 libswscale/vulkan/ops.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libswscale/vulkan/ops.c b/libswscale/vulkan/ops.c
index c0dcd71b6c..915696a012 100644
--- a/libswscale/vulkan/ops.c
+++ b/libswscale/vulkan/ops.c
@@ -787,7 +787,8 @@ static int get_view_fmts(VkFormat 
view_fmts[AV_NUM_DATA_POINTERS],
     if (!vk_fmts)
         return AVERROR(ENOTSUP);
 
-    for (int i = 0; i < av_pix_fmt_count_planes(fmt); i++) {
+    const int nb_planes = av_pix_fmt_count_planes(fmt);
+    for (int i = 0; i < nb_planes; i++) {
         view_fmts[i] = word_fmt ? word_fmt : ff_vk_map_fmt_to_rep(vk_fmts[i], 
rep);
         if (view_fmts[i] == VK_FORMAT_UNDEFINED)
             return AVERROR(ENOTSUP);
@@ -800,8 +801,9 @@ static int get_view_fmts(VkFormat 
view_fmts[AV_NUM_DATA_POINTERS],
  * have to cover the highest plane referenced, not just the plane count. */
 static int rw_op_img_count(const SwsOp *op, const uint8_t *planes)
 {
+    const int nb_planes = ff_sws_rw_op_planes(op);
     int count = 0;
-    for (int i = 0; i < ff_sws_rw_op_planes(op); i++)
+    for (int i = 0; i < nb_planes; i++)
         count = FFMAX(count, planes[i] + 1);
     return count;
 }

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to