From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 1/2] swscale/ppc/swscale_ppc_template: Remove code not passing checkasm Date: Thu, 4 Apr 2024 04:57:31 +0200 Message-ID: <GV1P250MB073782CDBA22EFEBA2008C3E8F3C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libswscale/ppc/swscale_ppc_template.c | 62 ++++----------------------- 1 file changed, 9 insertions(+), 53 deletions(-) diff --git a/libswscale/ppc/swscale_ppc_template.c b/libswscale/ppc/swscale_ppc_template.c index 84641f3a8b..e9abd33cbf 100644 --- a/libswscale/ppc/swscale_ppc_template.c +++ b/libswscale/ppc/swscale_ppc_template.c @@ -104,16 +104,6 @@ static void FUNC(hScale_real)(SwsContext *c, int16_t *dst, int dstW, register int i; LOCAL_ALIGNED(16, int, tempo, [4]); - if (filterSize % 4) { - for (i = 0; i < dstW; i++) { - register int j; - register int srcPos = filterPos[i]; - register int val = 0; - for (j = 0; j < filterSize; j++) - val += ((int)src[srcPos + j]) * filter[filterSize * i + j]; - dst[i] = FFMIN(val >> 7, (1 << 15) - 1); - } - } else switch (filterSize) { case 4: for (i = 0; i < dstW; i++) { @@ -175,48 +165,14 @@ static void FUNC(hScale_real)(SwsContext *c, int16_t *dst, int dstW, break; default: - for (i = 0; i < dstW; i++) { - register int j, av_unused offset = i * 2 * filterSize; - register int srcPos = filterPos[i]; - - vector signed int val_s, val_v = (vector signed int)vzero; - vector signed short av_unused filter_v0R; - vector unsigned char av_unused permF, av_unused src_v0, av_unused permS; - FIRST_LOAD(filter_v0R, offset, filter, permF); - FIRST_LOAD(src_v0, srcPos, src, permS); - - for (j = 0; j < filterSize - 15; j += 16) { - vector unsigned char av_unused src_v1, src_vF; - vector signed short av_unused filter_v1R, av_unused filter_v2R, - filter_v0, filter_v1, src_vA, src_vB; - vector signed int val_acc; - LOAD_SRCV(srcPos, j, src, permS, src_v0, src_v1, src_vF); - src_vA = // vec_unpackh sign-extends... - (vector signed short)(VEC_MERGEH((vector unsigned char)vzero, src_vF)); - src_vB = // vec_unpackh sign-extends... - (vector signed short)(VEC_MERGEL((vector unsigned char)vzero, src_vF)); - GET_VFD(i, j, filter, filter_v0R, filter_v1R, permF, filter_v0, 0); - GET_VFD(i, j, filter, filter_v1R, filter_v2R, permF, filter_v1, 16); - - val_acc = vec_msums(src_vA, filter_v0, val_v); - val_v = vec_msums(src_vB, filter_v1, val_acc); - UPDATE_PTR(filter_v2R, filter_v0R, src_v1, src_v0); - } - - if (j < filterSize - 7) { - // loading src_v0 is useless, it's already done above - vector unsigned char av_unused src_v1, src_vF; - vector signed short src_v, av_unused filter_v1R, filter_v; - LOAD_SRCV8(srcPos, j, src, permS, src_v0, src_v1, src_vF); - src_v = // vec_unpackh sign-extends... - (vector signed short)(VEC_MERGEH((vector unsigned char)vzero, src_vF)); - GET_VFD(i, j, filter, filter_v0R, filter_v1R, permF, filter_v, 0); - val_v = vec_msums(src_v, filter_v, val_v); - } - val_s = vec_sums(val_v, vzero); - - VEC_ST(val_s, 0, tempo); - dst[i] = FFMIN(tempo[3] >> 7, (1 << 15) - 1); - } + for (register int i = 0; i < dstW; i++) { + register int j; + register int srcPos = filterPos[i]; + register int val = 0; + for (j = 0; j < filterSize; j++) + val += ((int)src[srcPos + j]) * filter[filterSize * i + j]; + dst[i] = FFMIN(val >> 7, (1 << 15) - 1); + } + break; } } -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2024-04-04 2:57 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-04 2:57 Andreas Rheinhardt [this message] 2024-04-04 2:58 ` [FFmpeg-devel] [PATCH 2/2] swscale/ppc/swscale_ppc_template: Reindent after the previous commit Andreas Rheinhardt 2024-04-04 4:01 ` Lynne
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=GV1P250MB073782CDBA22EFEBA2008C3E8F3C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git