; ; Downsampling (32-bit AVX2) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2015, Intel Corporation. ; Copyright (C) 2016, 2024-2026, D. R. Commander. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler) or Yasm.
; Downsample components from a single plane. ; This version handles the common case of 2:1 horizontal and 1:1 vertical, ; without smoothing. ; ; GLOBAL(void) ; jsimd_h2v1_downsample_avx2(JDIMENSION image_width, int max_v_samp_factor, ; JDIMENSION v_samp_factor, ; JDIMENSION width_in_blocks, JSAMPARRAY input_data, ; JSAMPARRAY output_data)
EXTN(jsimd_h2v1_downsample_avx2): push ebp
mov ebp, esp ; push ebx ; unused ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi pushedi
subecx, byte SIZEOF_YMMWORD ; outcol
add esi, byte 2 * SIZEOF_YMMWORD ; inptr
add edi, byte 1 * SIZEOF_YMMWORD ; outptr cmpecx, byte SIZEOF_YMMWORD
jae short .columnloop
test ecx, ecx jnz near .columnloop_r24
pop esi
pop edi
pop ecx
add esi, byte SIZEOF_JSAMPROW ; input_data
add edi, byte SIZEOF_JSAMPROW ; output_data
dec eax ; rowctr jg near .rowloop
.return:
vzeroupper
pop edi
pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved ; pop ebx ; unused
pop ebp
ret
; -------------------------------------------------------------------------- ; ; Downsample components from a single plane. ; This version handles the standard case of 2:1 horizontal and 2:1 vertical, ; without smoothing. ; ; GLOBAL(void) ; jsimd_h2v2_downsample_avx2(JDIMENSION image_width, int max_v_samp_factor, ; JDIMENSION v_samp_factor, ; JDIMENSION width_in_blocks, JSAMPARRAY input_data, ; JSAMPARRAY output_data)
EXTN(jsimd_h2v2_downsample_avx2): push ebp
mov ebp, esp ; push ebx ; unused ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi pushedi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.