; ; jcsample.asm - downsampling (64-bit AVX2) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2009, 2016, 2024, D. R. Commander. ; Copyright (C) 2015, Intel Corporation. ; Copyright (C) 2018, Matthias Räncker. ; ; 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.
%include"jsimdext.inc"
; --------------------------------------------------------------------------
SECTION SEG_TEXT
BITS 64 ; ; Downsample pixel values of a single component. ; 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); ;
sub rcx, byte SIZEOF_YMMWORD ; outcol add rsi, byte 2*SIZEOF_YMMWORD ; inptr add rdi, byte 1*SIZEOF_YMMWORD ; outptr cmp rcx, byte SIZEOF_YMMWORD
jae short .columnloop
test rcx, rcx jnz near .columnloop_r24
pop rsi pop rdi pop rcx
add rsi, byte SIZEOF_JSAMPROW ; input_data add rdi, byte SIZEOF_JSAMPROW ; output_data dec rax ; rowctr jg near .rowloop
.return:
vzeroupper
UNCOLLECT_ARGS 6 pop rbp ret
; -------------------------------------------------------------------------- ; ; Downsample pixel values of a single component. ; 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); ;
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.