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

Git pushed a commit to branch master
in repository ffmpeg.

commit 6c6a2764d95fe971a305958494ec1e6e8a5a9fcd
Author:     Rainbaby <[email protected]>
AuthorDate: Fri Aug 28 16:18:06 2026 +0900
Commit:     Peter Ross <[email protected]>
CommitDate: Mon Nov 2 22:18:06 2026 +0000

    avcodec/cavsdsp: widen the qpel interpolation intermediate
    
    The horizontal pass of the two dimensional quarter sample interpolation
    reaches (96 + 42) * 255 = 35190 in the ii and kk positions and overflows
    the int16_t intermediate. The other four positions use the half sample
    filter, stay within -510..2550 and keep int16_t. Only the C path is
    affected; the x86 SIMD covers just the one dimensional positions.
    
    Signed-off-by: Rainbaby <[email protected]>
---
 libavcodec/cavsdsp.c      |  32 ++++++++-------
 tests/ref/fate/cavs-bunny | 102 +++++++++++++++++++++++-----------------------
 2 files changed, 68 insertions(+), 66 deletions(-)

diff --git a/libavcodec/cavsdsp.c b/libavcodec/cavsdsp.c
index 7444f17bb5..f807ae201a 100644
--- a/libavcodec/cavsdsp.c
+++ b/libavcodec/cavsdsp.c
@@ -340,11 +340,11 @@ static void OPNAME ## cavs_filt16_h_ ## NAME(uint8_t 
*dst, const uint8_t *src, p
     OPNAME ## cavs_filt8_h_ ## NAME(dst+8, src+8, dstStride, srcStride);\
 }\
 
-#define CAVS_SUBPIX_HV(OPNAME, OP, NAME, AH, BH, CH, DH, EH, FH, AV, BV, CV, 
DV, EV, FV, FULL) \
+#define CAVS_SUBPIX_HV(OPNAME, OP, NAME, TYPE, AH, BH, CH, DH, EH, FH, AV, BV, 
CV, DV, EV, FV, FULL) \
 static void OPNAME ## cavs_filt8_hv_ ## NAME(uint8_t *dst, const uint8_t 
