Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | ; |
michael@0 | 2 | ; jdcolss2-64.asm - colorspace conversion (64-bit SSE2) |
michael@0 | 3 | ; |
michael@0 | 4 | ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB |
michael@0 | 5 | ; Copyright 2009 D. R. Commander |
michael@0 | 6 | ; |
michael@0 | 7 | ; Based on |
michael@0 | 8 | ; x86 SIMD extension for IJG JPEG library |
michael@0 | 9 | ; Copyright (C) 1999-2006, MIYASAKA Masaru. |
michael@0 | 10 | ; For conditions of distribution and use, see copyright notice in jsimdext.inc |
michael@0 | 11 | ; |
michael@0 | 12 | ; This file should be assembled with NASM (Netwide Assembler), |
michael@0 | 13 | ; can *not* be assembled with Microsoft's MASM or any compatible |
michael@0 | 14 | ; assembler (including Borland's Turbo Assembler). |
michael@0 | 15 | ; NASM is available from http://nasm.sourceforge.net/ or |
michael@0 | 16 | ; http://sourceforge.net/project/showfiles.php?group_id=6208 |
michael@0 | 17 | ; |
michael@0 | 18 | ; [TAB8] |
michael@0 | 19 | |
michael@0 | 20 | %include "jsimdext.inc" |
michael@0 | 21 | |
michael@0 | 22 | ; -------------------------------------------------------------------------- |
michael@0 | 23 | |
michael@0 | 24 | %define SCALEBITS 16 |
michael@0 | 25 | |
michael@0 | 26 | F_0_344 equ 22554 ; FIX(0.34414) |
michael@0 | 27 | F_0_714 equ 46802 ; FIX(0.71414) |
michael@0 | 28 | F_1_402 equ 91881 ; FIX(1.40200) |
michael@0 | 29 | F_1_772 equ 116130 ; FIX(1.77200) |
michael@0 | 30 | F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1) |
michael@0 | 31 | F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414) |
michael@0 | 32 | F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200) |
michael@0 | 33 | |
michael@0 | 34 | ; -------------------------------------------------------------------------- |
michael@0 | 35 | SECTION SEG_CONST |
michael@0 | 36 | |
michael@0 | 37 | alignz 16 |
michael@0 | 38 | global EXTN(jconst_ycc_rgb_convert_sse2) |
michael@0 | 39 | |
michael@0 | 40 | EXTN(jconst_ycc_rgb_convert_sse2): |
michael@0 | 41 | |
michael@0 | 42 | PW_F0402 times 8 dw F_0_402 |
michael@0 | 43 | PW_MF0228 times 8 dw -F_0_228 |
michael@0 | 44 | PW_MF0344_F0285 times 4 dw -F_0_344, F_0_285 |
michael@0 | 45 | PW_ONE times 8 dw 1 |
michael@0 | 46 | PD_ONEHALF times 4 dd 1 << (SCALEBITS-1) |
michael@0 | 47 | |
michael@0 | 48 | alignz 16 |
michael@0 | 49 | |
michael@0 | 50 | ; -------------------------------------------------------------------------- |
michael@0 | 51 | SECTION SEG_TEXT |
michael@0 | 52 | BITS 64 |
michael@0 | 53 | |
michael@0 | 54 | %include "jdclrss2-64.asm" |
michael@0 | 55 | |
michael@0 | 56 | %undef RGB_RED |
michael@0 | 57 | %undef RGB_GREEN |
michael@0 | 58 | %undef RGB_BLUE |
michael@0 | 59 | %undef RGB_PIXELSIZE |
michael@0 | 60 | %define RGB_RED EXT_RGB_RED |
michael@0 | 61 | %define RGB_GREEN EXT_RGB_GREEN |
michael@0 | 62 | %define RGB_BLUE EXT_RGB_BLUE |
michael@0 | 63 | %define RGB_PIXELSIZE EXT_RGB_PIXELSIZE |
michael@0 | 64 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extrgb_convert_sse2 |
michael@0 | 65 | %include "jdclrss2-64.asm" |
michael@0 | 66 | |
michael@0 | 67 | %undef RGB_RED |
michael@0 | 68 | %undef RGB_GREEN |
michael@0 | 69 | %undef RGB_BLUE |
michael@0 | 70 | %undef RGB_PIXELSIZE |
michael@0 | 71 | %define RGB_RED EXT_RGBX_RED |
michael@0 | 72 | %define RGB_GREEN EXT_RGBX_GREEN |
michael@0 | 73 | %define RGB_BLUE EXT_RGBX_BLUE |
michael@0 | 74 | %define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE |
michael@0 | 75 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extrgbx_convert_sse2 |
michael@0 | 76 | %include "jdclrss2-64.asm" |
michael@0 | 77 | |
michael@0 | 78 | %undef RGB_RED |
michael@0 | 79 | %undef RGB_GREEN |
michael@0 | 80 | %undef RGB_BLUE |
michael@0 | 81 | %undef RGB_PIXELSIZE |
michael@0 | 82 | %define RGB_RED EXT_BGR_RED |
michael@0 | 83 | %define RGB_GREEN EXT_BGR_GREEN |
michael@0 | 84 | %define RGB_BLUE EXT_BGR_BLUE |
michael@0 | 85 | %define RGB_PIXELSIZE EXT_BGR_PIXELSIZE |
michael@0 | 86 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extbgr_convert_sse2 |
michael@0 | 87 | %include "jdclrss2-64.asm" |
michael@0 | 88 | |
michael@0 | 89 | %undef RGB_RED |
michael@0 | 90 | %undef RGB_GREEN |
michael@0 | 91 | %undef RGB_BLUE |
michael@0 | 92 | %undef RGB_PIXELSIZE |
michael@0 | 93 | %define RGB_RED EXT_BGRX_RED |
michael@0 | 94 | %define RGB_GREEN EXT_BGRX_GREEN |
michael@0 | 95 | %define RGB_BLUE EXT_BGRX_BLUE |
michael@0 | 96 | %define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE |
michael@0 | 97 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extbgrx_convert_sse2 |
michael@0 | 98 | %include "jdclrss2-64.asm" |
michael@0 | 99 | |
michael@0 | 100 | %undef RGB_RED |
michael@0 | 101 | %undef RGB_GREEN |
michael@0 | 102 | %undef RGB_BLUE |
michael@0 | 103 | %undef RGB_PIXELSIZE |
michael@0 | 104 | %define RGB_RED EXT_XBGR_RED |
michael@0 | 105 | %define RGB_GREEN EXT_XBGR_GREEN |
michael@0 | 106 | %define RGB_BLUE EXT_XBGR_BLUE |
michael@0 | 107 | %define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE |
michael@0 | 108 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extxbgr_convert_sse2 |
michael@0 | 109 | %include "jdclrss2-64.asm" |
michael@0 | 110 | |
michael@0 | 111 | %undef RGB_RED |
michael@0 | 112 | %undef RGB_GREEN |
michael@0 | 113 | %undef RGB_BLUE |
michael@0 | 114 | %undef RGB_PIXELSIZE |
michael@0 | 115 | %define RGB_RED EXT_XRGB_RED |
michael@0 | 116 | %define RGB_GREEN EXT_XRGB_GREEN |
michael@0 | 117 | %define RGB_BLUE EXT_XRGB_BLUE |
michael@0 | 118 | %define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE |
michael@0 | 119 | %define jsimd_ycc_rgb_convert_sse2 jsimd_ycc_extxrgb_convert_sse2 |
michael@0 | 120 | %include "jdclrss2-64.asm" |