Commit f0d0993f64 for ffmpeg

commit f0d0993f64ba9ca50ee9260e2a31c3271c58aaed
Author: Wu Jianhua <toqsxw@outlook.com>
Date:   Tue Apr 15 04:47:28 2025 +0800

    avcodec/vvc/inter_template: fix apply_prof function for high bitdepth

    This commit fixed the prediction refinement with optical flow process

    Signed-off-by: Wu Jianhua <toqsxw@outlook.com>

diff --git a/libavcodec/vvc/inter_template.c b/libavcodec/vvc/inter_template.c
index 961502f7ec..3809cfae12 100644
--- a/libavcodec/vvc/inter_template.c
+++ b/libavcodec/vvc/inter_template.c
@@ -320,12 +320,15 @@ static void FUNC(prof_grad_filter)(tpixel *gradient_h, tpixel *gradient_v, const
     }
 }

-static void FUNC(apply_prof)(int16_t *dst, const int16_t *src, const int16_t *diff_mv_x, const int16_t *diff_mv_y)
+static void FUNC(apply_prof)(int16_t *_dst, const int16_t *_src, const int16_t *diff_mv_x, const int16_t *diff_mv_y)
 {
-    const int limit     = (1 << FFMAX(13, BIT_DEPTH + 1));          ///< dILimit
+    const tpixel *src  = (const tpixel *)_src;
+    tpixel *dst        = (tpixel *)_dst;
+    const int limit    = (1 << FFMAX(13, BIT_DEPTH + 1));          ///< dILimit
+
+    tpixel gradient_h[AFFINE_MIN_BLOCK_SIZE * AFFINE_MIN_BLOCK_SIZE];
+    tpixel gradient_v[AFFINE_MIN_BLOCK_SIZE * AFFINE_MIN_BLOCK_SIZE];

-    int16_t gradient_h[AFFINE_MIN_BLOCK_SIZE * AFFINE_MIN_BLOCK_SIZE];
-    int16_t gradient_v[AFFINE_MIN_BLOCK_SIZE * AFFINE_MIN_BLOCK_SIZE];
     FUNC(prof_grad_filter)(gradient_h, gradient_v, AFFINE_MIN_BLOCK_SIZE, src, MAX_PB_SIZE, AFFINE_MIN_BLOCK_SIZE, AFFINE_MIN_BLOCK_SIZE);

     for (int y = 0; y < AFFINE_MIN_BLOCK_SIZE; y++) {