From: "J. Dekker" <jdek@itanimul.li> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v3 5/6] lavc/aarch64: clean-up sao band 8x8 function formatting Date: Tue, 4 Jan 2022 06:20:17 +0100 Message-ID: <20220104052018.9541-5-jdek@itanimul.li> (raw) In-Reply-To: <20220104052018.9541-1-jdek@itanimul.li> Signed-off-by: J. Dekker <jdek@itanimul.li> --- libavcodec/aarch64/hevcdsp_sao_neon.S | 65 +++++++++++---------------- 1 file changed, 25 insertions(+), 40 deletions(-) diff --git a/libavcodec/aarch64/hevcdsp_sao_neon.S b/libavcodec/aarch64/hevcdsp_sao_neon.S index 167b9676d8..73b0b3b056 100644 --- a/libavcodec/aarch64/hevcdsp_sao_neon.S +++ b/libavcodec/aarch64/hevcdsp_sao_neon.S @@ -30,24 +30,21 @@ // int width, int height) function ff_hevc_sao_band_filter_8x8_8_neon, export=1 sub sp, sp, #64 - stp xzr, xzr, [sp] - stp xzr, xzr, [sp, #16] - stp xzr, xzr, [sp, #32] - stp xzr, xzr, [sp, #48] + stp xzr, xzr, [sp] + stp xzr, xzr, [sp, #16] + stp xzr, xzr, [sp, #32] + stp xzr, xzr, [sp, #48] mov w8, #4 -0: - ldrsh x9, [x4, x8, lsl #1] // x9 = sao_offset_val[k+1] +0: ldrsh x9, [x4, x8, lsl #1] // sao_offset_val[k+1] subs w8, w8, #1 - add w10, w8, w5 // x10 = k + sao_left_class - and w10, w10, #0x1F + add w10, w8, w5 // k + sao_left_class + and w10, w10, #0x1F strh w9, [sp, x10, lsl #1] bne 0b - ld1 {v16.16b-v19.16b}, [sp], #64 - movi v20.8h, #1 -1: // beginning of line - mov w8, w6 -2: - // Simple layout for accessing 16bit values + ld1 {v16.16b-v19.16b}, [sp], #64 + movi v20.8h, #1 +1: mov w8, w6 // beginning of line +2: // Simple layout for accessing 16bit values // with 8bit LUT. // // 00 01 02 03 04 05 06 07 @@ -55,33 +52,21 @@ function ff_hevc_sao_band_filter_8x8_8_neon, export=1 // |xDE#xAD|xCA#xFE|xBE#xEF|xFE#xED|.... // +-----------------------------------> // i-0 i-1 i-2 i-3 - // dst[x] = av_clip_pixel(src[x] + offset_table[src[x] >> shift]); - ld1 {v2.8b}, [x1] - // load src[x] - uxtl v0.8h, v2.8b - // >> shift - ushr v2.8h, v0.8h, #3 // BIT_DEPTH - 3 - // x2 (access lower short) - shl v1.8h, v2.8h, #1 // low (x2, accessing short) - // +1 access upper short - add v3.8h, v1.8h, v20.8h - // shift insert index to upper byte - sli v1.8h, v3.8h, #8 - // table - tbx v2.16b, {v16.16b-v19.16b}, v1.16b - // src[x] + table - add v1.8h, v0.8h, v2.8h - // clip + narrow - sqxtun v4.8b, v1.8h - // store - st1 {v4.8b}, [x0] - // done 8 pixels - subs w8, w8, #8 + ld1 {v2.8b}, [x1] // dst[x] = av_clip_pixel(src[x] + offset_table[src[x] >> shift]); + uxtl v0.8h, v2.8b // load src[x] + ushr v2.8h, v0.8h, #3 // >> BIT_DEPTH - 3 + shl v1.8h, v2.8h, #1 // low (x2, accessing short) + add v3.8h, v1.8h, v20.8h // +1 access upper short + sli v1.8h, v3.8h, #8 // shift insert index to upper byte + tbx v2.16b, {v16.16b-v19.16b}, v1.16b // table + add v1.8h, v0.8h, v2.8h // src[x] + table + sqxtun v4.8b, v1.8h // clip + narrow + st1 {v4.8b}, [x0] // store + subs w8, w8, #8 // done 8 pixels bne 2b - // finished line - subs w7, w7, #1 - add x0, x0, x2 // dst += stride_dst - add x1, x1, x3 // src += stride_src + subs w7, w7, #1 // finished line, prep. new + add x0, x0, x2 // dst += stride_dst + add x1, x1, x3 // src += stride_src bne 1b ret endfunc -- 2.32.0 (Apple Git-132) _______________________________________________ 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 prev parent reply other threads:[~2022-01-04 5:21 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-04 5:20 [FFmpeg-devel] [PATCH v3 1/6] lavc/arm: dont assign hevc_qpel functions for non-multiple of 8 widths J. Dekker 2022-01-04 5:20 ` [FFmpeg-devel] [PATCH v3 2/6] Revert "arm: hevc_qpel: Fix the assembly to work with non-multiple of 8 widths" J. Dekker 2022-01-04 5:20 ` [FFmpeg-devel] [PATCH v3 3/6] lavc/aarch64: add hevc sao edge 16x16 J. Dekker 2022-01-04 5:20 ` [FFmpeg-devel] [PATCH v3 4/6] lavc/aarch64: add hevc sao edge 8x8 J. Dekker 2022-01-04 5:20 ` J. Dekker [this message] 2022-01-04 5:20 ` [FFmpeg-devel] [PATCH v3 6/6] lavc/aarch64: add hevc sao band 8x8 tiling J. Dekker 2022-01-04 9:41 ` Martin Storsjö 2022-01-04 13:34 ` J. Dekker 2022-01-05 6:46 ` [FFmpeg-devel] [PATCH v3 1/6] lavc/arm: dont assign hevc_qpel functions for non-multiple of 8 widths Andreas Rheinhardt 2022-01-05 8:30 ` Martin Storsjö
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=20220104052018.9541-5-jdek@itanimul.li \ --to=jdek@itanimul.li \ --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