[FFmpeg-cvslog] tests/checkasm/hevc_*: Fix funtion pointer types
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 01:22:25 2024 +0200| [895dd370a2625692ff4e9117382a53d80514ecee] | committer: Andreas Rheinhardt tests/checkasm/hevc_*: Fix funtion pointer types Forgotten in b314d0685c8c1fbcf8455e59c7f444290c7c. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=895dd370a2625692ff4e9117382a53d80514ecee --- tests/checkasm/hevc_add_res.c | 2 +- tests/checkasm/hevc_deblock.c | 6 -- tests/checkasm/hevc_pel.c | 28 ++-- tests/checkasm/hevc_sao.c | 8 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/tests/checkasm/hevc_add_res.c b/tests/checkasm/hevc_add_res.c index f35e9fccd9..9dec3705c1 100644 --- a/tests/checkasm/hevc_add_res.c +++ b/tests/checkasm/hevc_add_res.c @@ -50,7 +50,7 @@ static void compare_add_res(int size, ptrdiff_t stride, int overflow_test, int m LOCAL_ALIGNED_32(uint8_t, dst0, [32 * 32 * 2]); LOCAL_ALIGNED_32(uint8_t, dst1, [32 * 32 * 2]); -declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, int16_t *res, ptrdiff_t stride); +declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, const int16_t *res, ptrdiff_t stride); randomize_buffers(res0, size); randomize_buffers2(dst0, size, mask); diff --git a/tests/checkasm/hevc_deblock.c b/tests/checkasm/hevc_deblock.c index 04cf9d87ac..c7f4f7e9ab 100644 --- a/tests/checkasm/hevc_deblock.c +++ b/tests/checkasm/hevc_deblock.c @@ -57,7 +57,8 @@ static void check_deblock_chroma(HEVCDSPContext *h, int bit_depth, int c) LOCAL_ALIGNED_32(uint8_t, buf0, [BUF_SIZE]); LOCAL_ALIGNED_32(uint8_t, buf1, [BUF_SIZE]); -declare_func(void, uint8_t *pix, ptrdiff_t stride, int32_t *tc, uint8_t *no_p, uint8_t *no_q); +declare_func(void, uint8_t *pix, ptrdiff_t stride, + const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q); if (check_func(c ? h->hevc_h_loop_filter_chroma_c : h->hevc_h_loop_filter_chroma, "hevc_h_loop_filter_chroma%d%s", bit_depth, c ? "_full" : "")) @@ -226,7 +227,8 @@ static void check_deblock_luma(HEVCDSPContext *h, int bit_depth, int c) uint8_t *ptr0 = buf0 + BUF_OFFSET, *ptr1 = buf1 + BUF_OFFSET; -declare_func(void, uint8_t *pix, ptrdiff_t stride, int beta, int32_t *tc, uint8_t *no_p, uint8_t *no_q); +declare_func(void, uint8_t *pix, ptrdiff_t stride, int beta, + const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q); memset(buf0, 0, BUF_SIZE); for (int j = 0; j < 3; j++) { diff --git a/tests/checkasm/hevc_pel.c b/tests/checkasm/hevc_pel.c index ed22ec4f9d..aebdf104e6 100644 --- a/tests/checkasm/hevc_pel.c +++ b/tests/checkasm/hevc_pel.c @@ -88,7 +88,7 @@ static void checkasm_check_hevc_qpel(void) HEVCDSPContext h; int size, bit_depth, i, j; -declare_func(void, int16_t *dst, uint8_t *src, ptrdiff_t srcstride, +declare_func(void, int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, int height, intptr_t mx, intptr_t my, int width); for (bit_depth = 8; bit_depth <= 12; bit_depth++) { @@ -132,7 +132,7 @@ static void checkasm_check_hevc_qpel_uni(void) HEVCDSPContext h; int size, bit_depth, i, j; -declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride, +declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int height, intptr_t mx, intptr_t my, int width); for (bit_depth = 8; bit_depth <= 12; bit_depth++) { @@ -182,7 +182,7 @@ static void checkasm_check_hevc_qpel_uni_w(void) HEVCDSPContext h; int size, bit_depth, i, j; const int *denom, *wx, *ox; -declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride, +declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width); for (bit_depth = 8; bit_depth <= 12; bit_depth++) { @@ -239,8 +239,8 @@ static void checkasm_check_hevc_qpel_bi(void) HEVCDSPContext h; int size, bit_depth, i, j; -declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride, - int16_t *src2, +declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, + const int16_t *src2, int height, intptr_t mx, intptr_t my, int width); for (bit_depth = 8; bit_depth <= 12; bit_depth++) { @@ -292,8 +292,8 @@ static void checkasm_check_hevc_qpel_bi_w(void) HEVCDSPContext h; int size, bit_depth, i, j; const int *denom, *wx, *ox; -declare_func(void, uint8_t *dst, ptrdiff_t dststride, uint8_t *src, ptrdiff_t srcstride, - int16_t *src2, +declare_func(void, uint8_t *dst, ptrdiff_t dststride, const
[FFmpeg-cvslog] tests/checkasm/llauddsp: Avoid UB integer overflow
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 01:02:49 2024 +0200| [dff0a1557eabd435d251eaf10157b40bca4eefb5] | committer: Andreas Rheinhardt tests/checkasm/llauddsp: Avoid UB integer overflow The only multiplicators used in scalarproduct_and_madd_* are -1, 0 and +1. Yet it is of type int and the checkasm test uses the complete range of int for it, leading to overflows that don't happen for actual users. Fix this by using a more reasonable range for mul: Given that it is used in v1[i] += v3[i] * mul with v1 being a 16bit integer, it makes no sense to use values for mul that don't fit into 16bit. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dff0a1557eabd435d251eaf10157b40bca4eefb5 --- tests/checkasm/llauddsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/llauddsp.c b/tests/checkasm/llauddsp.c index e6eab589b2..969166baca 100644 --- a/tests/checkasm/llauddsp.c +++ b/tests/checkasm/llauddsp.c @@ -49,7 +49,7 @@ static void check_scalarproduct_and_madd_int16(LLAudDSPContext *c) randomize_buf(v1, BUF_SIZE); randomize_buf(v2, BUF_SIZE); randomize_buf(v3, BUF_SIZE); -mul = rnd(); +mul = (int16_t)rnd(); if (check_func(c->scalarproduct_and_madd_int16, "scalarproduct_and_madd_int16")) { @@ -84,7 +84,7 @@ static void check_scalarproduct_and_madd_int32(LLAudDSPContext *c) randomize_buf(v1, BUF_SIZE); randomize_buf(v2, BUF_SIZE); randomize_buf(v3, BUF_SIZE); -mul = rnd(); +mul = (int16_t)rnd(); if (check_func(c->scalarproduct_and_madd_int32, "scalarproduct_and_madd_int32")) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/checkasm/llviddsp: Use correct function pointer type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 09:40:01 2024 +0200| [99135a2f8bb933e3572313cea168ba79e38ca47b] | committer: Andreas Rheinhardt tests/checkasm/llviddsp: Use correct function pointer type Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99135a2f8bb933e3572313cea168ba79e38ca47b --- tests/checkasm/llviddsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/llviddsp.c b/tests/checkasm/llviddsp.c index 00ad21a7cc..b75c0ea099 100644 --- a/tests/checkasm/llviddsp.c +++ b/tests/checkasm/llviddsp.c @@ -114,7 +114,7 @@ static void check_add_left_pred(LLVidDSPContext *c, int width, int acc, const ch uint8_t *dst1 = av_mallocz(width); uint8_t *src0 = av_calloc(width, sizeof(*src0)); uint8_t *src1 = av_calloc(width, sizeof(*src1)); -declare_func(int, uint8_t *dst, uint8_t *src, ptrdiff_t w, int acc); +declare_func(int, uint8_t *dst, const uint8_t *src, ptrdiff_t w, int acc); init_buffer(src0, src1, uint8_t, width); @@ -143,7 +143,7 @@ static void check_add_left_pred_16(LLVidDSPContext *c, unsigned mask, int width, uint16_t *dst1 = av_calloc(width, sizeof(*dst1)); uint16_t *src0 = av_calloc(width, sizeof(*src0)); uint16_t *src1 = av_calloc(width, sizeof(*src1)); -declare_func(int, uint16_t *dst, uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc); +declare_func(int, uint16_t *dst, const uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc); init_buffer(src0, src1, uint16_t, width); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/checkasm/vp8dsp: Use correct function pointer type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 09:44:15 2024 +0200| [6c0994864ef645b2a5a9baee9cbb2ae5c0354ce6] | committer: Andreas Rheinhardt tests/checkasm/vp8dsp: Use correct function pointer type Forgotten in a54e53a1c428299b19c7b4e2b66d01c0482c41dd. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c0994864ef645b2a5a9baee9cbb2ae5c0354ce6 --- tests/checkasm/vp8dsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/checkasm/vp8dsp.c b/tests/checkasm/vp8dsp.c index 4cd0f8ac4f..6e989819ef 100644 --- a/tests/checkasm/vp8dsp.c +++ b/tests/checkasm/vp8dsp.c @@ -269,7 +269,8 @@ static void check_mc(void) LOCAL_ALIGNED_16(uint8_t, dst1, [16 * 16]); VP8DSPContext d; int type, k, dx, dy; -declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, uint8_t *, ptrdiff_t, int, int, int); +declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, + const uint8_t *, ptrdiff_t, int, int, int); ff_vp78dsp_init(&d); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/checkasm/huffyuvdsp: Use correct function pointer type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 09:37:40 2024 +0200| [631636e58216e1623ced5772de9558c9e944c6d0] | committer: Andreas Rheinhardt tests/checkasm/huffyuvdsp: Use correct function pointer type Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=631636e58216e1623ced5772de9558c9e944c6d0 --- tests/checkasm/huffyuvdsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkasm/huffyuvdsp.c b/tests/checkasm/huffyuvdsp.c index a08f5a8391..7491a8f14c 100644 --- a/tests/checkasm/huffyuvdsp.c +++ b/tests/checkasm/huffyuvdsp.c @@ -42,7 +42,7 @@ static void check_add_int16(HuffYUVDSPContext *c, unsigned mask, int width, cons uint16_t *dst0 = av_mallocz(width * sizeof(uint16_t)); uint16_t *dst1 = av_mallocz(width * sizeof(uint16_t)); -declare_func(void, uint16_t *dst, uint16_t *src, unsigned mask, int w); +declare_func(void, uint16_t *dst, const uint16_t *src, unsigned mask, int w); if (!src0 || !src1 || !dst0 || !dst1) fail(); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/checkasm/vf_bwdif: Use correct function pointer type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 09:58:43 2024 +0200| [caec57eb3ab76533822e13d9133fe8c7d87f0c0e] | committer: Andreas Rheinhardt tests/checkasm/vf_bwdif: Use correct function pointer type Forgotten in fa06f48371ba2b73c139810db5bb893dc27eda7a. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=caec57eb3ab76533822e13d9133fe8c7d87f0c0e --- tests/checkasm/vf_bwdif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/vf_bwdif.c b/tests/checkasm/vf_bwdif.c index fae61b62e4..222e6aa4fa 100644 --- a/tests/checkasm/vf_bwdif.c +++ b/tests/checkasm/vf_bwdif.c @@ -40,7 +40,7 @@ const int stride = WIDTH; \ const int mask = (1
[FFmpeg-cvslog] tests/checkasm/vf_blend: Update function type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 10:25:30 2024 +0200| [9126705e6e4a7b253258c66836c644534572d079] | committer: Andreas Rheinhardt tests/checkasm/vf_blend: Update function type Forgotten in 5b8faaad6c71bbb90951ca1642391e11cf6f5f91, a69a0b689c3c4e1e0bbf4c17716a25e14332a250. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9126705e6e4a7b253258c66836c644534572d079 --- tests/checkasm/vf_blend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkasm/vf_blend.c b/tests/checkasm/vf_blend.c index b5a96ee4bc..c387d36814 100644 --- a/tests/checkasm/vf_blend.c +++ b/tests/checkasm/vf_blend.c @@ -68,7 +68,7 @@ const uint8_t *bottom, ptrdiff_t bottom_linesize, \ uint8_t *dst, ptrdiff_t dst_linesize, \ ptrdiff_t width, ptrdiff_t height, \ - struct FilterParams *param, double *values); \ + struct FilterParams *param, struct SliceParams *sliceparam); \ w = WIDTH / depth; \ \ for (i = 0; i < BUF_UNITS - 1; i++) { \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/checkasm/motion: Use correct function pointer type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 09:41:24 2024 +0200| [dcbdcc3bf55a91f5bd1995b8ff0d6b6ab8861c47] | committer: Andreas Rheinhardt tests/checkasm/motion: Use correct function pointer type Forgotten in abb85429f3424375f21bdd135656c2d88357b3d5. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dcbdcc3bf55a91f5bd1995b8ff0d6b6ab8861c47 --- tests/checkasm/motion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/motion.c b/tests/checkasm/motion.c index 71a0ee3fc0..e7a36bbbda 100644 --- a/tests/checkasm/motion.c +++ b/tests/checkasm/motion.c @@ -52,8 +52,8 @@ static void test_motion(const char *name, me_cmp_func test_func) LOCAL_ALIGNED_16(uint8_t, img2, [WIDTH * HEIGHT]); declare_func_emms(AV_CPU_FLAG_MMX, int, struct MpegEncContext *c, - uint8_t *blk1 /* align width (8 or 16) */, - uint8_t *blk2 /* align 1 */, ptrdiff_t stride, + const uint8_t *blk1 /* align width (8 or 16) */, + const uint8_t *blk2 /* align 1 */, ptrdiff_t stride, int h); if (test_func == NULL) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/checkasm/vf_colorspace: Use correct function pointer type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 09:54:20 2024 +0200| [4c57cbda6796ec239ea732c62a058b61390f5102] | committer: Andreas Rheinhardt tests/checkasm/vf_colorspace: Use correct function pointer type Forgotten in 9b26a8077f1c0139fdcc236d3de08cd2bdc4ec0f. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c57cbda6796ec239ea732c62a058b61390f5102 --- tests/checkasm/vf_colorspace.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/vf_colorspace.c b/tests/checkasm/vf_colorspace.c index 31efa671f9..1b0d202ce6 100644 --- a/tests/checkasm/vf_colorspace.c +++ b/tests/checkasm/vf_colorspace.c @@ -53,8 +53,8 @@ static const unsigned bpp_mask[] = { 0x, 0x03ff03ff, 0x0fff0fff }; static void check_yuv2yuv(void) { -declare_func(void, uint8_t *dst[3], ptrdiff_t dst_stride[3], - uint8_t *src[3], ptrdiff_t src_stride[3], +declare_func(void, uint8_t *dst[3], const ptrdiff_t dst_stride[3], + uint8_t *src[3], const ptrdiff_t src_stride[3], int w, int h, const int16_t coeff[3][3][8], const int16_t off[2][8]); ColorSpaceDSPContext dsp; @@ -122,7 +122,7 @@ static void check_yuv2yuv(void) static void check_yuv2rgb(void) { declare_func(void, int16_t *dst[3], ptrdiff_t dst_stride, - uint8_t *src[3], ptrdiff_t src_stride[3], + uint8_t *src[3], const ptrdiff_t src_stride[3], int w, int h, const int16_t coeff[3][3][8], const int16_t off[8]); ColorSpaceDSPContext dsp; @@ -198,7 +198,7 @@ static void check_yuv2rgb(void) static void check_rgb2yuv(void) { -declare_func(void, uint8_t *dst[3], ptrdiff_t dst_stride[3], +declare_func(void, uint8_t *dst[3], const ptrdiff_t dst_stride[3], int16_t *src[3], ptrdiff_t src_stride, int w, int h, const int16_t coeff[3][3][8], const int16_t off[8]); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] tests/checkasm/sw_gbrp: Use correct function types for calls
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 11:23:10 2024 +0200| [784672b833513fa8bb8d8fa0cbc82cb8391aa581] | committer: Andreas Rheinhardt tests/checkasm/sw_gbrp: Use correct function types for calls E.g. f2de911818fbd7e73343803626b697fd0c968121 forgot to add the unused void* here. Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=784672b833513fa8bb8d8fa0cbc82cb8391aa581 --- tests/checkasm/sw_gbrp.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/tests/checkasm/sw_gbrp.c b/tests/checkasm/sw_gbrp.c index 848e5366ad..b845da32a6 100644 --- a/tests/checkasm/sw_gbrp.c +++ b/tests/checkasm/sw_gbrp.c @@ -76,7 +76,7 @@ static void check_output_yuv2gbrp(void) uint8_t *dst0[4]; uint8_t *dst1[4]; -declare_func(void, void *c, const int16_t *lumFilter, +declare_func(void, struct SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrcx, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrcx, const int16_t **chrVSrcx, int chrFilterSize, @@ -202,10 +202,11 @@ static void check_input_planar_rgb_to_y(void) #define LARGEST_INPUT_SIZE 512 #define INPUT_SIZES 6 static const int input_sizes[] = {8, 24, 128, 144, 256, 512}; -uint8_t *src[4]; +const uint8_t *src[4]; int32_t rgb2yuv[9] = {0}; -declare_func(void, uint8_t *dst, uint8_t *src[4], int w, int32_t *rgb2yuv); +declare_func(void, uint8_t *dst, const uint8_t *src[4], + int w, int32_t *rgb2yuv, void *opaque); LOCAL_ALIGNED_8(int32_t, src_r, [LARGEST_INPUT_SIZE]); LOCAL_ALIGNED_8(int32_t, src_g, [LARGEST_INPUT_SIZE]); @@ -243,13 +244,13 @@ static void check_input_planar_rgb_to_y(void) memset(dst0_y, 0xFF, LARGEST_INPUT_SIZE * sizeof(int32_t)); memset(dst1_y, 0xFF, LARGEST_INPUT_SIZE * sizeof(int32_t)); -call_ref(dst0_y, src, dstW, rgb2yuv); -call_new(dst1_y, src, dstW, rgb2yuv); +call_ref(dst0_y, src, dstW, rgb2yuv, NULL); +call_new(dst1_y, src, dstW, rgb2yuv, NULL); if (memcmp(dst0_y, dst1_y, dstW * byte_size)) fail(); -bench_new(dst1_y, src, dstW, rgb2yuv); +bench_new(dst1_y, src, dstW, rgb2yuv, NULL); } } @@ -269,11 +270,11 @@ static void check_input_planar_rgb_to_uv(void) #define LARGEST_INPUT_SIZE 512 #define INPUT_SIZES 6 static const int input_sizes[] = {8, 24, 128, 144, 256, 512}; -uint8_t *src[4]; +const uint8_t *src[4]; int32_t rgb2yuv[9] = {0}; declare_func(void, uint8_t *dstU, uint8_t *dstV, - uint8_t *src[4], int w, int32_t *rgb2yuv); + const uint8_t *src[4], int w, int32_t *rgb2yuv, void *opaque); LOCAL_ALIGNED_8(int32_t, src_r, [LARGEST_INPUT_SIZE]); LOCAL_ALIGNED_8(int32_t, src_g, [LARGEST_INPUT_SIZE]); @@ -316,14 +317,14 @@ static void check_input_planar_rgb_to_uv(void) memset(dst1_u, 0xFF, LARGEST_INPUT_SIZE * sizeof(int32_t)); memset(dst1_v, 0xFF, LARGEST_INPUT_SIZE * sizeof(int32_t)); -call_ref(dst0_u, dst0_v, src, dstW, rgb2yuv); -call_new(dst1_u, dst1_v, src, dstW, rgb2yuv); +call_ref(dst0_u, dst0_v, src, dstW, rgb2yuv, NULL); +call_new(dst1_u, dst1_v, src, dstW, rgb2yuv, NULL); if (memcmp(dst0_u, dst1_u, dstW * byte_size) || memcmp(dst0_v, dst1_v, dstW * byte_size)) fail(); -bench_new(dst1_u, dst1_v, src, dstW, rgb2yuv); +bench_new(dst1_u, dst1_v, src, dstW, rgb2yuv, NULL); } } } @@ -342,10 +343,11 @@ static void check_input_planar_rgb_to_a(void) #define LARGEST_INPUT_SIZE 512 #define INPUT_SIZES 6 static const int input_sizes[] = {8, 24, 128, 144, 256, 512}; -uint8_t *src[4]; +const uint8_t *src[4]; int32_t rgb2yuv[9] = {0}; -declare_func(void, uint8_t *dst, uint8_t *src[4], int w, int32_t *rgb2yuv); +declare_func(void, uint8_t *dst, const uint8_t *src[4], + int w, int32_t *rgb2yuv, void *opaque); LOCAL_ALIGNED_8(int32_t, src_r, [LARGEST_INPUT_SIZE]); LOCAL_ALIGNED_8(int32_t, src_g, [LARGEST_INPUT_SIZE]); @@ -386,12 +388,12 @@ static void check_input_planar_rgb_to_a(void) memset(dst0_a, 0x00, LARGEST_INPUT_SIZE * sizeof(int32_t)); memset(dst1_a, 0x00, LARGEST_INPUT_SIZE * sizeof(int32_t)); -call_ref(dst0_a, src, dstW, rgb2yuv); -call_new(dst1_a, src, dstW, rgb2yuv); +call_ref(dst0_a, src, dstW, rgb2yuv, NULL); +call_new(dst1_a, src, dstW, rgb2yuv, NULL); if (memcmp(dst0_a, dst1_a
[FFmpeg-cvslog] tests/checkasm/vvc_mc: Use correct function pointer type
ffmpeg | branch: master | Andreas Rheinhardt | Mon May 13 09:50:35 2024 +0200| [e3de22e307714d4a1b9bfe14eaa66bf9c8e143b8] | committer: Andreas Rheinhardt tests/checkasm/vvc_mc: Use correct function pointer type Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3de22e307714d4a1b9bfe14eaa66bf9c8e143b8 --- tests/checkasm/vvc_mc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/vvc_mc.c b/tests/checkasm/vvc_mc.c index 97f57cb401..71087dc3dd 100644 --- a/tests/checkasm/vvc_mc.c +++ b/tests/checkasm/vvc_mc.c @@ -121,7 +121,8 @@ static void check_put_vvc_luma_uni(void) VVCDSPContext c; declare_func(void, uint8_t *dst, ptrdiff_t dststride, -uint8_t *src, ptrdiff_t srcstride, int height, const int8_t *hf, const int8_t *vf, int width); +const uint8_t *src, ptrdiff_t srcstride, int height, +const int8_t *hf, const int8_t *vf, int width); for (int bit_depth = 8; bit_depth <= 12; bit_depth += 2) { ff_vvc_dsp_init(&c, bit_depth); @@ -219,7 +220,8 @@ static void check_put_vvc_chroma_uni(void) VVCDSPContext c; declare_func(void, uint8_t *dst, ptrdiff_t dststride, -uint8_t *src, ptrdiff_t srcstride, int height, const int8_t *hf, const int8_t *vf, int width); +const uint8_t *src, ptrdiff_t srcstride, int height, +const int8_t *hf, const int8_t *vf, int width); for (int bit_depth = 8; bit_depth <= 12; bit_depth += 2) { ff_vvc_dsp_init(&c, bit_depth); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc/flacdsp: R-V V flac_wasted33
ffmpeg | branch: master | Rémi Denis-Courmont | Sun May 12 20:02:03 2024 +0300| [88d973a5d658dc61dfd32e87b062724def46addc] | committer: Rémi Denis-Courmont lavc/flacdsp: R-V V flac_wasted33 T-Head C908: flac_wasted_33_c: 786.2 flac_wasted_33_rvv_i64: 486.5 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88d973a5d658dc61dfd32e87b062724def46addc --- libavcodec/riscv/flacdsp_init.c | 4 libavcodec/riscv/flacdsp_rvv.S | 32 2 files changed, 36 insertions(+) diff --git a/libavcodec/riscv/flacdsp_init.c b/libavcodec/riscv/flacdsp_init.c index 454787470b..4f1652dbe7 100644 --- a/libavcodec/riscv/flacdsp_init.c +++ b/libavcodec/riscv/flacdsp_init.c @@ -32,6 +32,7 @@ void ff_flac_lpc32_rvv(int32_t *decoded, const int coeffs[32], void ff_flac_lpc32_rvv_simple(int32_t *decoded, const int coeffs[32], int pred_order, int qlevel, int len); void ff_flac_wasted32_rvv(int32_t *, int shift, int len); +void ff_flac_wasted33_rvv(int64_t *, const int32_t *, int shift, int len); void ff_flac_decorrelate_indep2_16_rvv(uint8_t **out, int32_t **in, int channels, int len, int shift); void ff_flac_decorrelate_indep4_16_rvv(uint8_t **out, int32_t **in, @@ -84,6 +85,9 @@ av_cold void ff_flacdsp_init_riscv(FLACDSPContext *c, enum AVSampleFormat fmt, c->wasted32 = ff_flac_wasted32_rvv; +if (flags & AV_CPU_FLAG_RVV_I64) +c->wasted33 = ff_flac_wasted33_rvv; + # if (__riscv_xlen >= 64) switch (fmt) { case AV_SAMPLE_FMT_S16: diff --git a/libavcodec/riscv/flacdsp_rvv.S b/libavcodec/riscv/flacdsp_rvv.S index d7009cdec2..6287faa260 100644 --- a/libavcodec/riscv/flacdsp_rvv.S +++ b/libavcodec/riscv/flacdsp_rvv.S @@ -115,6 +115,38 @@ func ff_flac_wasted32_rvv, zve32x ret endfunc +func ff_flac_wasted33_rvv, zve64x +srli t0, a2, 5 +li t1, 1 +bnez t0, 2f +sll a2, t1, a2 +1: +vsetvli t0, a3, e32, m4, ta, ma +vle32.v v8, (a1) +sub a3, a3, t0 +vwmulsu.vx v16, v8, a2 +sh2add a1, t0, a1 +vse64.v v16, (a0) +sh3add a0, t0, a0 +bnez a3, 1b + +ret + +2: // Pessimistic case: wasted >= 32 +vsetvli t0, a3, e32, m4, ta, ma +vle32.v v8, (a1) +sub a3, a3, t0 +vwcvtu.x.x.v v16, v8 +sh2add a1, t0, a1 +vsetvli zero, zero, e64, m8, ta, ma +vsll.vx v16, v16, a2 +vse64.v v16, (a0) +sh3add a0, t0, a0 +bnez a3, 2b + +ret +endfunc + #if (__riscv_xlen == 64) func ff_flac_decorrelate_indep2_16_rvv, zve32x ld a0, (a0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc/vp9dsp: R-V V ipred tm
ffmpeg | branch: master | sunyuechi | Wed May 15 11:55:49 2024 +0800| [d521b7280c2ac0b990e53abf27c40bcde9540202] | committer: Rémi Denis-Courmont lavc/vp9dsp: R-V V ipred tm C908: vp9_tm_4x4_8bpp_c: 116.5 vp9_tm_4x4_8bpp_rvv_i32: 43.5 vp9_tm_8x8_8bpp_c: 416.2 vp9_tm_8x8_8bpp_rvv_i32: 86.0 vp9_tm_16x16_8bpp_c: 1665.5 vp9_tm_16x16_8bpp_rvv_i32: 187.2 vp9_tm_32x32_8bpp_c: 6974.2 vp9_tm_32x32_8bpp_rvv_i32: 625.7 Signed-off-by: Rémi Denis-Courmont > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d521b7280c2ac0b990e53abf27c40bcde9540202 --- libavcodec/riscv/vp9_intra_rvv.S | 118 +++ libavcodec/riscv/vp9dsp.h| 8 +++ libavcodec/riscv/vp9dsp_init.c | 4 ++ 3 files changed, 130 insertions(+) diff --git a/libavcodec/riscv/vp9_intra_rvv.S b/libavcodec/riscv/vp9_intra_rvv.S index ca156d65cd..280c497687 100644 --- a/libavcodec/riscv/vp9_intra_rvv.S +++ b/libavcodec/riscv/vp9_intra_rvv.S @@ -173,3 +173,121 @@ func ff_h_8x8_rvv, zve32x ret endfunc + +.macro tm_sum4 dst1, dst2, dst3, dst4, top, n1 +lbu t1, \n1(a2) +lbu t2, (\n1-1)(a2) +lbu t3, (\n1-2)(a2) +lbu t4, (\n1-3)(a2) +sub t1, t1, a4 +sub t2, t2, a4 +sub t3, t3, a4 +sub t4, t4, a4 +vadd.vx \dst1, \top, t1 +vadd.vx \dst2, \top, t2 +vadd.vx \dst3, \top, t3 +vadd.vx \dst4, \top, t4 +.endm + +func ff_tm_32x32_rvv, zve32x +lbu a4, -1(a3) +li t5, 32 + +.irp offset 31, 23, 15, 7 +vsetvli zero, t5, e16, m4, ta, ma +vle8.v v8, (a3) +vzext.vf2v28, v8 + +tm_sum4 v0, v4, v8, v12, v28, \offset +tm_sum4 v16, v20, v24, v28, v28, (\offset-4) + +.irp n 0, 4, 8, 12, 16, 20, 24, 28 +vmax.vx v\n, v\n, zero +.endr + +vsetvli zero, zero, e8, m2, ta, ma +.irp n 0, 4, 8, 12, 16, 20, 24, 28 +vnclipu.wi v\n, v\n, 0 +vse8.v v\n, (a0) +add a0, a0, a1 +.endr +.endr + +ret +endfunc + +func ff_tm_16x16_rvv, zve32x +vsetivli zero, 16, e16, m2, ta, ma +vle8.vv8, (a3) +vzext.vf2 v30, v8 +lbu a4, -1(a3) + +tm_sum4 v0, v2, v4, v6, v30, 15 +tm_sum4 v8, v10, v12, v14, v30, 11 +tm_sum4 v16, v18, v20, v22, v30, 7 +tm_sum4 v24, v26, v28, v30, v30, 3 + +.irp n 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 +vmax.vx v\n, v\n, zero +.endr + +vsetvli zero, zero, e8, m1, ta, ma +.irp n 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 +vnclipu.wi v\n, v\n, 0 +vse8.v v\n, (a0) +add a0, a0, a1 +.endr +vnclipu.wi v30, v30, 0 +vse8.v v30, (a0) + +ret +endfunc + +func ff_tm_8x8_rvv, zve32x +vsetivli zero, 8, e16, m1, ta, ma +vle8.v v8, (a3) +vzext.vf2v28, v8 +lbu a4, -1(a3) + +tm_sum4 v16, v17, v18, v19, v28, 7 +tm_sum4 v20, v21, v22, v23, v28, 3 + +.irp n 16, 17, 18, 19, 20, 21, 22, 23 +vmax.vx v\n, v\n, zero +.endr + +vsetvli zero, zero, e8, mf2, ta, ma +.irp n 16, 17, 18, 19, 20, 21, 22 +vnclipu.wi v\n, v\n, 0 +vse8.v v\n, (a0) +add a0, a0, a1 +.endr +vnclipu.wi v24, v23, 0 +vse8.v v24, (a0) + +ret +endfunc + +func ff_tm_4x4_rvv, zve32x +vsetivli zero, 4, e16, mf2, ta, ma +vle8.v v8, (a3) +vzext.vf2v28, v8 +lbu a4, -1(a3) + +tm_sum4 v16, v17, v18, v19, v28, 3 + +.irp n 16, 17, 18, 19 +vmax.vx v\n, v\n, zero +.endr + +vsetvli zero, zero, e8, mf4, ta, ma +.irp n 16, 17, 18 +vnclipu.wi v\n, v\n, 0 +vse8.v v\n, (a0) +add a0, a0, a1 +.endr +vnclipu.wi v24, v19, 0 +vse8.v v24, (a0) + +ret +endfunc diff --git a/libavcodec/riscv/vp9dsp.h b/libavcodec/riscv/vp9dsp.h index 0ad961c7e0..79330b4968 100644 --- a/libavcodec/riscv/vp9dsp.h +++ b/libavcodec/riscv/vp9dsp.h @@ -72,6 +72,14 @@ void ff_h_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a); void ff_h_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, const uint8_t *a); +void ff_tm_32x32_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, + const uint8_t *a); +void ff_tm_16x16_rvv(uint8_t *dst, ptrdiff_t stride, const uint8_t *l, + const uint8_t *a); +void ff_tm_8x8_rvv(uint8_t *dst, ptrdiff_t stride, const
[FFmpeg-cvslog] checkasm/h264dsp: use int64_t scale values
ffmpeg | branch: master | James Almer | Tue May 14 23:28:50 2024 -0300| [727a603158b466a3f11f419012856e845a0721b9] | committer: James Almer checkasm/h264dsp: use int64_t scale values Fixes "signed integer overflow: [varies] * 104858 cannot be represented in type 'int'" errors under ubsan. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=727a603158b466a3f11f419012856e845a0721b9 --- tests/checkasm/h264dsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c index cb180cc44f..0cc1f32740 100644 --- a/tests/checkasm/h264dsp.c +++ b/tests/checkasm/h264dsp.c @@ -83,7 +83,7 @@ static void dct4x4_##size(dctcoef *coef) \ }\ for (y = 0; y < 4; y++) {\ for (x = 0; x < 4; x++) {\ -static const int scale[] = { 13107 * 10, 8066 * 13, 5243 * 16 }; \ +const int64_t scale[] = { 13107 * 10, 8066 * 13, 5243 * 16 };\ const int idx = (y & 1) + (x & 1); \ coef[y*4 + x] = (coef[y*4 + x] * scale[idx] + (1 << 14)) >> 15; \ }\ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavc/libvpxenc: Fix parsing of ts_layering_mode parameter
ffmpeg | branch: master | Aaron Thompson | Thu May 16 06:10:36 2024 +| [be3404bbacae5a046e1b3e66a98810b4b7564249] | committer: James Zern lavc/libvpxenc: Fix parsing of ts_layering_mode parameter The value was being parsed as base 4, so the value "4" was invalid and would result in ts_layering_mode being set to 0. Signed-off-by: Aaron Thompson Signed-off-by: James Zern > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be3404bbacae5a046e1b3e66a98810b4b7564249 --- libavcodec/libvpxenc.c | 2 +- libavcodec/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index bcbdc4981e..5c7b6e9de7 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -684,7 +684,7 @@ static int vpx_ts_param_parse(VPxContext *ctx, struct vpx_codec_enc_cfg *enccfg, vp8_ts_parse_int_array(enccfg->ts_layer_id, value, value_len, VPX_TS_MAX_PERIODICITY); } else if (!strcmp(key, "ts_layering_mode")) { /* option for pre-defined temporal structures in function set_temporal_layer_pattern. */ -ts_layering_mode = strtoul(value, &value, 4); +ts_layering_mode = strtoul(value, &value, 10); } #if (VPX_ENCODER_ABI_VERSION >= 12) && CONFIG_LIBVPX_VP9_ENCODER diff --git a/libavcodec/version.h b/libavcodec/version.h index f0958eee14..3d2de546b3 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -30,7 +30,7 @@ #include "version_major.h" #define LIBAVCODEC_VERSION_MINOR 5 -#define LIBAVCODEC_VERSION_MICRO 103 +#define LIBAVCODEC_VERSION_MICRO 104 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".