*src1, const uint8_t *src2, ptrdiff_t dstStride, ptrdiff_t srcStride)\
 {                                                                       \
-    int16_t temp[8*(8+5)];\
-    int16_t *tmp = temp;\
+    TYPE temp[8*(8+5)];\
+    TYPE *tmp = temp;\
     const int h=8;\
     const int w=8;\
     const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;\
@@ -522,21 +522,23 @@ static void OPNAME ## cavs_qpel ## SIZE ## 
_mc23_c(uint8_t *dst, const uint8_t *
 CAVS_SUBPIX(put_   , op_put1, hpel,    0, -1,  5,  5, -1,  0)
 CAVS_SUBPIX(put_   , op_put2, qpel_l, -1, -2, 96, 42, -7,  0)
 CAVS_SUBPIX(put_   , op_put2, qpel_r,  0, -7, 42, 96, -2, -1)
-CAVS_SUBPIX_HV(put_, op_put3, jj,      0, -1,  5,  5, -1,  0,  0, -1,  5,  5, 
-1, 0, 0)
-CAVS_SUBPIX_HV(put_, op_put4, ff,      0, -1,  5,  5, -1,  0, -1, -2, 96, 42, 
-7, 0, 0)
-CAVS_SUBPIX_HV(put_, op_put4, ii,     -1, -2, 96, 42, -7,  0,  0, -1,  5,  5, 
-1, 0, 0)
-CAVS_SUBPIX_HV(put_, op_put4, kk,      0, -7, 42, 96, -2, -1,  0, -1,  5,  5, 
-1, 0, 0)
-CAVS_SUBPIX_HV(put_, op_put4, qq,      0, -1,  5,  5, -1,  0,  0, -7, 42, 96, 
-2,-1, 0)
-CAVS_SUBPIX_HV(put_, op_put2, egpr,    0, -1,  5,  5, -1,  0,  0, -1,  5,  5, 
-1, 0, 1)
+/* Only ii and kk need a wide horizontal intermediate (-2550..35190);
+ * the other families use the half-sample filter (-510..2550). */
+CAVS_SUBPIX_HV(put_, op_put3, jj,    int16_t,  0, -1,  5,  5, -1,  0,  0, -1,  
5,  5, -1, 0, 0)
+CAVS_SUBPIX_HV(put_, op_put4, ff,    int16_t,  0, -1,  5,  5, -1,  0, -1, -2, 
96, 42, -7, 0, 0)
+CAVS_SUBPIX_HV(put_, op_put4, ii,    int,     -1, -2, 96, 42, -7,  0,  0, -1,  
5,  5, -1, 0, 0)
+CAVS_SUBPIX_HV(put_, op_put4, kk,    int,      0, -7, 42, 96, -2, -1,  0, -1,  
5,  5, -1, 0, 0)
+CAVS_SUBPIX_HV(put_, op_put4, qq,    int16_t,  0, -1,  5,  5, -1,  0,  0, -7, 
42, 96, -2,-1, 0)
+CAVS_SUBPIX_HV(put_, op_put2, egpr,  int16_t,  0, -1,  5,  5, -1,  0,  0, -1,  
5,  5, -1, 0, 1)
 CAVS_SUBPIX(avg_   , op_avg1, hpel,    0, -1,  5,  5, -1,  0)
 CAVS_SUBPIX(avg_   , op_avg2, qpel_l, -1, -2, 96, 42, -7,  0)
 CAVS_SUBPIX(avg_   , op_avg2, qpel_r,  0, -7, 42, 96, -2, -1)
-CAVS_SUBPIX_HV(avg_, op_avg3, jj,      0, -1,  5,  5, -1,  0,  0, -1,  5,  5, 
-1, 0, 0)
-CAVS_SUBPIX_HV(avg_, op_avg4, ff,      0, -1,  5,  5, -1,  0, -1, -2, 96, 42, 
-7, 0, 0)
-CAVS_SUBPIX_HV(avg_, op_avg4, ii,     -1, -2, 96, 42, -7,  0,  0, -1,  5,  5, 
-1, 0, 0)
-CAVS_SUBPIX_HV(avg_, op_avg4, kk,      0, -7, 42, 96, -2, -1,  0, -1,  5,  5, 
-1, 0, 0)
-CAVS_SUBPIX_HV(avg_, op_avg4, qq,      0, -1,  5,  5, -1,  0,  0, -7, 42, 96, 
-2,-1, 0)
-CAVS_SUBPIX_HV(avg_, op_avg2, egpr,    0, -1,  5,  5, -1,  0,  0, -1,  5,  5, 
-1, 0, 1)
+CAVS_SUBPIX_HV(avg_, op_avg3, jj,    int16_t,  0, -1,  5,  5, -1,  0,  0, -1,  
5,  5, -1, 0, 0)
+CAVS_SUBPIX_HV(avg_, op_avg4, ff,    int16_t,  0, -1,  5,  5, -1,  0, -1, -2, 
96, 42, -7, 0, 0)
+CAVS_SUBPIX_HV(avg_, op_avg4, ii,    int,     -1, -2, 96, 42, -7,  0,  0, -1,  
5,  5, -1, 0, 0)
+CAVS_SUBPIX_HV(avg_, op_avg4, kk,    int,      0, -7, 42, 96, -2, -1,  0, -1,  
5,  5, -1, 0, 0)
+CAVS_SUBPIX_HV(avg_, op_avg4, qq,    int16_t,  0, -1,  5,  5, -1,  0,  0, -7, 
42, 96, -2,-1, 0)
+CAVS_SUBPIX_HV(avg_, op_avg2, egpr,  int16_t,  0, -1,  5,  5, -1,  0,  0, -1,  
5,  5, -1, 0, 1)
 CAVS_MC(put_, 8)
 CAVS_MC(put_, 16)
 CAVS_MC(avg_, 8)
diff --git a/tests/ref/fate/cavs-bunny b/tests/ref/fate/cavs-bunny
index 9612d4c53d..105bfd06e2 100644
--- a/tests/ref/fate/cavs-bunny
+++ b/tests/ref/fate/cavs-bunny
@@ -5,61 +5,61 @@
 #sar 0: 0/1
 0,          0,          0,        1,  1382400, 0xe9f1474e
 0,          1,          1,        1,  1382400, 0x4d17cb21
-0,          2,          2,        1,  1382400, 0x695ebe1a
+0,          2,          2,        1,  1382400, 0x74c8c1d0
 0,          3,          3,        1,  1382400, 0x1180db73
 0,          4,          4,        1,  1382400, 0xe03aefff
-0,          5,          5,        1,  1382400, 0x952185a6
-0,          6,          6,        1,  1382400, 0x631fbb7a
-0,          7,          7,        1,  1382400, 0x34a1c689
-0,          8,          8,        1,  1382400, 0x67647ac0
-0,          9,          9,        1,  1382400, 0xe0e15248
-0,         10,         10,        1,  1382400, 0x7a8e3a2d
-0,         11,         11,        1,  1382400, 0x61f70ac2
-0,         12,         12,        1,  1382400, 0x473a9789
-0,         13,         13,        1,  1382400, 0x2e054d1e
-0,         14,         14,        1,  1382400, 0x2c206001
-0,         15,         15,        1,  1382400, 0x445c7cf8
-0,         16,         16,        1,  1382400, 0x4abc4a39
-0,         17,         17,        1,  1382400, 0x435c27f9
-0,         18,         18,        1,  1382400, 0x0e8665b6
-0,         19,         19,        1,  1382400, 0x854761c5
-0,         20,         20,        1,  1382400, 0x75f3ec2d
-0,         21,         21,        1,  1382400, 0x1fc8d679
-0,         22,         22,        1,  1382400, 0xff27f7ad
-0,         23,         23,        1,  1382400, 0x469602a4
-0,         24,         24,        1,  1382400, 0xa7646e15
-0,         25,         25,        1,  1382400, 0x3dee7bfc
-0,         26,         26,        1,  1382400, 0xaa39a8c3
-0,         27,         27,        1,  1382400, 0xa585b72a
-0,         28,         28,        1,  1382400, 0x768221d0
-0,         29,         29,        1,  1382400, 0xf7bae782
+0,          5,          5,        1,  1382400, 0x50718659
+0,          6,          6,        1,  1382400, 0xd268bb69
+0,          7,          7,        1,  1382400, 0xb53dc738
+0,          8,          8,        1,  1382400, 0xfd237a9d
+0,          9,          9,        1,  1382400, 0x9a2a5229
+0,         10,         10,        1,  1382400, 0xeaf53a0d
+0,         11,         11,        1,  1382400, 0xf3410aa3
+0,         12,         12,        1,  1382400, 0xa6b99770
+0,         13,         13,        1,  1382400, 0x9e024de1
+0,         14,         14,        1,  1382400, 0xa80e60b9
+0,         15,         15,        1,  1382400, 0x9ae37dac
+0,         16,         16,        1,  1382400, 0x89b64bbc
+0,         17,         17,        1,  1382400, 0x415f2995
+0,         18,         18,        1,  1382400, 0x1f7a6757
+0,         19,         19,        1,  1382400, 0xbc78635d
+0,         20,         20,        1,  1382400, 0x283aedd7
+0,         21,         21,        1,  1382400, 0x2e0ddb68
+0,         22,         22,        1,  1382400, 0x5273faf3
+0,         23,         23,        1,  1382400, 0x15a5072c
+0,         24,         24,        1,  1382400, 0x283872e5
+0,         25,         25,        1,  1382400, 0x7d2e81a9
+0,         26,         26,        1,  1382400, 0xf62dae86
+0,         27,         27,        1,  1382400, 0x3876bcdf
+0,         28,         28,        1,  1382400, 0x7ad22842
+0,         29,         29,        1,  1382400, 0x6ca2ee14
 0,         30,         30,        1,  1382400, 0x3c8e4cc2
 0,         31,         31,        1,  1382400, 0xeaa6696a
 0,         32,         32,        1,  1382400, 0xda496f5b
 0,         33,         33,        1,  1382400, 0x91a08b06
 0,         34,         34,        1,  1382400, 0xc15e21b6
-0,         35,         35,        1,  1382400, 0x34150c81
-0,         36,         36,        1,  1382400, 0xaeed255e
-0,         37,         37,        1,  1382400, 0x89d3f712
-0,         38,         38,        1,  1382400, 0xd4ed6c9f
-0,         39,         39,        1,  1382400, 0xad0d4b00
-0,         40,         40,        1,  1382400, 0xff6b61a1
-0,         41,         41,        1,  1382400, 0x978e5a2e
-0,         42,         42,        1,  1382400, 0x9e79d072
-0,         43,         43,        1,  1382400, 0x8bb8edbc
-0,         44,         44,        1,  1382400, 0xf6450cf4
-0,         45,         45,        1,  1382400, 0x78cd0feb
-0,         46,         46,        1,  1382400, 0x7e037f98
-0,         47,         47,        1,  1382400, 0x5cba2d2f
-0,         48,         48,        1,  1382400, 0x146c6461
-0,         49,         49,        1,  1382400, 0xa8766a4f
-0,         50,         50,        1,  1382400, 0x4b248b6c
-0,         51,         51,        1,  1382400, 0xa2c68515
-0,         52,         52,        1,  1382400, 0x8e4ab5ac
-0,         53,         53,        1,  1382400, 0x98f2b920
-0,         54,         54,        1,  1382400, 0xde230210
-0,         55,         55,        1,  1382400, 0xc048ecb6
-0,         56,         56,        1,  1382400, 0x99651457
-0,         57,         57,        1,  1382400, 0x03081884
-0,         58,         58,        1,  1382400, 0x091a6b05
-0,         59,         59,        1,  1382400, 0x5e6a333e
+0,         35,         35,        1,  1382400, 0x15960e2c
+0,         36,         36,        1,  1382400, 0xabfa2632
+0,         37,         37,        1,  1382400, 0x690af8af
+0,         38,         38,        1,  1382400, 0x078c6e22
+0,         39,         39,        1,  1382400, 0x20c94d69
+0,         40,         40,        1,  1382400, 0x8f5c6340
+0,         41,         41,        1,  1382400, 0x110b5bb6
+0,         42,         42,        1,  1382400, 0x1e16d207
+0,         43,         43,        1,  1382400, 0x231fef4b
+0,         44,         44,        1,  1382400, 0xda720e9e
+0,         45,         45,        1,  1382400, 0xadfb1277
+0,         46,         46,        1,  1382400, 0x5f15812e
+0,         47,         47,        1,  1382400, 0x85382ec0
+0,         48,         48,        1,  1382400, 0x82b4660c
+0,         49,         49,        1,  1382400, 0x077f6be4
+0,         50,         50,        1,  1382400, 0x05538d08
+0,         51,         51,        1,  1382400, 0xb0d186af
+0,         52,         52,        1,  1382400, 0x0267b759
+0,         53,         53,        1,  1382400, 0xef03babb
+0,         54,         54,        1,  1382400, 0x855a03b2
+0,         55,         55,        1,  1382400, 0x933ceece
+0,         56,         56,        1,  1382400, 0x13cc164e
+0,         57,         57,        1,  1382400, 0xaa661a89
+0,         58,         58,        1,  1382400, 0xbd3d6d5b
+0,         59,         59,        1,  1382400, 0xdd1234cd

-- 
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